From 04c874aa6f2ebccacf8d942ea3f1f1b3aa66de74 Mon Sep 17 00:00:00 2001 From: Mechoid Date: Sat, 29 Feb 2020 21:18:22 -0800 Subject: [PATCH 1/2] Cutting rigs now retracts all components, to stop the dreaded pseudoprison. --- code/modules/clothing/spacesuits/rig/rig.dm | 18 ++++++++++++++++++ code/modules/surgery/other.dm | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 7b259d59ec..c34e26b41c 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -231,6 +231,24 @@ update_airtight(piece, 0) // Unseal update_icon(1) +/obj/item/weapon/rig/proc/cut_suit() + offline = 2 + canremove = 1 + for(var/obj/item/piece in list(helmet,boots,gloves,chest)) + if(!piece) continue + piece.icon_state = "[suit_state]" + if(airtight) + update_airtight(piece, 0) // Unseal + piece.canremove = 1 + if(istype(loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = loc + H.drop_from_inventory(piece) + piece.forceMove(get_turf(src)) + piece.dropped() + piece.canremove = 0 + piece.forceMove(src) + update_icon(1) + /obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant) if(sealing) return diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 411ecf75d3..b6ec121adf 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -225,7 +225,7 @@ rig = target.belt if(!istype(rig)) return - rig.reset() + rig.cut_suit() user.visible_message("[user] has cut through the support systems of \the [rig] on [target] with \the [tool].", \ "You have cut through the support systems of \the [rig] on [target] with \the [tool].") From d3f5bf472623beec2fc5f6dcc1b7d6d11c306b29 Mon Sep 17 00:00:00 2001 From: Mechoid Date: Mon, 16 Mar 2020 02:45:31 -0700 Subject: [PATCH 2/2] Force var. --- code/modules/clothing/spacesuits/rig/rig.dm | 25 +++++++-------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index c34e26b41c..d1cd58f556 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -234,19 +234,10 @@ /obj/item/weapon/rig/proc/cut_suit() offline = 2 canremove = 1 - for(var/obj/item/piece in list(helmet,boots,gloves,chest)) - if(!piece) continue - piece.icon_state = "[suit_state]" - if(airtight) - update_airtight(piece, 0) // Unseal - piece.canremove = 1 - if(istype(loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = loc - H.drop_from_inventory(piece) - piece.forceMove(get_turf(src)) - piece.dropped() - piece.canremove = 0 - piece.forceMove(src) + toggle_piece("helmet", loc, ONLY_RETRACT, TRUE) + toggle_piece("gauntlets", loc, ONLY_RETRACT, TRUE) + toggle_piece("boots", loc, ONLY_RETRACT, TRUE) + toggle_piece("chest", loc, ONLY_RETRACT, TRUE) update_icon(1) /obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant) @@ -757,15 +748,15 @@ wearer.wearing_rig = src update_icon() -/obj/item/weapon/rig/proc/toggle_piece(var/piece, var/mob/living/carbon/human/H, var/deploy_mode) +/obj/item/weapon/rig/proc/toggle_piece(var/piece, var/mob/living/carbon/human/H, var/deploy_mode, var/forced = FALSE) - if(sealing || !cell || !cell.charge) + if((sealing || !cell || !cell.charge) && !forced) return - if(!istype(wearer) || (!wearer.back == src && !wearer.belt == src)) + if((!istype(wearer) || (!wearer.back == src && !wearer.belt == src)) && !forced) return - if(usr == wearer && (usr.stat||usr.paralysis||usr.stunned)) // If the usr isn't wearing the suit it's probably an AI. + if((usr == wearer && (usr.stat||usr.paralysis||usr.stunned)) && !forced) // If the usr isn't wearing the suit it's probably an AI. return var/obj/item/check_slot