mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #1283 from CHOMPStationBot/upstream-merge-9539
[MIRROR] [MIRROR] Adds proc to properly update human icon gender
This commit is contained in:
@@ -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)
|
||||
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user