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/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/age = 30 //Player's age (pure fluff)

View File

@@ -85,6 +85,8 @@
if(W)
success = 1
wear_suit = null
if(W.flags_inv & HIDESHOES)
update_inv_shoes(0)
update_inv_wear_suit()
else if (W == w_uniform)
if (r_store)
@@ -108,9 +110,10 @@
update_inv_glasses()
else if (W == head)
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_inv_ears(0)
update_inv_wear_mask(0)
success = 1
update_inv_head()
else if (W == l_ear)
@@ -270,9 +273,10 @@
update_inv_gloves(redraw_mob)
if(slot_head)
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_inv_ears(0)
update_inv_wear_mask(0)
if(istype(W,/obj/item/clothing/head/kitty))
W.update_icon(src)
W.equipped(src, slot)
@@ -283,6 +287,8 @@
update_inv_shoes(redraw_mob)
if(slot_wear_suit)
src.wear_suit = W
if(wear_suit.flags_inv & HIDESHOES)
update_inv_shoes(0)
W.equipped(src, slot)
update_inv_wear_suit(redraw_mob)
if(slot_w_uniform)
@@ -671,7 +677,7 @@ It can still be worn/put on as normal.
slot_to_process = slot_back
if (target.back)
strip_item = target.back
if("handcuff")
if("handcuff")
slot_to_process = slot_handcuffed
if (target.handcuffed)
strip_item = target.handcuffed

View File

@@ -158,7 +158,7 @@ Please contact me on #coderbus IRC. ~Carn x
if(istype(I)) overlays += I
I = overlays_standing[R_HAND_LAYER]
if(istype(I)) overlays += I
else
else if (icon_update)
icon = stand_icon
for(var/image/I in overlays_standing)
overlays += I
@@ -166,10 +166,13 @@ Please contact me on #coderbus IRC. ~Carn x
if(lying)
var/matrix/M = matrix()
M.Turn(90)
M.Scale(size_multiplier)
M.Translate(1,-6)
src.transform = M
else
var/matrix/M = matrix()
M.Scale(size_multiplier)
M.Translate(0, 16*(size_multiplier-1))
src.transform = M
var/global/list/damage_icon_parts = list()
@@ -274,7 +277,7 @@ proc/get_damage_icon_part(damage_state, body_part)
//No icon stored, so we need to start with a basic one.
var/datum/organ/external/chest = get_organ("chest")
base_icon = chest.get_icon(g)
if(chest.status & ORGAN_DEAD)
base_icon.ColorTone(necrosis_color_mod)
base_icon.SetIntensity(0.7)
@@ -678,7 +681,7 @@ proc/get_damage_icon_part(damage_state, body_part)
if(update_icons) update_icons()
/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
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)
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
var/image/standing