From f2b5c86ac1e8e0fcaaa37d1ae559b6df84ae06ff Mon Sep 17 00:00:00 2001 From: Anvil Date: Mon, 17 May 2021 21:56:53 -0700 Subject: [PATCH 1/2] Adds partial Command integration for Non-Humans Allows Non-Humans to enroll in Command positions, dependent on Species. Applies to both roundstart and latejoin. --- .../configuration/entries/game_options.dm | 4 +++ code/modules/clothing/outfits/plasmaman.dm | 34 +++++++++++++++++++ code/modules/jobs/job_types/_job.dm | 7 ++-- .../carbon/human/species_types/plasmamen.dm | 8 ++++- config/game_options.txt | 11 ++++++ 5 files changed, 60 insertions(+), 4 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 96782721e87a..0b522ee75d45 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -11,6 +11,10 @@ key_mode = KEY_MODE_TEXT value_mode = VALUE_MODE_NUM +/datum/config_entry/keyed_list/job_species_whitelist // Assigns species-based exceptions to Command roles + key_mode = KEY_MODE_TYPE + value_mode = VALUE_MODE_TEXT + /datum/config_entry/keyed_list/max_pop/ValidateListEntry(key_name) return key_name in config.modes diff --git a/code/modules/clothing/outfits/plasmaman.dm b/code/modules/clothing/outfits/plasmaman.dm index 4a1070460a4f..6906e76a7403 100644 --- a/code/modules/clothing/outfits/plasmaman.dm +++ b/code/modules/clothing/outfits/plasmaman.dm @@ -498,4 +498,38 @@ l_pocket = /obj/item/laser_pointer backpack_contents = list(/obj/item/storage/box/plasmaman = 1) +/datum/outfit/job/plasmaman/ce + name = "Plasmaman Chief Engineer" + + id = /obj/item/card/id/silver + head = /obj/item/clothing/head/helmet/space/plasmaman/engineering + r_hand= /obj/item/tank/internals/plasmaman/belt/full + mask = /obj/item/clothing/mask/breath + uniform = /obj/item/clothing/under/plasmaman/engineering + shoes = /obj/item/clothing/shoes/sneakers/brown + ears = /obj/item/radio/headset/heads/ce + gloves = /obj/item/clothing/gloves/color/black/ce + belt = /obj/item/storage/belt/utility/chief/full + backpack = /obj/item/storage/backpack/industrial + satchel = /obj/item/storage/backpack/satchel/eng + duffelbag = /obj/item/storage/backpack/duffelbag/engineering + l_pocket = /obj/item/pda/heads/ce + backpack_contents = list(/obj/item/storage/box/plasmaman = 1) + +/datum/outfit/job/plasmaman/rd + name = "Plasmaman Research Director" + + id = /obj/item/card/id/silver + head = /obj/item/clothing/head/helmet/space/plasmaman + r_hand= /obj/item/tank/internals/plasmaman/belt/full + mask = /obj/item/clothing/mask/breath + uniform = /obj/item/clothing/under/plasmaman/science + shoes = /obj/item/clothing/shoes/sneakers/brown + ears = /obj/item/radio/headset/heads/rd + glasses = /obj/item/clothing/glasses/hud/diagnostic/sunglasses + belt = /obj/item/pda/heads/rd + suit = /obj/item/clothing/suit/toggle/labcoat/science + backpack = /obj/item/storage/backpack/science + satchel = /obj/item/storage/backpack/satchel/tox + backpack_contents = list(/obj/item/storage/box/plasmaman = 1) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index f6c008a6135a..8330290a6c7d 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -128,12 +128,13 @@ /datum/job/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, datum/outfit/outfit_override = null, client/preference_source) if(!H) return FALSE - - if(CONFIG_GET(flag/enforce_human_authority) && (title in GLOB.command_positions)) + +//This reads Command placement exceptions in code/controllers/configuration/entries/game_options to allow non-Humans in specified Command roles. If the combination of species and command role is invalid, default to Human. + if(CONFIG_GET(keyed_list/job_species_whitelist)[type] && !splittext(CONFIG_GET(keyed_list/job_species_whitelist)[type], ",").Find(H.dna.species.id)) if(H.dna.species.id != "human") H.set_species(/datum/species/human) H.apply_pref_name("human", preference_source) - + if(!visualsOnly) var/datum/bank_account/bank_account = new(H.real_name, src) bank_account.payday(STARTING_PAYCHECKS, TRUE) diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index ae0418913c53..b29f4dd43cd5 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -146,10 +146,16 @@ if("Assistant") O = new /datum/outfit/job/plasmaman/assistant - + if("Artist") O = new /datum/outfit/job/plasmaman/artist + if("Chief Engineer") + O = new /datum/outfit/job/plasmaman/ce + + if("Research Director") + O = new /datum/outfit/job/plasmaman/rd + H.equipOutfit(O, visualsOnly) H.internal = H.get_item_for_held_index(2) H.update_internals_hud_icon(1) diff --git a/config/game_options.txt b/config/game_options.txt index 7ef3f1d63991..c0a8773942e3 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -14,6 +14,17 @@ REVIVAL_CLONING ## amount of time (in hundredths of seconds) for which a brain retains the "spark of life" after the person's death (set to -1 for infinite) REVIVAL_BRAIN_LIFE -1 +## JOB_SPECIES_WHITELIST ## +## Creates Command roles species based exceptions; comma delineated list - /datum/job/[JOB] [SPECIES 1],[SPECIES 2], etc. + +JOB_SPECIES_WHITELIST /datum/job/captain human +JOB_SPECIES_WHITELIST /datum/job/hop human +JOB_SPECIES_WHITELIST /datum/job/hos human,lizard,ethereal,polysmorph +JOB_SPECIES_WHITELIST /datum/job/chief_engineer human,plasmaman,moth,ethereal,preternis +JOB_SPECIES_WHITELIST /datum/job/rd human,pod,plasmaman,preternis,polysmorph +JOB_SPECIES_WHITELIST /datum/job/cmo human,lizard,pod,moth + + ## OOC DURING ROUND ### ## Comment this out if you want OOC to be automatically disabled during the round, it will be enabled during the lobby and after the round end results. OOC_DURING_ROUND From a35ba279a1f4dd4ddab10924b9f1e40f7af8ec8e Mon Sep 17 00:00:00 2001 From: Anvilman6 <54463777+Anvilman6@users.noreply.github.com> Date: Tue, 25 May 2021 09:13:38 -0700 Subject: [PATCH 2/2] Ethereals, Polys moved from HoS to RD, CE Per lengthy consultation with other developers, I have decided to move Ethereals and Polysmorphs out of the HoS qualification into RD/CE respectively. Main documentation to be adjusted accordingly, and fuller explanatory comment to be posted to thread shortly. --- config/game_options.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/game_options.txt b/config/game_options.txt index c0a8773942e3..002af9701deb 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -19,9 +19,9 @@ REVIVAL_BRAIN_LIFE -1 JOB_SPECIES_WHITELIST /datum/job/captain human JOB_SPECIES_WHITELIST /datum/job/hop human -JOB_SPECIES_WHITELIST /datum/job/hos human,lizard,ethereal,polysmorph -JOB_SPECIES_WHITELIST /datum/job/chief_engineer human,plasmaman,moth,ethereal,preternis -JOB_SPECIES_WHITELIST /datum/job/rd human,pod,plasmaman,preternis,polysmorph +JOB_SPECIES_WHITELIST /datum/job/hos human,lizard +JOB_SPECIES_WHITELIST /datum/job/chief_engineer human,plasmaman,moth,ethereal,preternis, polysmorph +JOB_SPECIES_WHITELIST /datum/job/rd human,pod,plasmaman,ethereal,preternis,polysmorph JOB_SPECIES_WHITELIST /datum/job/cmo human,lizard,pod,moth