diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index bc461924377..045e5498ca3 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -794,7 +794,16 @@
else if(state==3)
state=2
user << "You close the hatch to the power unit"
+ else if(state==4 && pilot_is_mmi())
+ // 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 the [src].", "You begin to lever out the MMI from the [src].")
+ occupant << "[user] is prying you out of the exosuit!"
+ if(do_after(user,80,target=src))
+ user.visible_message("[user] pries the MMI out of the [src]!", "You finish removing the MMI from the [src]!")
+ go_out()
return
+
+
else if(istype(W, /obj/item/stack/cable_coil))
if(state == 3 && hasInternalDamage(MECHA_INT_SHORT_CIRCUIT))
var/obj/item/stack/cable_coil/CC = W
@@ -1265,6 +1274,18 @@
else
return 0
+/obj/mecha/proc/pilot_is_mmi()
+ var/atom/movable/mob_container
+ if(istype(occupant, /mob/living/carbon/brain))
+ var/mob/living/carbon/brain/brain = occupant
+ mob_container = brain.container
+ if(istype(mob_container, /obj/item/device/mmi))
+ return 1
+ return 0
+
+/obj/mecha/proc/pilot_mmi_hud(var/mob/living/carbon/brain/pilot)
+ return
+
/obj/mecha/verb/view_stats()
set name = "View Stats"
set category = "Exosuit Interface"
diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm
index b2c4b0bc0db..7adc9592d03 100644
--- a/code/game/mecha/mecha_wreckage.dm
+++ b/code/game/mecha/mecha_wreckage.dm
@@ -34,9 +34,17 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(salvage_num <= 0)
- user << "You don't see anything that can be cut with [W]."
+ user.visible_message("[user] begins to slice apart the now completely stripped [src].", "You begin to slice apart the [src].", "You hear the sound of a welder nearby.")
+ if(do_after(user,80,target=src))
+ user.visible_message("The now-dilapidated [src] falls apart in a clatter.", "As you slice apart the final support structures, the [src] falls apart in a heap.", "You hear metal clanking to the floor.")
+ new /obj/item/stack/sheet/metal(src.loc)
+ var/obj/item/stack/rods/rods = new /obj/item/stack/rods(src.loc)
+ rods.amount = 2
+ qdel(src)
return
- if (!isemptylist(welder_salvage) && WT.remove_fuel(0,user))
+ if (isemptylist(welder_salvage))
+ user << "What's left on the [src] cannot be removed with a welder, besides the frame itself"
+ else if(WT.remove_fuel(0,user))
var/type = prob(70)?pick(welder_salvage):null
if(type)
var/N = new type(get_turf(user))
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index 5bbcb367291..d5a4e91ed47 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -27,6 +27,11 @@
else
return 0
+ pilot_mmi_hud(var/mob/living/carbon/brain/pilot)
+ pilot.regular_hud_updates()
+ process_med_hud(pilot, 1)
+ return ..()
+
go_out()
if(ishuman(occupant))
var/mob/living/carbon/human/H = occupant
@@ -34,29 +39,6 @@
H.glasses = null
..()
return
-/*
- verb/set_perspective()
- set name = "Set client perspective."
- set category = "Exosuit Interface"
- set src = usr.loc
- var/perspective = input("Select a perspective type.",
- "Client perspective",
- occupant.client.perspective) in list(MOB_PERSPECTIVE,EYE_PERSPECTIVE)
- world << "[perspective]"
- occupant.client.perspective = perspective
- return
-
- verb/toggle_eye()
- set name = "Toggle eye."
- set category = "Exosuit Interface"
- set src = usr.loc
- if(occupant.client.eye == occupant)
- occupant.client.eye = src
- else
- occupant.client.eye = occupant
- world << "[occupant.client.eye]"
- return
-*/
//TODO - Check documentation for client.eye and client.perspective...
/obj/item/clothing/glasses/hud/health/mech
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index c9fe5410abf..3160ff56cc3 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -12,8 +12,9 @@
var/alien = 0
var/syndiemmi = 0 //Whether or not this is a Syndicate MMI
var/mob/living/carbon/brain/brainmob = null//The current occupant.
- var/mob/living/silicon/robot = null//Appears unused.
- var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
+ var/mob/living/silicon/robot/robot = null//Appears unused.
+ var/obj/mecha/mecha = null//This does not appear to be used outside of reference in mecha.dm.
+// I'm using this for mechs giving MMIs HUDs now
attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/organ/brain/crystal ))
diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm
index 203039250d7..2a191c46217 100644
--- a/code/modules/mob/living/carbon/brain/life.dm
+++ b/code/modules/mob/living/carbon/brain/life.dm
@@ -93,5 +93,10 @@
sight &= ~SEE_OBJS
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
+ if (container && istype(container, /obj/item/device/mmi))
+ var/obj/item/device/mmi/mmi = container
+ if (mmi.mecha)
+ var/obj/mecha/piloted = mmi.mecha
+ piloted.pilot_mmi_hud(src)
handle_hud_icons_health()
\ No newline at end of file