From 0da33d5161de9f0ba7b57416a30e12c420538f28 Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Tue, 16 Sep 2014 21:52:17 +0200 Subject: [PATCH] Adds size_multiplier, icon_update vars and stops masks and shoes from rendering beneath hardsuits --- .../modules/mob/living/carbon/human/human_defines.dm | 3 +++ code/modules/mob/living/carbon/human/inventory.dm | 12 +++++++++--- code/modules/mob/living/carbon/human/update_icons.dm | 11 +++++++---- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index c3ad3d918d7..6869d7efaff 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 6bbfce36de7..d15c48b9003 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 5a06f2cfbea..76011e2ecc6 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -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