From 1b7142535c453e003e2e0ee4d5f04f6b53f2f472 Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Sun, 3 Jun 2012 05:50:53 +0000 Subject: [PATCH] Just knocking a (very) quick issue report off the list before bed. Labcoat buttons are no longer toggle-able while stunned, unconscious or dead. Fixes issue 519. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3732 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/items/clothing.dm | 92 +++++++++++++++-------------- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/code/game/objects/items/clothing.dm b/code/game/objects/items/clothing.dm index d3b53827528..8e00c6c5567 100644 --- a/code/game/objects/items/clothing.dm +++ b/code/game/objects/items/clothing.dm @@ -325,51 +325,57 @@ THERMAL GLASSES /obj/item/clothing/suit/labcoat/verb/toggle() set name = "Toggle Labcoat Buttons" set category = "Object" - if(src.icon_state == "labcoat_open") - src.icon_state = "labcoat" - usr << "You button up the labcoat." - else if(src.icon_state == "labcoat") - src.icon_state = "labcoat_open" - usr << "You unbutton the labcoat." - else if(src.icon_state == "labcoat_cmo_open") - src.icon_state = "labcoat_cmo" - usr << "You button up the labcoat." - else if(src.icon_state == "labcoat_cmo") - src.icon_state = "labcoat_cmo_open" - usr << "You unbutton the labcoat." - else if(src.icon_state == "labcoat_gen_open") - src.icon_state = "labcoat_gen" - usr << "You button up the labcoat." - else if(src.icon_state == "labcoat_gen") - src.icon_state = "labcoat_gen_open" - usr << "You unbutton the labcoat." - else if(src.icon_state == "labcoat_chem_open") - src.icon_state = "labcoat_chem" - usr << "You button up the labcoat." - else if(src.icon_state == "labcoat_chem") - src.icon_state = "labcoat_chem_open" - usr << "You unbutton the labcoat." - else if(src.icon_state == "labcoat_vir_open") - src.icon_state = "labcoat_vir" - usr << "You button up the labcoat." - else if(src.icon_state == "labcoat_vir") - src.icon_state = "labcoat_vir_open" - usr << "You unbutton the labcoat." - else if(src.icon_state == "labcoat_tox_open") - src.icon_state = "labcoat_tox" - usr << "You button up the labcoat." - else if(src.icon_state == "labcoat_tox") - src.icon_state = "labcoat_tox_open" - usr << "You unbutton the labcoat." - else if(src.icon_state == "labgreen_open") - src.icon_state = "labgreen" - usr << "You button up the labcoat." - else if(src.icon_state == "labgreen") - src.icon_state = "labgreen_open" - usr << "You unbutton the labcoat." + + if(!usr.canmove || usr.stat || usr.restrained()) + return 0 else - usr << "Sorry! The suit you're wearing doesn't have buttons!" + + if(src.icon_state == "labcoat_open") + src.icon_state = "labcoat" + usr << "You button up the labcoat." + else if(src.icon_state == "labcoat") + src.icon_state = "labcoat_open" + usr << "You unbutton the labcoat." + else if(src.icon_state == "labcoat_cmo_open") + src.icon_state = "labcoat_cmo" + usr << "You button up the labcoat." + else if(src.icon_state == "labcoat_cmo") + src.icon_state = "labcoat_cmo_open" + usr << "You unbutton the labcoat." + else if(src.icon_state == "labcoat_gen_open") + src.icon_state = "labcoat_gen" + usr << "You button up the labcoat." + else if(src.icon_state == "labcoat_gen") + src.icon_state = "labcoat_gen_open" + usr << "You unbutton the labcoat." + else if(src.icon_state == "labcoat_chem_open") + src.icon_state = "labcoat_chem" + usr << "You button up the labcoat." + else if(src.icon_state == "labcoat_chem") + src.icon_state = "labcoat_chem_open" + usr << "You unbutton the labcoat." + else if(src.icon_state == "labcoat_vir_open") + src.icon_state = "labcoat_vir" + usr << "You button up the labcoat." + else if(src.icon_state == "labcoat_vir") + src.icon_state = "labcoat_vir_open" + usr << "You unbutton the labcoat." + else if(src.icon_state == "labcoat_tox_open") + src.icon_state = "labcoat_tox" + usr << "You button up the labcoat." + else if(src.icon_state == "labcoat_tox") + src.icon_state = "labcoat_tox_open" + usr << "You unbutton the labcoat." + else if(src.icon_state == "labgreen_open") + src.icon_state = "labgreen" + usr << "You button up the labcoat." + else if(src.icon_state == "labgreen") + src.icon_state = "labgreen_open" + usr << "You unbutton the labcoat." + + else + usr << "Sorry! The suit you're wearing doesn't have buttons!" /obj/item/clothing/head/ushanka/attack_self(mob/user as mob) if(src.icon_state == "ushankadown")