diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index ca17213bbb8..dd0d073cd24 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -169,6 +169,16 @@ return 0 return 1 +/obj/item/weapon/rig/proc/reset() + offline = 2 + canremove = 1 + for(var/obj/item/piece in list(helmet,boots,gloves,chest)) + if(!piece) continue + piece.icon_state = "[initial(icon_state)]" + piece.flags &= ~STOPSPRESSUREDMAGE + piece.flags &= ~AIRTIGHT + update_icon(1) + /obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant) if(sealing) return @@ -281,10 +291,6 @@ piece.flags |= AIRTIGHT update_icon(1) - if(instant && air_supply) - wearer.internals = air_supply - wearer.internals.icon_state = "internal1" - /obj/item/weapon/rig/process() // If we've lost any parts, grab them back. diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index ccd9d388e26..c954c16de6c 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -169,3 +169,43 @@ "\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!") //no damage or anything, just wastes medicine + +/datum/surgery_step/hardsuit + allowed_tools = list( + /obj/item/weapon/weldingtool = 80, + /obj/item/weapon/circular_saw = 60, + /obj/item/weapon/pickaxe/plasmacutter = 100 + ) + + can_infect = 0 + blood_level = 0 + + min_duration = 120 + max_duration = 180 + + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + if(!istype(target)) + return 0 + if(istype(tool,/obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/welder = tool + if(!welder.isOn()) + return 0 + return (target_zone == "chest") && istype(target.back, /obj/item/weapon/rig) && !(target.back.canremove) + + begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] starts cutting through the support systems of [target]'s [target.back] with \the [tool]." , \ + "You start cutting through the support systems of [target]'s [target.back] with \the [tool].") + ..() + + end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + + var/obj/item/weapon/rig/rig = target.back + if(!istype(rig)) + return + rig.reset() + user.visible_message("[user] has cut through the support systems of [target]'s [rig] with \the [tool].", \ + "You have cut through the support systems of [target]'s [rig] with \the [tool].") + + fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user]'s [tool] can't quite seem to get through the metal...", \ + "Your [tool] can't quite seem to get through the metal. It's weakening, though - try again.") \ No newline at end of file