From 43396527434fcedebcc2d6c837be7e9944a0c924 Mon Sep 17 00:00:00 2001 From: Eschess Date: Fri, 23 Nov 2018 19:11:07 +0100 Subject: [PATCH 1/3] helmet unlink from hardsuit upon detaching it, also fixes being able to switch helmet to combat mode while having it in hand --- code/modules/clothing/spacesuits/hardsuit.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index a5e66af02ac..dd80db705a5 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -206,6 +206,8 @@ 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 src.helmet = null return if(!boots) @@ -335,6 +337,11 @@ linkedsuit = loc /obj/item/clothing/head/helmet/space/hardsuit/syndi/attack_self(mob/user) + + if(!linkedsuit) + to_chat(user, "You must attach the helmet to a syndicate hardsuit to toggle combat mode!") + return + on = !on if(on) to_chat(user, "You switch your helmet to travel mode. It will allow you to stand in zero pressure environments, at the cost of speed.") From fe38ce6305f0e7b093a7428b051e8660eb20931a Mon Sep 17 00:00:00 2001 From: Eschess Date: Fri, 23 Nov 2018 23:51:31 +0100 Subject: [PATCH 2/3] 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)) From 858eb8fc82a39c0b3cb625d2150769796e4b494e Mon Sep 17 00:00:00 2001 From: Eschess Date: Sat, 24 Nov 2018 01:37:19 +0100 Subject: [PATCH 3/3] switches src for helmet variable --- code/modules/clothing/spacesuits/hardsuit.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 6291f3aeb57..ba61c78b368 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -206,7 +206,7 @@ else to_chat(user, "You detach \the [helmet] from \the [src]'s helmet mount.") helmet.loc = get_turf(src) - if(istype(src,/obj/item/clothing/head/helmet/space/hardsuit/syndi)) + if(istype(helmet,/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 @@ -229,8 +229,8 @@ to_chat(user, "You attach \the [W] to \the [src]'s helmet mount.") user.drop_item() W.loc = src - src.helmet = W - if(istype(src,/obj/item/clothing/head/helmet/space/hardsuit/syndi)) + helmet = W + if(istype(helmet,/obj/item/clothing/head/helmet/space/hardsuit/syndi)) var/obj/item/clothing/head/helmet/space/hardsuit/syndi/S = W S.forceMove(src) helmet = S