From 36acf64f18795f0dec3d588ae6411c223d7a7493 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sat, 16 May 2015 18:33:03 +0930 Subject: [PATCH] Partial fix for #8825 --- .../mob/living/carbon/human/update_icons.dm | 2 +- code/modules/organs/organ_external.dm | 21 +++++++++++-------- code/modules/organs/organ_icon.dm | 6 +++++- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 9dfe4b27d96..840ead0ac6e 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -330,7 +330,7 @@ var/global/list/damage_icon_parts = list() overlays_standing[HAIR_LAYER] = null var/obj/item/organ/external/head/head_organ = get_organ("head") - if( !head_organ || (head_organ.status & ORGAN_DESTROYED) ) + if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) ) if(update_icons) update_icons() return diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 4bf7b9c99e0..0e1878c81e1 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -226,7 +226,7 @@ var/obj/item/W = used_weapon if(W.w_class >= 3) edge_eligible = 1 - + if(brute >= threshold || (edge_eligible && brute >= threshold/3)) if((sharp || edge)) droplimb(0,DROPLIMB_EDGE) @@ -917,14 +917,15 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/proc/disfigure(var/type = "brute") if (disfigured) return - if(type == "brute") - owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s [name].", \ - "\red Your [name] becomes a mangled mess!", \ - "\red You hear a sickening crack.") - else - owner.visible_message("\red \The [owner]'s [name] melts away, turning into mangled mess!", \ - "\red Your [name] melts away!", \ - "\red You hear a sickening sizzle.") + if(owner) + if(type == "brute") + owner.visible_message("\red You hear a sickening cracking sound coming from \the [owner]'s [name].", \ + "\red Your [name] becomes a mangled mess!", \ + "\red You hear a sickening crack.") + else + owner.visible_message("\red \The [owner]'s [name] melts away, turning into mangled mess!", \ + "\red Your [name] melts away!", \ + "\red You hear a sickening sizzle.") disfigured = 1 /**************************************************** @@ -1077,6 +1078,8 @@ Note that amputating the affected organ does in fact remove the infection from t owner.u_equip(owner.l_ear) owner.u_equip(owner.r_ear) owner.u_equip(owner.wear_mask) + spawn(1) + owner.update_hair() ..() /obj/item/organ/external/head/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list()) diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index d05a269f28f..7036e7e725f 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -34,6 +34,7 @@ var/global/list/limb_icon_cache = list() /obj/item/organ/external/head/get_icon() ..() + overlays.Cut() if(owner.species.has_organ["eyes"]) var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"] if(owner.species.eyes) @@ -43,9 +44,12 @@ var/global/list/limb_icon_cache = list() else eyes_icon.Blend(rgb(128,0,0), ICON_ADD) mob_icon.Blend(eyes_icon, ICON_OVERLAY) + overlays |= eyes_icon if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS))) - mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY) + var/icon/lip_icon = new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s") + overlays |= lip_icon + mob_icon.Blend(lip_icon, ICON_OVERLAY) if(owner.f_style) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]