Adds proc to properly update human icon gender (#7813)

This commit is contained in:
Atermonera
2020-12-31 21:31:35 -08:00
committed by GitHub
parent 5b6631088b
commit c58fb16bc1
4 changed files with 11 additions and 13 deletions

View File

@@ -195,3 +195,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

@@ -225,10 +225,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]"