Merge pull request #5480 from Hubblenaut/master

Fixes earmuffs and custom items for ear slot not showing up properly
This commit is contained in:
Zuhayr
2014-07-04 04:41:25 +09:30
2 changed files with 16 additions and 7 deletions
@@ -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)
@@ -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)