[MIRROR] DNA Clone Fix (#10580)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-04-03 13:13:01 -07:00
committed by GitHub
parent 036ed10454
commit e902125c5e
21 changed files with 199 additions and 138 deletions

View File

@@ -8,8 +8,8 @@
var/check_digi = istype(src,/obj/item/organ/external/leg) || istype(src,/obj/item/organ/external/foot)
if(owner)
digitigrade = check_digi && owner.digitigrade
else if(dna)
digitigrade = check_digi && dna.digitigrade
else if(data)
digitigrade = check_digi && data.digitigrade
var/should_apply_transparency = FALSE
@@ -18,22 +18,19 @@
if(owner && owner.gender == FEMALE)
gender = "f"
if(!force_icon_key)
icon_cache_key = "[icon_name]_[species ? species.get_bodytype() : SPECIES_HUMAN]" //VOREStation Edit
else
icon_cache_key = "[icon_name]_[force_icon_key]"
icon_cache_key = "[icon_name]_[data.get_species_bodytype(owner)]"
if(force_icon && !skip_forced_icon)
mob_icon = new /icon(force_icon, "[icon_name][gendered_icon ? "_[gender]" : ""]")
else
if(!dna)
if(!data)
mob_icon = new /icon('icons/mob/human_races/r_human.dmi', "[icon_name][gendered_icon ? "_[gender]" : ""]")
else
if(!gendered_icon)
gender = null
else
if(dna.GetUIState(DNA_UI_GENDER))
if(data.body_gender)
gender = "f"
else
gender = "m"
@@ -50,7 +47,7 @@
should_apply_transparency = TRUE
else
//Use digi icon if digitigrade, otherwise use regular icon. Ternary operator is based.
mob_icon = new /icon(digitigrade ? species.icodigi : species.get_icobase(owner, (status & ORGAN_MUTATED)), "[icon_name][gender ? "_[gender]" : ""]")
mob_icon = new /icon(digitigrade ? data.get_species_icodigi() : data.get_species_icobase(owner, (status & ORGAN_MUTATED)), "[icon_name][gender ? "_[gender]" : ""]")
should_apply_transparency = TRUE
apply_colouration(mob_icon)
@@ -77,12 +74,11 @@
icon_cache_key += "[M][markings[M]["color"]]"
if(body_hair && islist(h_col) && h_col.len >= 3)
var/cache_key = "[body_hair]-[icon_name]-[h_col[1]][h_col[2]][h_col[3]]"
//if(!GLOB.limb_icon_cache[cache_key]) //icon cache tweak start
var/icon/I = icon(species.get_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit
mob_icon.Blend(I, ICON_OVERLAY)
GLOB.limb_icon_cache[cache_key] = I
//icon cache tweak end
if(!GLOB.limb_icon_cache[cache_key])
var/icon/I = icon(data.get_species_icobase(owner), "[icon_name]_[body_hair]")
I.Blend(rgb(h_col[1],h_col[2],h_col[3]), ICON_MULTIPLY) //VOREStation edit
GLOB.limb_icon_cache[cache_key] = I
mob_icon.Blend(GLOB.limb_icon_cache[cache_key], ICON_OVERLAY)
// VOREStation edit start
if(nail_polish && !(force_icon && !skip_forced_icon))