[MIRROR] Allows resisting out of mech passenger compartments and sleepers (#9249)

Co-authored-by: Nadyr <41974248+Darlantanis@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
CHOMPStation2
2024-10-17 09:33:24 -07:00
committed by GitHub
parent e2d07fdd2d
commit e68994c99d
2 changed files with 18 additions and 0 deletions

View File

@@ -37,6 +37,10 @@
else
to_chat(user, "You stop entering the exosuit.")
/obj/item/mecha_parts/mecha_equipment/tool/passenger/container_resist(var/mob/living)
if(occupant == living)
eject()
/obj/item/mecha_parts/mecha_equipment/tool/passenger/verb/eject()
set name = "Eject"
set category = "Exosuit Interface"
@@ -45,6 +49,16 @@
if(usr != occupant)
return
if(door_locked)
to_chat(occupant, "<span class='notice'>\The [src] is locked! You begin operating the emergency unlock mechanism. This will take one minute.</span>")
sleep(600)
if(!src || !usr || !occupant || (occupant != usr)) //Check if someone's released/replaced/bombed him already
return
if(door_locked)
door_locked = FALSE
occupant_message("Passenger compartment hatch unlocked.")
if (chassis)
chassis.visible_message("The hatch on \the [chassis] unlocks.", "You hear something latching.")
to_chat(occupant, "You climb out from \the [src].")
go_out()
occupant_message("[occupant] disembarked.")

View File

@@ -197,6 +197,10 @@
return 1
return
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/container_resist(var/mob/living)
if(occupant == living)
eject()
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/verb/eject()
set name = "Sleeper Eject"
set category = "Exosuit Interface"