mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-24 05:36:57 +01:00
Merge pull request #6773 from Mechoid/FixRigs
Cutting rigs now retracts all components, to stop the dreaded pseudoprison.
This commit is contained in:
@@ -231,6 +231,15 @@
|
||||
update_airtight(piece, 0) // Unseal
|
||||
update_icon(1)
|
||||
|
||||
/obj/item/weapon/rig/proc/cut_suit()
|
||||
offline = 2
|
||||
canremove = 1
|
||||
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)
|
||||
|
||||
if(sealing) return
|
||||
@@ -739,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
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
rig = target.belt
|
||||
if(!istype(rig))
|
||||
return
|
||||
rig.reset()
|
||||
rig.cut_suit()
|
||||
user.visible_message("<span class='notice'>[user] has cut through the support systems of \the [rig] on [target] with \the [tool].</span>", \
|
||||
"<span class='notice'>You have cut through the support systems of \the [rig] on [target] with \the [tool].</span>")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user