Fix missing ability to get pilot out of mecha manually as MMI (#25430)

* Fix not being able to get mech pilot out manually

* Update mecha.dm

* Update mecha.dm

* Update mecha.dm

* Update mecha.dm

* Update code/game/mecha/mecha.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Сиротка <114731039+ErdGinalD@users.noreply.github.com>

---------

Signed-off-by: Сиротка <114731039+ErdGinalD@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Сиротка
2024-08-15 23:33:29 +00:00
committed by GitHub
co-authored by Burzah
parent 90e52f70e8
commit 5a4cf2279a
+8 -2
View File
@@ -820,7 +820,7 @@
/obj/mecha/crowbar_act(mob/user, obj/item/I)
if(state != MECHA_BOLTS_UP && state != MECHA_OPEN_HATCH && !(state == MECHA_BATTERY_UNSCREW && pilot_is_mmi()))
if(state != MECHA_BOLTS_UP && state != MECHA_OPEN_HATCH && !(state == MECHA_BATTERY_UNSCREW && occupant))
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
@@ -831,11 +831,17 @@
else if(state == MECHA_OPEN_HATCH)
state = MECHA_BOLTS_UP
to_chat(user, "You close the hatch to the power unit")
else if(ishuman(occupant))
user.visible_message("<span class='notice'>[user] begins levering out the driver from the [src].</span>", "<span class='notice'>You begin to lever out the driver from the [src].</span>")
to_chat(occupant, "<span class='warning'>[user] is prying you out of the exosuit!</span>")
if(I.use_tool(src, user, 8 SECONDS, volume = I.tool_volume))
user.visible_message("<span class='notice'>[user] pries the driver out of the [src]!</span>", "<span class='notice'>You finish removing the driver from the [src]!</span>")
go_out()
else
// Since having maint protocols available is controllable by the MMI, I see this as a consensual way to remove an MMI without destroying the mech
user.visible_message("<span class='notice'>[user] begins levering out the MMI from [src].</span>", "<span class='notice'>You begin to lever out the MMI from [src].</span>")
to_chat(occupant, "<span class='warning'>[user] is prying you out of the exosuit!</span>")
if(I.use_tool(src, user, 80, volume = I.tool_volume) && pilot_is_mmi())
if(I.use_tool(src, user, 8 SECONDS, volume = I.tool_volume) && pilot_is_mmi())
user.visible_message("<span class='notice'>[user] pries the MMI out of [src]!</span>", "<span class='notice'>You finish removing the MMI from [src]!</span>")
go_out()