Merge pull request #1283 from CHOMPStationBot/upstream-merge-9539

[MIRROR] [MIRROR] Adds proc to properly update human icon gender
This commit is contained in:
Razgriz
2021-02-17 15:02:54 -07:00
committed by GitHub
4 changed files with 34 additions and 14 deletions

View File

@@ -196,3 +196,11 @@
var/list/all_bits = internal_organs|organs
for(var/obj/item/organ/O in all_bits)
O.set_dna(dna)
/mob/living/carbon/human/proc/set_gender(var/g)
if(g != gender)
gender = g
if(dna.GetUIState(DNA_UI_GENDER) ^ gender == FEMALE) // XOR will catch both cases where they do not match
dna.SetUIState(DNA_UI_GENDER, gender == FEMALE)
sync_organ_dna(dna)

View File

@@ -236,10 +236,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
//Create a new, blank icon for our mob to use.
var/icon/stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi', icon_state = "blank")
var/g = "male"
if(gender == FEMALE)
g = "female"
var/g = (gender == MALE ? "male" : "female")
var/icon_key = "[species.get_race_key(src)][g][s_tone][r_skin][g_skin][b_skin]"
if(lip_style)
icon_key += "[lip_style]"