From 4f7dc5c9f5f5312909dc4970b8d44685fe82d87f Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Thu, 3 Jul 2014 03:30:16 +0200 Subject: [PATCH 1/2] Renders ears above hair level, fixes rendering of earmuffs and custom item --- .../mob/living/carbon/human/update_icons.dm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 26bc26ea841..1fa7e6349d8 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -113,13 +113,13 @@ Please contact me on #coderbus IRC. ~Carn x #define ID_LAYER 6 #define SHOES_LAYER 7 #define GLOVES_LAYER 8 -#define EARS_LAYER 9 -#define SUIT_LAYER 10 -#define GLASSES_LAYER 11 -#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt? -#define SUIT_STORE_LAYER 13 -#define BACK_LAYER 14 -#define HAIR_LAYER 15 //TODO: make part of head layer? +#define SUIT_LAYER 9 +#define GLASSES_LAYER 10 +#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt? +#define SUIT_STORE_LAYER 12 +#define BACK_LAYER 13 +#define HAIR_LAYER 14 //TODO: make part of head layer? +#define EARS_LAYER 15 #define FACEMASK_LAYER 16 #define HEAD_LAYER 17 #define COLLAR_LAYER 18 @@ -639,6 +639,11 @@ proc/get_damage_icon_part(damage_state, body_part) if(update_icons) update_icons() /mob/living/carbon/human/update_inv_ears(var/update_icons=1) + overlays_standing[EARS_LAYER] = null + if( (head && (head.flags & (BLOCKHAIR | BLOCKHEADHAIR))) || (wear_mask && (wear_mask.flags & (BLOCKHAIR | BLOCKHEADHAIR)))) + if(update_icons) update_icons() + return + if(l_ear || r_ear) if(l_ear) From 3d1195d1a7d4ba5709aea88adc7a56bf8696675d Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Thu, 3 Jul 2014 03:43:15 +0200 Subject: [PATCH 2/2] Hides ear equipment on BLOCKHAIR and BLOCKHEADHAIR flags --- code/modules/mob/living/carbon/human/inventory.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index e3c484f341c..b1e6af0cedd 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -110,6 +110,7 @@ head = null if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)) update_hair(0) //rebuild hair + update_inv_ears(0) success = 1 update_inv_head() else if (W == l_ear) @@ -133,6 +134,7 @@ success = 1 if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)) update_hair(0) //rebuild hair + update_inv_ears(0) if(internal) if(internals) internals.icon_state = "internal0" @@ -214,6 +216,7 @@ src.wear_mask = W if((wear_mask.flags & BLOCKHAIR) || (wear_mask.flags & BLOCKHEADHAIR)) update_hair(redraw_mob) //rebuild hair + update_inv_ears(0) W.equipped(src, slot) update_inv_wear_mask(redraw_mob) if(slot_handcuffed) @@ -269,6 +272,7 @@ src.head = W if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR)) update_hair(redraw_mob) //rebuild hair + update_inv_ears(0) if(istype(W,/obj/item/clothing/head/kitty)) W.update_icon(src) W.equipped(src, slot)