From fe38ce6305f0e7b093a7428b051e8660eb20931a Mon Sep 17 00:00:00 2001 From: Eschess Date: Fri, 23 Nov 2018 23:51:31 +0100 Subject: [PATCH] fixes non syndicate helmet attaching/detaching runtimes --- code/modules/clothing/spacesuits/hardsuit.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index dd80db705a5..6291f3aeb57 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -206,8 +206,9 @@ else to_chat(user, "You detach \the [helmet] from \the [src]'s helmet mount.") helmet.loc = get_turf(src) - var/obj/item/clothing/head/helmet/space/hardsuit/syndi/S = helmet - S.linkedsuit = null + if(istype(src,/obj/item/clothing/head/helmet/space/hardsuit/syndi)) + var/obj/item/clothing/head/helmet/space/hardsuit/syndi/S = helmet + S.linkedsuit = null src.helmet = null return if(!boots) @@ -229,10 +230,11 @@ user.drop_item() W.loc = src src.helmet = W - var/obj/item/clothing/head/helmet/space/hardsuit/syndi/S = W - S.forceMove(src) - helmet = S - S.link_suit() + if(istype(src,/obj/item/clothing/head/helmet/space/hardsuit/syndi)) + var/obj/item/clothing/head/helmet/space/hardsuit/syndi/S = W + S.forceMove(src) + helmet = S + S.link_suit() return else if(istype(W,/obj/item/clothing/shoes/magboots) && can_modify(user))