diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 2a29d2d1d9..cf62e394f0 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -2,7 +2,7 @@ Global associative list for caching humanoid icons. Index format m or f, followed by a string of 0 and 1 to represent bodyparts followed by husk fat hulk skeleton 1 or 0. TODO: Proper documentation - icon_key is [species.race_key][g][husk][fat][hulk][skeleton][s_tone] + icon_key is [species.race_key][g][husk][fat][hulk][skeleton][model][s_tone] */ var/global/list/human_icon_cache = list() var/global/list/tail_icon_cache = list() //key is [species.race_key][r_skin][g_skin][b_skin] @@ -242,7 +242,22 @@ var/global/list/damage_icon_parts = list() if(gender == FEMALE) g = "female" - var/icon_key = "[species.get_race_key(src)][g][s_tone][r_skin][g_skin][b_skin]" + var/model = "1" + for(var/organ_tag in species.has_limbs) + var/obj/item/organ/external/part = organs_by_name[organ_tag] + if(isnull(part) || part.is_stump()) + model = "0" + continue + if(part) + if(part.robotic >= ORGAN_ROBOT) + model = "2[part.model ? "-[part.model]": ""]" + else if(part.status & ORGAN_DEAD) + model = "3" + else + model = "1" + + + var/icon_key = "[species.get_race_key(src)][g][model][s_tone][r_skin][g_skin][b_skin]" if(lip_style) icon_key += "[lip_style]" else @@ -257,15 +272,7 @@ var/global/list/damage_icon_parts = list() var/obj/item/organ/external/part = organs_by_name[organ_tag] if(isnull(part) || part.is_stump()) icon_key += "0" - else if(part.robotic >= ORGAN_ROBOT) - icon_key += "2[part.model ? "-[part.model]": ""]" - robolimb_count++ - if(part.organ_tag == BP_HEAD || part.organ_tag == BP_TORSO || part.organ_tag == BP_GROIN) - robobody_count ++ - else if(part.status & ORGAN_DEAD) - icon_key += "3" - else - icon_key += "1" + continue if(part) icon_key += "[part.species.get_race_key(part.owner)]" icon_key += "[part.dna.GetUIState(DNA_UI_GENDER)]" diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 0fd12ad9ef..cc4844e200 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -17,7 +17,9 @@ var/global/list/limb_icon_cache = list() s_col = null h_col = null if(robotic >= ORGAN_ROBOT) - return + var/datum/robolimb/franchise = all_robolimbs[model] + if(!(franchise && franchise.lifelike)) + return if(species && human.species && species.name != human.species.name) return if(!isnull(human.s_tone) && (human.species.appearance_flags & HAS_SKIN_TONE)) @@ -31,7 +33,9 @@ var/global/list/limb_icon_cache = list() s_col = null h_col = null if(robotic >= ORGAN_ROBOT) - return + var/datum/robolimb/franchise = all_robolimbs[model] + if(!(franchise && franchise.lifelike)) + return if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && (species.appearance_flags & HAS_SKIN_TONE)) s_tone = dna.GetUIValue(DNA_UI_SKIN_TONE) if(species.appearance_flags & HAS_SKIN_COLOR) @@ -124,12 +128,15 @@ var/global/list/limb_icon_cache = list() if(model) icon_cache_key += "_model_[model]" + apply_colouration(mob_icon) dir = EAST icon = mob_icon return mob_icon /obj/item/organ/external/proc/apply_colouration(var/icon/applying) + if(robotic == ORGAN_ROBOT) + return applying if(nonsolid) applying.MapColors("#4D4D4D","#969696","#1C1C1C", "#000000") @@ -188,7 +195,7 @@ var/list/robot_hud_colours = list("#CFCFCF","#AFAFAF","#8F8F8F","#6F6F6F","#4F4F if(!icon_cache_key || !limb_icon_cache[cache_key]) limb_icon_cache[cache_key] = icon(get_icon(), null, SOUTH) var/image/temp = image(limb_icon_cache[cache_key]) - if((robotic < ORGAN_ROBOT) && species) + if((robotic == ORGAN_ROBOT) && species) // Calculate the required colour matrix. var/r = 0.30 * species.health_hud_intensity var/g = 0.59 * species.health_hud_intensity