PR - Gender Update (#14406)

* PR - Gender Update

Gives Gender three states instead of two. This allows clones of tri-gendered species to properly carry their genders over to new bodies (e.g. Greys, Drask, etc.).

Tristate Gender Set Proc
Tristate Gender Get Proc
Fixes where Binary State was needed.

* Update update_icons.dm

Yeah, let's _not_ have Genderless folks get inconsistently gendered body part sprites (e.g. head, groin, torso mismatch).

* Update dna2.dm

* Update dna2.dm

* Update organ_icon.dm

* Update update_icons.dm

* Update dna2_helpers.dm

* Update organ_icon.dm

Readability (spacing)

* Update dna_injector.dm

* Update dna2.dm

* Changes made per Affected's requests.

Changes made per Affected's feedback.

* Update dna2.dm

Got our heads too deep in using this just for DNA_UI_GENDERr - returning the Set and Get procs to 0, 1, 2 as per Affected's request.

While in there, noticed some housekeeping items:
- reorganized the ranges so they flow numerically now
- changed the ranges so they don't overlap (line 205 having been the worst)
- removed the "else" statement from line 222 since we're using ASSERTS. There shouldn't be a value outside the range of 0 to 2 for this.
This commit is contained in:
Iren
2020-10-21 09:45:44 -04:00
committed by GitHub
parent f5a1a359a1
commit a3d01c18f7
5 changed files with 62 additions and 17 deletions

View File

@@ -162,10 +162,13 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
new_icon_state = "[icon_name][gendered_icon ? "_f" : ""]"
else
if(gendered_icon)
if(dna.GetUIState(DNA_UI_GENDER))
gender = "f"
else
gender = "m"
switch(dna.GetUITriState(DNA_UI_GENDER))
if(DNA_GENDER_FEMALE)
gender = "f"
if(DNA_GENDER_MALE)
gender = "m"
else
gender = "f" //Default to "f" (per line 162). Using a pick("m", "f") will make different body parts different genders for the same character.
if(limb_name == "head")
var/obj/item/organ/external/head/head_organ = src
head_organ.handle_alt_icon()