Adds size_multiplier, icon_update vars and stops masks and shoes from rendering beneath hardsuits

This commit is contained in:
Hubblenaut
2014-09-16 21:52:17 +02:00
parent 1f0e51e70b
commit 0da33d5161
3 changed files with 19 additions and 7 deletions

View File

@@ -23,6 +23,9 @@
var/g_skin = 0 var/g_skin = 0
var/b_skin = 0 var/b_skin = 0
var/size_multiplier = 1 //multiplier for the mob's icon size
var/icon_update = 1 //whether icon updating shall take place
var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup
var/age = 30 //Player's age (pure fluff) var/age = 30 //Player's age (pure fluff)

View File

@@ -85,6 +85,8 @@
if(W) if(W)
success = 1 success = 1
wear_suit = null wear_suit = null
if(W.flags_inv & HIDESHOES)
update_inv_shoes(0)
update_inv_wear_suit() update_inv_wear_suit()
else if (W == w_uniform) else if (W == w_uniform)
if (r_store) if (r_store)
@@ -108,9 +110,10 @@
update_inv_glasses() update_inv_glasses()
else if (W == head) else if (W == head)
head = null head = null
if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)) if((W.flags & BLOCKHAIR) || (W.flags & BLOCKHEADHAIR)|| (W.flags_inv & HIDEMASK))
update_hair(0) //rebuild hair update_hair(0) //rebuild hair
update_inv_ears(0) update_inv_ears(0)
update_inv_wear_mask(0)
success = 1 success = 1
update_inv_head() update_inv_head()
else if (W == l_ear) else if (W == l_ear)
@@ -270,9 +273,10 @@
update_inv_gloves(redraw_mob) update_inv_gloves(redraw_mob)
if(slot_head) if(slot_head)
src.head = W src.head = W
if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR)) if((head.flags & BLOCKHAIR) || (head.flags & BLOCKHEADHAIR) || (head.flags_inv & HIDEMASK))
update_hair(redraw_mob) //rebuild hair update_hair(redraw_mob) //rebuild hair
update_inv_ears(0) update_inv_ears(0)
update_inv_wear_mask(0)
if(istype(W,/obj/item/clothing/head/kitty)) if(istype(W,/obj/item/clothing/head/kitty))
W.update_icon(src) W.update_icon(src)
W.equipped(src, slot) W.equipped(src, slot)
@@ -283,6 +287,8 @@
update_inv_shoes(redraw_mob) update_inv_shoes(redraw_mob)
if(slot_wear_suit) if(slot_wear_suit)
src.wear_suit = W src.wear_suit = W
if(wear_suit.flags_inv & HIDESHOES)
update_inv_shoes(0)
W.equipped(src, slot) W.equipped(src, slot)
update_inv_wear_suit(redraw_mob) update_inv_wear_suit(redraw_mob)
if(slot_w_uniform) if(slot_w_uniform)

View File

@@ -158,7 +158,7 @@ Please contact me on #coderbus IRC. ~Carn x
if(istype(I)) overlays += I if(istype(I)) overlays += I
I = overlays_standing[R_HAND_LAYER] I = overlays_standing[R_HAND_LAYER]
if(istype(I)) overlays += I if(istype(I)) overlays += I
else else if (icon_update)
icon = stand_icon icon = stand_icon
for(var/image/I in overlays_standing) for(var/image/I in overlays_standing)
overlays += I overlays += I
@@ -166,10 +166,13 @@ Please contact me on #coderbus IRC. ~Carn x
if(lying) if(lying)
var/matrix/M = matrix() var/matrix/M = matrix()
M.Turn(90) M.Turn(90)
M.Scale(size_multiplier)
M.Translate(1,-6) M.Translate(1,-6)
src.transform = M src.transform = M
else else
var/matrix/M = matrix() var/matrix/M = matrix()
M.Scale(size_multiplier)
M.Translate(0, 16*(size_multiplier-1))
src.transform = M src.transform = M
var/global/list/damage_icon_parts = list() var/global/list/damage_icon_parts = list()
@@ -678,7 +681,7 @@ proc/get_damage_icon_part(damage_state, body_part)
if(update_icons) update_icons() if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_shoes(var/update_icons=1) /mob/living/carbon/human/update_inv_shoes(var/update_icons=1)
if(shoes) if(shoes && !(wear_suit && wear_suit.flags_inv & HIDESHOES))
var/image/standing var/image/standing
if(shoes.icon_override) if(shoes.icon_override)
@@ -798,7 +801,7 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1) /mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/tie) ) ) if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/tie) ) && !(head && head.flags_inv & HIDEMASK))
wear_mask.screen_loc = ui_mask //TODO wear_mask.screen_loc = ui_mask //TODO
var/image/standing var/image/standing