From 41684a577c9f4402864ebdfec2e1201c91e06845 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Tue, 12 Apr 2016 02:08:31 -0400 Subject: [PATCH] Fixes Issue With Head Accessories Vulpkanin facial markings and Unathi horns will no longer magically disappear when you wear something that hides hair. Now works in the same manner as facial hair, being persistent Fixes an issue where the facial markings of Vulpkanin and the horns of Unathi Surgeons would disappear when they wore their surgical cap (i.e. at spawn) and not regenerate without two triggers --- code/modules/mob/living/carbon/human/inventory.dm | 6 ++++++ code/modules/mob/living/carbon/human/update_icons.dm | 2 +- code/modules/surgery/organs/organ_icon.dm | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 568de281cf1..2ddcb3d0f15 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -145,6 +145,7 @@ if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR) update_hair() //rebuild hair update_fhair() + update_head_accessory() update_inv_head() else if(I == r_ear) r_ear = null @@ -163,6 +164,7 @@ if(I.flags & BLOCKHAIR || I.flags & BLOCKHEADHAIR) update_hair() //rebuild hair update_fhair() + update_head_accessory() if(internal) if(internals) internals.icon_state = "internal0" @@ -225,6 +227,8 @@ wear_mask = W if((wear_mask.flags & BLOCKHAIR) || (wear_mask.flags & BLOCKHEADHAIR)) update_hair(redraw_mob) //rebuild hair + update_fhair(redraw_mob) + update_head_accessory(redraw_mob) sec_hud_set_ID() update_inv_wear_mask(redraw_mob) if(slot_handcuffed) @@ -275,6 +279,8 @@ head = W if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR)) update_hair(redraw_mob) //rebuild hair + update_fhair(redraw_mob) + update_head_accessory(redraw_mob) update_inv_head(redraw_mob) if(slot_shoes) shoes = W diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index f37cd16a5a3..73bbd5a4281 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -421,7 +421,7 @@ var/global/list/damage_icon_parts = list() //base icons var/icon/head_accessory_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - if(ha_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.bodyflags & HAS_HEAD_ACCESSORY))) + if(ha_style && (src.species.bodyflags & HAS_HEAD_ACCESSORY)) var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style] if(head_accessory_style && head_accessory_style.species_allowed) if(src.species.name in head_accessory_style.species_allowed) diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index fbc26625e00..ee0e450ae15 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -71,6 +71,14 @@ var/global/list/limb_icon_cache = list() overlays |= lip_icon mob_icon.Blend(lip_icon, ICON_OVERLAY) + if(owner.ha_style) + var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[owner.ha_style] + if(head_accessory_style && head_accessory_style.species_allowed && (species.name in head_accessory_style.species_allowed)) + var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s") + if(head_accessory_style.do_colouration) + head_accessory_s.Blend(rgb(owner.r_headacc, owner.g_headacc, owner.b_headacc), ICON_ADD) + overlays |= head_accessory_s + if(owner.f_style) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style] if(facial_hair_style && facial_hair_style.species_allowed && (species.name in facial_hair_style.species_allowed))