From 29f7200968937cd246066d978db3eb1942bfccc2 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Sun, 25 May 2014 21:57:39 +0930 Subject: [PATCH] Prevented toggling a suit helmet while holding the suit. --- code/modules/clothing/spacesuits/rig.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index 716b27cbcbd..8c992b2311e 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -215,14 +215,17 @@ set category = "Object" set src in usr + if(!istype(src.loc,/mob/living)) return + if(!helmet) usr << "There is no helmet installed." return var/mob/living/carbon/human/H = usr - if(!istype(H)) return + if(!istype(H)) return if(H.stat) return + if(H.wear_suit != src) return if(H.head == helmet) helmet.canremove = 1