Fix mech exiting with resist (#43658)

Adds delay to resist exit.
This commit is contained in:
py01
2019-04-22 20:35:19 -07:00
committed by Tad Hardesty
parent 7310ad1a15
commit e982811f4d
2 changed files with 9 additions and 11 deletions
+8 -2
View File
@@ -979,8 +979,14 @@
return TRUE
/obj/mecha/container_resist(mob/living/user)
go_out()
is_currently_ejecting = TRUE
to_chat(occupant, "<span class='notice'>You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting.<span>")
if(do_after(occupant,exit_delay, target = src))
to_chat(occupant, "<span class='notice'>You exit the mech.<span>")
go_out()
else
to_chat(occupant, "<span class='notice'>You stop exiting the mech. Weapons are enabled again.<span>")
is_currently_ejecting = FALSE
/obj/mecha/Exited(atom/movable/M, atom/newloc)
if(occupant && occupant == M) // The occupant exited the mech without calling go_out()
+1 -9
View File
@@ -44,15 +44,7 @@
return
if(!chassis || chassis.occupant != owner)
return
chassis.is_currently_ejecting = TRUE
to_chat(owner, "<span class='notice'>You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting.<span>")
if(do_after(chassis.occupant,chassis.exit_delay, target = chassis))
to_chat(owner, "<span class='notice'>You exit the mech.<span>")
chassis.go_out()
else
to_chat(owner, "<span class='notice'>You stop exiting the mech. Weapons are enabled again.<span>")
chassis.is_currently_ejecting = FALSE
chassis.container_resist(chassis.occupant)
/datum/action/innate/mecha/mech_toggle_internals
name = "Toggle Internal Airtank Usage"