From 812b9d3348e1a0ed80c7b7b4ae90e7ee09eb00e8 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Wed, 14 Jan 2015 22:12:44 -0500 Subject: [PATCH] Fixes body_parts_covered not updating when rolling jumpsuits --- code/modules/clothing/clothing.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 38b60890c09..83a0e1864d6 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -399,8 +399,6 @@ BLIND // can't see anything */ var/obj/item/clothing/tie/hastie = null var/displays_id = 1 - var/rolled_down = 0 - var/basecolor sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi') /obj/item/clothing/under/update_clothing_icon() @@ -526,11 +524,14 @@ BLIND // can't see anything if(!istype(usr, /mob/living)) return if(usr.stat) return - if(copytext(item_color,-2) != "_d") - basecolor = item_color - if(basecolor + "_d_s" in icon_states('icons/mob/uniform.dmi')) - body_parts_covered = "[basecolor]" ? LEGS|LOWER_TORSO : UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]" + if(initial(item_color) + "_d_s" in icon_states('icons/mob/uniform.dmi')) + if (item_color == initial(item_color)) + body_parts_covered &= LOWER_TORSO|LEGS|FEET + item_color = "[initial(item_color)]_d" + else + body_parts_covered = initial(body_parts_covered) + item_color = initial(item_color) + update_clothing_icon() else usr << "You cannot roll down the uniform!"