Mech Jaws Of Life (#21358)

This PR makes the mech clamp share a bit more in common with the
paramedic's own "Jaws of Life" by making it so that it has unique sound
effects to play while forcing open airlocks, and also breaks airlocks
when opening them. So now there's actually a consistent cost to using
the mech clamps in their capacity as airlock forcers, as opposed to them
strictly being an upgrade over the JOL.


https://github.com/user-attachments/assets/d32c58e3-5f0a-4024-928d-35891d7d3ed7
This commit is contained in:
VMSolidus
2025-09-15 08:00:32 -04:00
committed by GitHub
parent f0c1388eae
commit ec03e591d2
2 changed files with 21 additions and 4 deletions
@@ -64,6 +64,7 @@
return
var/obj/machinery/door/airlock/AD = target
if(!AD.operating)
playsound(src.loc, 'sound/machines/hydraulic_long.ogg', 100, 1, ignore_walls = TRUE)
if(AD.welded || AD.locked)
AD.visible_message(SPAN_WARNING("\The [owner] begins prying on \the [AD]!"))
var/time_to_open = 15 SECONDS
@@ -73,21 +74,23 @@
AD.welded = FALSE
AD.locked = FALSE
AD.update_icon()
playsound(AD, 'sound/effects/meteorimpact.ogg', 100, 1)
playsound(AD, 'sound/machines/airlock_open_force.ogg', 100, 1)
AD.visible_message(SPAN_WARNING("\The [owner] tears \the [AD] open!"))
INVOKE_ASYNC(AD, TYPE_PROC_REF(/obj/machinery/door/airlock, open))
INVOKE_ASYNC(AD, TYPE_PROC_REF(/obj/machinery/door/airlock, open), TRUE)
break_door(AD)
else
AD.visible_message(SPAN_WARNING("\The [owner] begins forcing \the [AD]!"))
if(do_after(user, 5 SECONDS, owner, (DO_DEFAULT & ~DO_USER_CAN_TURN) | DO_USER_UNIQUE_ACT, extra_checks = CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(atom_maintain_position), AD, AD.loc)) && !(AD.operating || AD.welded || AD.locked))
if(AD.density)
INVOKE_ASYNC(AD, TYPE_PROC_REF(/obj/machinery/door/airlock, open))
INVOKE_ASYNC(AD, TYPE_PROC_REF(/obj/machinery/door/airlock, open), TRUE)
playsound(AD, 'sound/machines/airlock_open_force.ogg', 100, 1)
AD.visible_message(SPAN_DANGER("\The [owner] forces \the [AD] open!"))
break_door(AD)
else
INVOKE_ASYNC(AD, TYPE_PROC_REF(/obj/machinery/door/airlock, close))
INVOKE_ASYNC(AD, TYPE_PROC_REF(/obj/machinery/door/airlock, close), TRUE)
playsound(AD, 'sound/machines/airlock_close_force.ogg', 100, 1)
AD.visible_message(SPAN_DANGER("\The [owner] forces \the [AD] closed!"))
break_door(AD)
return
if(length(carrying) >= carrying_capacity)
@@ -130,6 +133,15 @@
to_chat(user, SPAN_NOTICE("You push [target] out of the way."))
owner.visible_message(SPAN_NOTICE("[owner] pushes [target] out of the way."))
/obj/item/mecha_equipment/clamp/proc/break_door(var/obj/machinery/door/airlock/Airlock)
if(Airlock.bolt_cut_state == 2)
return
playsound(Airlock, 'sound/effects/meteorimpact.ogg', 100, 1, ignore_walls = TRUE)
Airlock.visible_message(SPAN_DANGER("\The [Airlock]'s bolts give off a deafening mechanical screech as they are torn apart."))
Airlock.bolt_cut_state = 2
Airlock.set_broken()
/obj/item/mecha_equipment/clamp/attack_self(var/mob/user)
. = ..()
if(.)
@@ -0,0 +1,5 @@
author: Hellfirejag
delete-after: True
changes:
- rscadd: "Mech clamps now produce new sound effects while forcing open airlocks."
- rscadd: "Mech clamps now break airlocks when forcing them open."