From 5a4cf2279a3295694912ee5b646d211775d75a95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A1=D0=B8=D1=80=D0=BE=D1=82=D0=BA=D0=B0?=
<114731039+ErdGinalD@users.noreply.github.com>
Date: Fri, 16 Aug 2024 02:33:29 +0300
Subject: [PATCH] Fix missing ability to get pilot out of mecha manually as MMI
(#25430)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* 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>
---
code/game/mecha/mecha.dm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 1b6db6427a6..9160090461d 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -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("[user] begins levering out the driver from the [src].", "You begin to lever out the driver from the [src].")
+ to_chat(occupant, "[user] is prying you out of the exosuit!")
+ if(I.use_tool(src, user, 8 SECONDS, volume = I.tool_volume))
+ user.visible_message("[user] pries the driver out of the [src]!", "You finish removing the driver from the [src]!")
+ 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("[user] begins levering out the MMI from [src].", "You begin to lever out the MMI from [src].")
to_chat(occupant, "[user] is prying you out of the exosuit!")
- 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("[user] pries the MMI out of [src]!", "You finish removing the MMI from [src]!")
go_out()