From 55e103ee7a66bae161ee2e81a0e1778c3b122d81 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 29 Apr 2014 23:22:40 -0400 Subject: [PATCH] Fixed holster verb runtime --- code/modules/clothing/under/ties.dm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index a6174888077..9f45d7a53d0 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -252,21 +252,33 @@ has_suit.verbs -= /obj/item/clothing/tie/holster/verb/holster_verb ..() +//For the holster hotkey /obj/item/clothing/tie/holster/verb/holster_verb() set name = "Holster" set category = "Object" set src in usr if(!istype(usr, /mob/living)) return if(usr.stat) return + + var/obj/item/clothing/tie/holster/H = null + if (istype(src, /obj/item/clothing/tie/holster)) + H = src + else if (istype(src, /obj/item/clothing/under)) + var/obj/item/clothing/under/S = src + if (S.hastie) + H = S.hastie + + if (!H) + usr << "/red Something is very wrong." - if(!holstered) + if(!H.holstered) if(!istype(usr.get_active_hand(), /obj/item/weapon/gun)) usr << "\blue You need your gun equiped to holster it." return var/obj/item/weapon/gun/W = usr.get_active_hand() - holster(W, usr) + H.holster(W, usr) else - unholster(usr) + H.unholster(usr) /obj/item/clothing/tie/holster/armpit name = "shoulder holster"