From d0c05bc0ad1446dac7fad054819ecd25a845f491 Mon Sep 17 00:00:00 2001 From: Geeves Date: Fri, 10 Jan 2020 17:55:04 +0200 Subject: [PATCH] Welding Mask Fix (#7916) --- code/modules/clothing/head/misc_special.dm | 43 ++++++++++--------- .../changelogs/geeves - weldingmask_tweak.yml | 6 +++ 2 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 html/changelogs/geeves - weldingmask_tweak.yml diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 890c578f968..165fd5edbd3 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -51,27 +51,28 @@ if(!base_state) base_state = icon_state - if(usr.canmove && !usr.stat && !usr.restrained()) - if(src.up) - src.up = !src.up - body_parts_covered |= (EYES|FACE) - flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) - flash_protection = initial(flash_protection) - tint = initial(tint) - icon_state = base_state - item_state = base_state - to_chat(usr, "You flip the [src] down to protect your eyes.") - else - src.up = !src.up - body_parts_covered &= ~(EYES|FACE) - flash_protection = FLASH_PROTECTION_NONE - tint = TINT_NONE - flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) - icon_state = "[base_state]up" - item_state = "[base_state]up" - to_chat(usr, "You push the [src] up out of your face.") - update_clothing_icon() //so our mob-overlays - usr.update_action_buttons() + if(use_check_and_message(usr)) + return + + src.up = !src.up + if(!src.up) + body_parts_covered |= (EYES|FACE) + flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) + flash_protection = initial(flash_protection) + tint = initial(tint) + icon_state = base_state + item_state = base_state + to_chat(usr, "You flip the [src] down to protect your eyes.") + else + body_parts_covered &= ~(EYES|FACE) + flash_protection = FLASH_PROTECTION_NONE + tint = TINT_NONE + flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) + icon_state = "[base_state]up" + item_state = "[base_state]up" + to_chat(usr, "You push the [src] up out of your face.") + update_clothing_icon() //so our mob-overlays + usr.update_action_buttons() /* diff --git a/html/changelogs/geeves - weldingmask_tweak.yml b/html/changelogs/geeves - weldingmask_tweak.yml new file mode 100644 index 00000000000..b4c287b1ab7 --- /dev/null +++ b/html/changelogs/geeves - weldingmask_tweak.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - bugfix: "You can now flip your welding mask up and down even when buckled." \ No newline at end of file