From ccb01cd4eddeec6d93dba16eae7e37a58132e817 Mon Sep 17 00:00:00 2001 From: zonthori Date: Sun, 7 Jun 2015 13:38:44 -0600 Subject: [PATCH] Fixes https://github.com/Baystation12/Baystation12/issues/9728 Fixes custom welding helmet sprites to break when toggled. https://github.com/Baystation12/Baystation12/issues/9728 --- code/modules/clothing/head/misc_special.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 1a0052d316..6f4e9b9a93 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -25,8 +25,11 @@ icon_action_button = "action_welding" siemens_coefficient = 0.9 w_class = 3 + var/base_state /obj/item/clothing/head/welding/attack_self() + if(!base_state) + base_state = icon_state toggle() @@ -40,13 +43,13 @@ src.up = !src.up src.flags |= (HEADCOVERSEYES | HEADCOVERSMOUTH) flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) - icon_state = initial(icon_state) + icon_state = "[base_state]" usr << "You flip the [src] down to protect your eyes." else src.up = !src.up src.flags &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH) flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) - icon_state = "[initial(icon_state)]up" + icon_state = "[base_state]up" usr << "You push the [src] up out of your face." update_clothing_icon() //so our mob-overlays update