Skip to content

Commit

Permalink
Merge pull request Baystation12#9288 from Techhead0/braincase
Browse files Browse the repository at this point in the history
  • Loading branch information
comma committed May 16, 2015
2 parents aace1ab + ec37652 commit 0dc291f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions code/modules/mob/living/carbon/brain/MMI.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

var/locked = 0
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/obj/item/organ/brain/brainobj = null //The current brain organ.
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.

Expand All @@ -61,7 +62,8 @@
living_mob_list += brainmob

user.drop_item()
del(O)
brainobj = O
brainobj.loc = src

name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
Expand Down Expand Up @@ -92,7 +94,13 @@
user << "\red You upend the MMI, but the brain is clamped into place."
else
user << "\blue You upend the MMI, spilling the brain onto the floor."
var/obj/item/organ/brain/brain = new(user.loc)
var/obj/item/organ/brain/brain
if (brainobj) //Pull brain organ out of MMI.
brainobj.loc = 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.loc = brain//Throw mob into brain.
living_mob_list -= brainmob//Get outta here
Expand Down

0 comments on commit 0dc291f

Please sign in to comment.