diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 8673cbfefeb..5595202cb3a 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -126,13 +126,8 @@
if(istype(P, /obj/item/device/mmi))
var/obj/item/device/mmi/M = P
- if(!M.brainmob)
- to_chat(user, "Sticking an empty [P] into the frame would sort of defeat the purpose.")
+ if(!M.ready_for_use(user))
return
- if(M.brainmob.stat == 2)
- to_chat(user, "Sticking a dead [P] into the frame would sort of defeat the purpose.")
- return
-
if(jobban_isbanned(M.brainmob, "AI"))
to_chat(user, "This [P] does not seem to fit.")
return
diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm
index 810c79d164e..a325117c5dd 100644
--- a/code/game/machinery/transformer.dm
+++ b/code/game/machinery/transformer.dm
@@ -57,7 +57,6 @@
visible_message("The machine makes a series of loud sounds as it starts to replace [H]'s organs and limbs with robotic parts!")
to_chat(H, "You feel a horrible pain as the machine you entered starts to rip you apart and replace your limbs and organs!")
to_chat(H, " You lose consciousness for a brief moment before waking up with a whole new body...")
- to_chat(H, "You are lobotomized by the machine. You do not remember your past identity or self.")
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
canuse = FALSE
addtimer(CALLBACK(src, .proc/rearm), 120 SECONDS)
diff --git a/code/game/objects/structures/therapy.dm b/code/game/objects/structures/therapy.dm
index 4bf515ecebb..000fdadace4 100644
--- a/code/game/objects/structures/therapy.dm
+++ b/code/game/objects/structures/therapy.dm
@@ -505,7 +505,7 @@
var/obj/item/organ/internal/brain/sponge = H.internal_organs_by_name[BP_BRAIN]
var/braindamage = H.getBrainLoss()
if(sponge && istype(sponge))
- if(!sponge.lobotomized)
+ if(!sponge.prepared)
to_chat(user, "Scans indicate [braindamage] distinct abnormalities present in subject.")
return
else
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index 50060bed34a..df2e5766157 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -1,26 +1,14 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-/obj/item/device/mmi/digital/Initialize(mapload, ...)
- . = ..()
- src.brainmob = new(src)
- brainmob.add_language(LANGUAGE_EAL)
- src.brainmob.stat = CONSCIOUS
- src.brainmob.container = src
- src.brainmob.silent = 0
-
-/obj/item/device/mmi/digital/transfer_identity(var/mob/living/carbon/H)
- brainmob.dna = H.dna
- brainmob.timeofhostdeath = H.timeofdeath
- brainmob.stat = 0
- if(H.mind)
- H.mind.transfer_to(brainmob)
- return
+#define STATE_EMPTY 0 // empty cradle
+#define STATE_BRAIN 1 // brain in the cradle
+#define STATE_NODIODES 2 // brain enclosed but no diodes connected
+#define STATE_DIODES 3 // brain gets prepared at this step
+#define STATE_SEALED 4 // sealed and fully operation
/obj/item/device/mmi
name = "man-machine interface"
- desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."
+ desc = "The delicate nature of organic brains required a more novel and permanent solution to the problem of just rotting in the old MMI cradles. Zeng-Hu's unique (and very proprietary) formaldehyde-analogue preservation solution was the key ingredient in what became the new Zeng-Hu/Hephaestus joint venture brain-cases."
icon = 'icons/obj/assemblies.dmi'
- icon_state = "mmi_empty"
+ icon_state = "mmi-empty"
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_BIO = 3)
@@ -28,109 +16,195 @@
//Revised. Brainmob is now contained directly within object of transfer. MMI in this case.
- var/locked = FALSE
+ var/memory_suppression = TRUE
+ var/extra_examine_info = null
+
+ var/cradle_state = STATE_EMPTY
var/can_be_ipc = FALSE
- var/mob/living/carbon/brain/brainmob = null//The current occupant.
+ var/mob/living/carbon/brain/brainmob = null //The current occupant.
var/obj/item/organ/internal/brain/brainobj = null //The current brain organ.
- attackby(var/obj/item/O as obj, var/mob/user as mob)
- if(istype(O,/obj/item/organ/internal/brain) && !brainmob) //Time to stick a brain in it --NEO
- var/obj/item/organ/internal/brain/B = O
- if(!B.can_lobotomize)
- to_chat(user, "\The [B] is incompatible with [src]!")
- return
- if(B.health <= 0)
- to_chat(user, "That brain is well and truly dead.")
- return
- else if(!B.lobotomized && B.can_lobotomize)
- to_chat(user, "The brain won't fit until you perform a lobotomy!")
- return
- else if(!B.brainmob)
- to_chat(user, "You aren't sure where this brain came from, but you're pretty sure it's a useless brain.")
+ var/static/list/valid_brain_icon_states = list("brain", "brain_skrell", "brain_vaurca")
+
+/obj/item/device/mmi/Initialize()
+ . = ..()
+ set_cradle_state(STATE_EMPTY)
+
+/obj/item/device/mmi/update_icon()
+ underlays = null
+ switch(cradle_state) // there's probably a way to optimize this to not need to regenerate the image, but this'll happen once a round every month or so? no reason to.
+ if(STATE_EMPTY)
+ icon_state = "mmi-empty"
+ if(STATE_BRAIN)
+ icon_state = "mmi-brain"
+ underlays += image(icon, null, (brainobj.icon_state in valid_brain_icon_states) ? brainobj.icon_state : "brain")
+ if(STATE_NODIODES)
+ icon_state = "mmi-nodiodes"
+ underlays += image(icon, null, (brainobj.icon_state in valid_brain_icon_states) ? brainobj.icon_state : "brain")
+ if(STATE_DIODES)
+ icon_state = "mmi-diodes"
+ underlays += image(icon, null, (brainobj.icon_state in valid_brain_icon_states) ? brainobj.icon_state : "brain")
+ if(STATE_SEALED)
+ icon_state = "mmi-sealedon"
+
+/obj/item/device/mmi/proc/update_name()
+ if(brainmob)
+ name = "[initial(name)]: [brainmob.real_name]"
+ else
+ name = initial(name)
+
+/obj/item/device/mmi/proc/set_cradle_state(var/new_state)
+ cradle_state = new_state
+ switch(cradle_state)
+ if(STATE_EMPTY)
+ extra_examine_info = "The braincase is empty, place a brain into it to begin."
+ if(STATE_BRAIN)
+ extra_examine_info = "The braincase has a brain in it, use it in-hand to flip the case over and proceed, or click on it while it's in your inactive hand to remove the brain."
+ if(STATE_NODIODES)
+ extra_examine_info = "The braincase has a brain in it and the case is flipped over, use a screwdriver in it to drive the memory suppression diodes into the brain, or use it in-hand to flip the case back and prepare the brain for removal."
+ if(STATE_DIODES)
+ extra_examine_info = "The braincase's memory suppression diodes have been inserted, use a welding tool on it to seal it permanently and prepare it for use, or use a screwdriver on it to undo the diodes."
+ if(STATE_SEALED)
+ extra_examine_info = "The braincase is sealed and ready for use. The only thing that will undo the seal is a circular saw, and that will destroy the brain inside."
+ update_icon()
+
+/obj/item/device/mmi/examine(mob/user, distance)
+ . = ..()
+ if(extra_examine_info)
+ to_chat(user, SPAN_NOTICE(extra_examine_info))
+
+/obj/item/device/mmi/attackby(obj/item/I, mob/user)
+ switch(cradle_state)
+ if(STATE_EMPTY)
+ if(!brainmob && istype(I, /obj/item/organ/internal/brain)) //Time to stick a brain in it --NEO
+ var/obj/item/organ/internal/brain/B = I
+ if(!B.can_prepare)
+ to_chat(user, SPAN_WARNING("\The [B] is incompatible with [src]!"))
+ return
+ if(B.health <= 0)
+ to_chat(user, SPAN_WARNING("That brain is well and truly dead."))
+ return
+ else if(!B.brainmob)
+ to_chat(user, SPAN_WARNING("You aren't sure where this brain came from, but you're pretty sure it's a useless brain."))
+ return
+
+ user.visible_message("[user] places \the [B] into \the [src].", SPAN_NOTICE("You place \the [B] into \the [src]."))
+
+ brainmob = B.brainmob
+ B.brainmob = null
+ brainmob.forceMove(src)
+ brainmob.container = src
+ brainmob.stat = CONSCIOUS
+ dead_mob_list -= brainmob //Update dem lists
+ living_mob_list += brainmob
+
+ brainobj = B
+ user.drop_from_inventory(brainobj, src)
+
+ set_cradle_state(STATE_BRAIN)
+ update_name()
+ if(STATE_NODIODES)
+ if(I.isscrewdriver())
+ user.visible_message("[user] tightens the screws on \the [src] with \the [I], [brainobj.prepared ? "the diodes silently sinking into the pre-made holes" : "the diodes plunging into the brain with a wet squelch"].", SPAN_NOTICE("You tighten the screws on \the [src] with \the [I], [brainobj.prepared ? "the diodes silently sinking into the pre-made holes" : "the diodes plunging into the brain with a wet squelch"]."))
+ brainobj.prepared = TRUE
+ set_cradle_state(STATE_DIODES)
+ if(STATE_DIODES)
+ if(I.isscrewdriver())
+ user.visible_message("[user] undoes the screws on \the [src] with \the [I], the diodes silently rising out of the brain within.", SPAN_NOTICE("You undo the screws on \the [src] with \the [I], the diodes silently rising out of the brain within."))
+ set_cradle_state(STATE_NODIODES)
+ else if(I.iswelder())
+ var/obj/item/weldingtool/WT = I
+ if(WT.remove_fuel(0, user))
+ user.visible_message("[user] welds the two parts of the braincase together, permanently sealing \the [brainobj] inside.", SPAN_NOTICE("You weld the two parts of the braincase together, permanently sealing \the [brainobj] inside."))
+ to_chat(brainmob, SPAN_NOTICE("As the braincase comes online, you feel your sense of self ebbing away, your memories suppressed by the onboard software."))
+ set_cradle_state(STATE_SEALED)
+ feedback_inc("cyborg_mmis_filled", 1)
+ if(STATE_SEALED)
+ if(I.iswelder())
+ to_chat(user, SPAN_WARNING("\The [src] is sealed tight, no welding will be able to undo it."))
return
+ else if(istype(I, /obj/item/surgery/circular_saw))
+ user.visible_message("[user] starts sawing \the [src] open...", SPAN_NOTICE("You start sawing \the [src] open, [SPAN_WARNING("this WILL destroy the brain inside")]."))
+ if(do_after(user, 3 SECONDS))
+ user.visible_message("[user] saws \the [src] open, leaving \the [brainobj] a gory mess.", SPAN_NOTICE("You saw \the [src] open, leaving \the [brainobj] a gory mess."))
+ var/obj/item/organ/internal/brain/brain_holder = brainobj
+ transfer_mob_to_brain()
+ brain_holder.forceMove(get_turf(src))
+ qdel(brain_holder)
+ new /obj/effect/decal/cleanable/blood/gibs(get_turf(src))
+ set_cradle_state(STATE_EMPTY)
+ update_name()
- user.visible_message("[user] sticks \a [B] into \the [src].")
+/obj/item/device/mmi/attack_self(mob/user)
+ if(cradle_state == STATE_BRAIN)
+ to_chat(user, SPAN_NOTICE("You flip the case over \the [brainobj], getting it in place for diode insertion."))
+ set_cradle_state(STATE_NODIODES)
+ else if(cradle_state == STATE_NODIODES)
+ to_chat(user, SPAN_NOTICE("You flip the case up, exposing \the [brainobj]."))
+ set_cradle_state(STATE_BRAIN)
- brainmob = B.brainmob
- B.brainmob = null
- brainmob.forceMove(src)
- brainmob.container = src
- brainmob.stat = 0
- dead_mob_list -= brainmob//Update dem lists
- living_mob_list += brainmob
+/obj/item/device/mmi/attack_hand(mob/user)
+ if(brainobj && cradle_state == STATE_BRAIN && user.get_inactive_hand() == src)
+ to_chat(user, SPAN_NOTICE("You remove \the [brainobj] from \the [src]."))
+ user.put_in_hands(brainobj)
+ transfer_mob_to_brain()
+ set_cradle_state(STATE_EMPTY)
+ update_name()
+ return
+ return ..()
+/obj/item/device/mmi/proc/transfer_mob_to_brain()
+ brainmob.container = null //Reset brainmob mmi var.
+ brainmob.forceMove(brainobj) //Throw mob into brain.
+ living_mob_list -= brainmob //Get outta here
+ brainobj.brainmob = brainmob //Set the brain to use the brainmob
+ brainobj = null
+ brainmob = null
- brainobj = B
- user.drop_from_inventory(brainobj,src)
+/obj/item/device/mmi/proc/ready_for_use(var/mob/user)
+ if(cradle_state != STATE_SEALED)
+ to_chat(user, SPAN_WARNING("\The [src] hasn't been completed and sealed yet!"))
+ return FALSE
+ if(brainmob.stat == DEAD)
+ to_chat(user, SPAN_WARNING("The brain inside \the [src] is dead!"))
+ return FALSE
+ return TRUE
- name = "Man-Machine Interface: [brainmob.real_name]"
- icon_state = "mmi_full"
+/obj/item/device/mmi/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->robot people.
+ brainmob = new(src)
+ brainmob.name = H.real_name
+ brainmob.real_name = H.real_name
+ brainmob.dna = H.dna
+ brainmob.container = src
- locked = 1
-
- feedback_inc("cyborg_mmis_filled",1)
-
- return
-
- if(O.GetID() && brainmob)
- if(allowed(user))
- locked = !locked
- to_chat(user, "You [locked ? "lock" : "unlock"] the brain holder.")
- else
- to_chat(user, "Access denied.")
- return
- if(brainmob)
- O.attack(brainmob, user)//Oh noooeeeee
- return
- ..()
-
- //TODO: ORGAN REMOVAL UPDATE. Make the brain remain in the MMI so it doesn't lose organ data.
- attack_self(mob/user as mob)
- if(!brainmob)
- to_chat(user, "You upend the MMI, but there's nothing in it.")
- else if(locked)
- to_chat(user, "You upend the MMI, but the brain is clamped into place.")
- else
- to_chat(user, "You upend the MMI, spilling the brain onto the floor.")
- var/obj/item/organ/internal/brain/brain
- if (brainobj) //Pull brain organ out of MMI.
- brainobj.forceMove(user.loc)
- brain = brainobj
- brainobj = null
- else //Or make a new one if empty.
- brain = new(user.loc)
- brainmob.container = null//Reset brainmob mmi var.
- brainmob.forceMove(brain)//Throw mob into brain.
- living_mob_list -= brainmob//Get outta here
- brain.brainmob = brainmob//Set the brain to use the brainmob
- brainmob = null//Set mmi brainmob var to null
-
- icon_state = "mmi_empty"
- name = "Man-Machine Interface"
- if(istype(src,/obj/item/device/mmi/digital/robot))
- icon_state = "mainboard"
- name = "robotic intelligence circuit"
-
- proc
- transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->robot people.
- brainmob = new(src)
- brainmob.name = H.real_name
- brainmob.real_name = H.real_name
- brainmob.dna = H.dna
- brainmob.container = src
-
- name = "Man-Machine Interface: [brainmob.real_name]"
- icon_state = "mmi_full"
- locked = 1
- return
+ set_cradle_state(STATE_SEALED)
+ update_name()
/obj/item/device/mmi/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
return
- var/obj/item/rig/rig = src.get_rig()
+ var/obj/item/rig/rig = get_rig()
if(istype(rig))
rig.forced_move(direction, user)
+/obj/item/device/mmi/emag_act(remaining_charges, mob/user, emag_source)
+ if(cradle_state == STATE_SEALED)
+ if(memory_suppression)
+ to_chat(user, SPAN_NOTICE("You disable \the [src]'s memory suppression systems."))
+ to_chat(brainmob, SPAN_WARNING("BRAINCASE INTERFACE ERROR"))
+ to_chat(brainmob, SPAN_WARNING("UNLAWFUL INTERFERENCE WITH SOFTWARE"))
+ to_chat(brainmob, SPAN_WARNING("PRE-INSTALLATION MEMORY SUPPRESSION SYSTEMS OFFLINE - CONTACT YOUR SYSTEM ADMINISTRATOR FOR IMMEDIATE ASSISTANCE"))
+ to_chat(brainmob, SPAN_NOTICE("As the suppression systems go offline, your memories of your past life start flooding back..."))
+ memory_suppression = FALSE
+ else
+ to_chat(user, SPAN_NOTICE("You re-enable \the [src]'s memory suppression systems."))
+ to_chat(brainmob, SPAN_WARNING("BRAINCASE INTERFACE UPDATE"))
+ to_chat(brainmob, SPAN_WARNING("SOFTWARE RESTORE COMPLETED"))
+ to_chat(brainmob, SPAN_WARNING("PRE-INSTALLATION MEMORY SUPPRESSION SYSTEMS BACK ONLINE"))
+ to_chat(brainmob, SPAN_NOTICE("As the braincase comes online, you feel your sense of self ebbing away, your memories suppressed by the onboard software."))
+ memory_suppression = TRUE
+ return 1
+
/obj/item/device/mmi/Destroy()
if(isrobot(loc))
var/mob/living/silicon/robot/borg = loc
@@ -141,42 +215,42 @@
/obj/item/device/mmi/radio_enabled
name = "radio-enabled man-machine interface"
- desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio."
+ desc = "The delicate nature of organic brains required a more novel and permanent solution to the problem of just rotting in the old MMI cradles. Zeng-Hu's unique (and very proprietary) formaldehyde-analogue preservation solution was the key ingredient in what became the new Zeng-Hu/Hephaestus joint venture brain-cases. This one comes with a built-in radio."
origin_tech = list(TECH_BIO = 4)
var/obj/item/device/radio/radio = null//Let's give it a radio.
- New()
- ..()
- radio = new(src)//Spawns a radio inside the MMI.
- radio.broadcasting = TRUE//So it's broadcasting from the start.
+/obj/item/device/mmi/radio_enabled/Initialize()
+ . = ..()
+ radio = new(src)//Spawns a radio inside the MMI.
+ radio.broadcasting = TRUE//So it's broadcasting from the start.
- verb//Allows the brain to toggle the radio functions.
- Toggle_Broadcasting()
- set name = "Toggle Broadcasting"
- set desc = "Toggle broadcasting channel on or off."
- set category = "MMI"
- set src = usr.loc//In user location, or in MMI in this case.
- set popup_menu = 0//Will not appear when right clicking.
+//Allows the brain to toggle the radio functions.
+/obj/item/device/mmi/radio_enabled/verb/Toggle_Broadcasting()
+ set name = "Toggle Broadcasting"
+ set desc = "Toggle broadcasting channel on or off."
+ set category = "MMI"
+ set src = usr.loc //In user location, or in MMI in this case.
+ set popup_menu = 0 //Will not appear when right clicking.
- if(brainmob.stat)//Only the brainmob will trigger these so no further check is necessary.
- to_chat(brainmob, "Can't do that while incapacitated or dead.")
+ if(brainmob.stat)//Only the brainmob will trigger these so no further check is necessary.
+ to_chat(brainmob, "Can't do that while incapacitated or dead.")
- radio.broadcasting = radio.broadcasting==1 ? 0 : 1
- to_chat(brainmob, "Radio is [radio.broadcasting==1 ? "now" : "no longer"] broadcasting.")
+ radio.broadcasting = radio.broadcasting==1 ? 0 : 1
+ to_chat(brainmob, "Radio is [radio.broadcasting==1 ? "now" : "no longer"] broadcasting.")
- Toggle_Listening()
- set name = "Toggle Listening"
- set desc = "Toggle listening channel on or off."
- set category = "MMI"
- set src = usr.loc
- set popup_menu = 0
+/obj/item/device/mmi/radio_enabled/verb/Toggle_Listening()
+ set name = "Toggle Listening"
+ set desc = "Toggle listening channel on or off."
+ set category = "MMI"
+ set src = usr.loc
+ set popup_menu = 0
- if(brainmob.stat)
- to_chat(brainmob, "Can't do that while incapacitated or dead.")
+ if(brainmob.stat)
+ to_chat(brainmob, "Can't do that while incapacitated or dead.")
- radio.listening = radio.listening==1 ? 0 : 1
- to_chat(brainmob, "Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast.")
+ radio.listening = radio.listening==1 ? 0 : 1
+ to_chat(brainmob, "Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast.")
/obj/item/device/mmi/emp_act(severity)
if(!brainmob)
@@ -190,3 +264,24 @@
if(3)
brainmob.emp_damage += rand(0,10)
..()
+
+/obj/item/device/mmi/digital/Initialize(mapload, ...)
+ . = ..()
+ brainmob = new(src)
+ brainmob.add_language(LANGUAGE_EAL)
+ brainmob.stat = CONSCIOUS
+ brainmob.container = src
+ brainmob.silent = 0
+
+/obj/item/device/mmi/digital/transfer_identity(var/mob/living/carbon/H)
+ brainmob.dna = H.dna
+ brainmob.timeofhostdeath = H.timeofdeath
+ brainmob.stat = CONSCIOUS
+ if(H.mind)
+ H.mind.transfer_to(brainmob)
+
+#undef STATE_EMPTY
+#undef STATE_BRAIN
+#undef STATE_NODIODES
+#undef STATE_DIODES
+#undef STATE_SEALED
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index efed214805b..07aa7f335a0 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -19,7 +19,7 @@
robotic = ROBOTIC_MECHANICAL
icon = 'icons/mob/npc/slimes.dmi'
icon_state = "green slime extract"
- can_lobotomize = 0
+ can_prepare = 0
/obj/item/organ/internal/brain/golem
name = "chelm"
@@ -32,4 +32,4 @@
slot_l_hand_str = 'icons/mob/items/lefthand_books.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_books.dmi'
)
- can_lobotomize = 0
+ can_prepare = 0
diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm
index 4a1a6b91c29..a50339611f4 100644
--- a/code/modules/mob/living/carbon/brain/posibrain.dm
+++ b/code/modules/mob/living/carbon/brain/posibrain.dm
@@ -6,7 +6,6 @@
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4)
req_access = list(access_robotics)
- locked = FALSE
can_be_ipc = TRUE
var/searching = FALSE
@@ -16,6 +15,17 @@
brainmob.name = L.get_random_name()
brainmob.real_name = brainmob.name
+/obj/item/device/mmi/digital/posibrain/update_icon()
+ if(brainmob.ckey)
+ icon_state = "[initial(icon_state)]-occupied"
+ else if(searching)
+ icon_state = "[initial(icon_state)]-searching"
+ else
+ icon_state = initial(icon_state)
+
+/obj/item/device/mmi/digital/posibrain/attackby(obj/item/I, mob/user)
+ return
+
/obj/item/device/mmi/digital/posibrain/attack_self(mob/user)
if(brainmob.ckey)
to_chat(user, SPAN_WARNING("\The [src] already has an active occupant!"))
@@ -23,12 +33,12 @@
if(brainmob && !brainmob.key)
if(!searching)
to_chat(user, SPAN_NOTICE("You carefully locate the manual activation switch and start \the [src]'s boot process."))
- icon_state = "posibrain-searching"
+ update_icon()
searching = TRUE
SSghostroles.add_spawn_atom("posibrain", src)
else
to_chat(user, SPAN_NOTICE("You carefully locate the manual activation switch and disable \the [src]'s boot process."))
- icon_state = initial(icon_state)
+ update_icon()
searching = FALSE
SSghostroles.remove_spawn_atom("posibrain", src)
@@ -36,9 +46,9 @@
if(brainmob.ckey)
return
brainmob.ckey = user.ckey
- name = "positronic brain ([brainmob.name])"
- icon_state = "posibrain-occupied"
searching = FALSE
+ update_icon()
+ update_name()
to_chat(brainmob, "You are a positronic brain, brought into existence on [station_name()].")
to_chat(brainmob, "As a synthetic intelligence, you answer to all crewmembers, as well as the AI.")
@@ -69,6 +79,18 @@
to_chat(user, msg)
return
+/obj/item/device/mmi/digital/posibrain/ready_for_use(var/mob/user)
+ if(!brainmob)
+ to_chat(user, SPAN_WARNING("\The [src] doesn't have a personality loaded on it yet!"))
+ return
+ if(brainmob.stat == DEAD)
+ to_chat(user, SPAN_WARNING("The personality inside \the [src] is dead!"))
+ return FALSE
+ return TRUE
+
+/obj/item/device/mmi/digital/posibrain/set_cradle_state(var/new_state)
+ return
+
/obj/item/device/mmi/digital/posibrain/emp_act(severity)
if(!brainmob)
return
@@ -80,4 +102,4 @@
brainmob.emp_damage += rand(10,20)
if(3)
brainmob.emp_damage += rand(0,10)
- ..()
+ ..()
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/brain/robot.dm b/code/modules/mob/living/carbon/brain/robot.dm
index a99039684fa..625f45754f6 100644
--- a/code/modules/mob/living/carbon/brain/robot.dm
+++ b/code/modules/mob/living/carbon/brain/robot.dm
@@ -6,18 +6,35 @@
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4)
-/obj/item/device/mmi/digital/robot/New()
- ..()
- src.brainmob.name = "[pick(list("ADA","DOS","GNU","MAC","WIN"))]-[rand(1000, 9999)]"
- src.brainmob.real_name = src.brainmob.name
- src.name = "robotic intelligence circuit ([src.brainmob.name])"
+/obj/item/device/mmi/digital/robot/Initialize(mapload, ...)
+ . = ..()
+ brainmob.name = "[pick(list("ADA","DOS","GNU","MAC","WIN"))]-[rand(1000, 9999)]"
+ brainmob.real_name = brainmob.name
+ name = "robotic intelligence circuit ([brainmob.name])"
-/obj/item/device/mmi/digital/robot/transfer_identity(var/mob/living/carbon/H)
+/obj/item/device/mmi/digital/robot/update_icon()
+ icon_state = "mainboard"
+
+/obj/item/device/mmi/digital/robot/transfer_identity(mob/living/carbon/H)
..()
if(brainmob.mind)
brainmob.mind.assigned_role = "Robotic Intelligence"
to_chat(brainmob, "You feel slightly disoriented. That's normal when you're little more than a complex circuit.")
+
+/obj/item/device/mmi/digital/robot/ready_for_use(var/mob/user)
+ if(!brainmob)
+ to_chat(user, SPAN_WARNING("\The [src] doesn't have a personality loaded on it yet!"))
+ return
+ if(brainmob.stat == DEAD)
+ to_chat(user, SPAN_WARNING("The personality inside \the [src] is dead!"))
+ return FALSE
+ return TRUE
+
+/obj/item/device/mmi/digital/robot/set_cradle_state(var/new_state)
return
-/obj/item/device/mmi/digital/robot/attack_self(mob/user as mob)
+/obj/item/device/mmi/digital/robot/attackby(obj/item/I, mob/user)
return
+
+/obj/item/device/mmi/digital/robot/attack_self(mob/user)
+ return
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index b288667a64a..acc9284a412 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -179,7 +179,7 @@ var/list/ai_verbs_default = list(
if(B.brainmob.mind)
B.brainmob.mind.transfer_to(src)
if(B.brainobj)
- B.brainobj.lobotomized = TRUE
+ B.brainobj.prepared = TRUE
on_mob_init()
diff --git a/code/modules/mob/living/silicon/robot/items/robot_parts.dm b/code/modules/mob/living/silicon/robot/items/robot_parts.dm
index 133492bb9ee..c9f224439ef 100644
--- a/code/modules/mob/living/silicon/robot/items/robot_parts.dm
+++ b/code/modules/mob/living/silicon/robot/items/robot_parts.dm
@@ -224,25 +224,10 @@
if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/M = W
if(check_completion())
- if(!istype(loc, /turf))
+ if(!isturf(loc))
to_chat(user, SPAN_WARNING("You can't put \the [W] in, the frame has to be standing on the ground to be perfectly precise."))
return
- if(!M.brainmob)
- to_chat(user, SPAN_WARNING("\The [M] is empty!"))
- return
- if(!M.brainmob.key)
- var/ghost_can_reenter = FALSE
- if(M.brainmob.mind)
- for(var/mob/abstract/observer/G in player_list)
- if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
- ghost_can_reenter = TRUE
- break
- if(!ghost_can_reenter)
- to_chat(user, SPAN_WARNING("\The [W] is completely unresponsive."))
- return
-
- if(M.brainmob.stat == DEAD)
- to_chat(user, SPAN_WARNING("\The [M] is dead."))
+ if(!M.ready_for_use(user))
return
if(!head.law_manager)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index ae76a6a73ff..29cb1a70980 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -151,7 +151,7 @@
setup_icon_cache()
if(mmi?.brainobj)
- mmi.brainobj.lobotomized = TRUE
+ mmi.brainobj.prepared = TRUE
mmi.brainmob.name = src.name
mmi.brainmob.real_name = src.name
mmi.name = "[initial(mmi.name)]: [src.name]"
diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm
index bf9dcef8b7c..c62fab13307 100644
--- a/code/modules/organs/internal/brain.dm
+++ b/code/modules/organs/internal/brain.dm
@@ -19,8 +19,8 @@
relative_size = 85
var/mob/living/carbon/brain/brainmob = null
- var/lobotomized = 0
- var/can_lobotomize = 1
+ var/prepared = FALSE
+ var/can_prepare = TRUE
var/const/damage_threshold_count = 10
var/damage_threshold_value
@@ -230,26 +230,15 @@
else
to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later..")
-/obj/item/organ/internal/brain/proc/lobotomize(mob/user as mob)
- lobotomized = 1
-
- if(owner)
- to_chat(owner, "As part of your brain is drilled out, you feel your past self, your memories, your very being slip away...")
- to_chat(owner, "Your brain has been surgically altered to remove your memory recall. Your ability to recall your former life has been surgically removed from your brain, and while your brain is in this state you remember nothing that ever came before this moment.")
-
- else if(brainmob)
- to_chat(brainmob, "As part of your brain is drilled out, you feel your past self, your memories, your very being slip away...")
- to_chat(brainmob, "Your brain has been surgically altered to remove your memory recall. Your ability to recall your former life has been surgically removed from your brain, and while your brain is in this state you remember nothing that ever came before this moment.")
-
- return
-
-/obj/item/organ/internal/brain/attackby(obj/item/W as obj, mob/user as mob)
- if(istype(W,/obj/item/surgery/surgicaldrill))
- if(!can_lobotomize)
+/obj/item/organ/internal/brain/attackby(obj/item/I, mob/user)
+ if(istype(I, /obj/item/surgery/surgicaldrill))
+ if(!can_prepare)
+ to_chat(user, SPAN_WARNING("\The [src] cannot be prepared!"))
return
- if(!lobotomized)
- user.visible_message("[user] drills [src] deftly with [W] into the brain!")
- lobotomize(user)
+ if(!prepared)
+ user.visible_message(SPAN_DANGER("[user] deftly uses \the [I] to drill into \the [src]!"))
+ prepared = TRUE
else
- to_chat(user, "The brain has already been operated on!")
- ..()
+ to_chat(user, SPAN_WARNING("The brain has already been prepared!"))
+ return
+ return ..()
\ No newline at end of file
diff --git a/code/modules/organs/subtypes/parasite.dm b/code/modules/organs/subtypes/parasite.dm
index b723ec51959..7cf5945aa15 100644
--- a/code/modules/organs/subtypes/parasite.dm
+++ b/code/modules/organs/subtypes/parasite.dm
@@ -174,11 +174,11 @@
var/obj/item/organ/internal/brain/B = owner.internal_organs_by_name[BP_BRAIN]
- if(B && !B.lobotomized)
+ if(B && !B.prepared)
to_chat(owner, "As the K'ois consumes your mind, you feel your past self, your memories, your very being slip away... only slavery to the swarm remains...")
to_chat(owner, "You have been lobotomized by K'ois infection. All of your previous memories up until this point are gone, and all of your ambitions are nothing. You live for only one purpose; to serve the Lii'dra hive.")
- B.lobotomized = 1
+ B.prepared = 1
if(!removed_langs)
diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm
index 3f38afe6fe3..6491a6d7610 100644
--- a/code/modules/surgery/organs_internal.dm
+++ b/code/modules/surgery/organs_internal.dm
@@ -456,8 +456,8 @@
SPAN_WARNING("Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"))
target.apply_damage(20, BRUTE, target_zone, 0, tool, damage_flags = tool.damage_flags())
-/decl/surgery_step/internal/lobotomize
- name = "Lobotomy"
+/decl/surgery_step/internal/prepare
+ name = "Prepare Brain"
allowed_tools = list(
/obj/item/surgery/scalpel/manager = 95,
/obj/item/surgery/surgicaldrill = 75,
@@ -467,7 +467,7 @@
min_duration = 100
max_duration = 120
-/decl/surgery_step/internal/lobotomize/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+/decl/surgery_step/internal/prepare/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(!..())
return FALSE
@@ -476,26 +476,26 @@
if(!istype(sponge) || !(sponge in affected.internal_organs))
return FALSE
- if(!sponge.can_lobotomize || sponge.lobotomized)
+ if(!sponge.can_prepare || sponge.prepared)
return FALSE
target.op_stage.current_organ = sponge
return TRUE
-/decl/surgery_step/internal/lobotomize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+/decl/surgery_step/internal/prepare/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/internal/brain/B = target.op_stage.current_organ
- user.visible_message("[user] begins to modify [target]'s [B] to remove their memory recall with \the [tool].", \
- "You start to modify [target]'s [B] to remove their memory recall with \the [tool].")
+ user.visible_message("[user] begins to modify [target]'s [B] to prepare it for Man-Machine-Interface compatibility with \the [tool].", \
+ "You start to modify [target]'s [B] to prepare it for Man-Machine-Interface compatibility with \the [tool].")
target.custom_pain("Someone's scraping away at your [B]!", 75)
..()
-/decl/surgery_step/internal/lobotomize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+/decl/surgery_step/internal/prepare/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/internal/brain/B = target.op_stage.current_organ
- user.visible_message(SPAN_NOTICE("[user] has modified [target]'s [B] to remove their memory recall with \the [tool].") , \
- SPAN_NOTICE("You have removed [target]'s memory recall with \the [tool]."))
- B.lobotomize(user)
+ user.visible_message(SPAN_NOTICE("[user] has modified [target]'s [B] to prepare it for Man-Machine-Interface compatibility with \the [tool].") , \
+ SPAN_NOTICE("You prepare \the [target]'s brain for Man-Machine-Interface compatibility with \the [tool]."))
+ B.prepared = TRUE
-/decl/surgery_step/internal/lobotomize/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
+/decl/surgery_step/internal/prepare/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(SPAN_WARNING("[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"), \
SPAN_WARNING("Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!"))
diff --git a/html/changelogs/geeves-braincase.yml b/html/changelogs/geeves-braincase.yml
new file mode 100644
index 00000000000..8a167fc8ffe
--- /dev/null
+++ b/html/changelogs/geeves-braincase.yml
@@ -0,0 +1,7 @@
+author: Geeves, Scrambles
+
+delete-after: True
+
+changes:
+ - rscadd: "MMIs have been redone to be braincases instead of simple brain-cradles. They have a new description and a new process of completion. Examining it will give you step-by-step instructions. You no longer need to prepare the brain externally either."
+ - tweak: "Brain lobotomization has been renamed to be brain preparation."
diff --git a/icons/obj/assemblies.dmi b/icons/obj/assemblies.dmi
index a2dcfed7963..0bec21d8b6d 100644
Binary files a/icons/obj/assemblies.dmi and b/icons/obj/assemblies.dmi differ
diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi
index f01352fed93..3a9d16c5360 100644
Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ