Braining/debraining fixes
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
|
||||
if(stat!=DEAD) //If not dead.
|
||||
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
if(mind) //You aren't allowed to return to brains that don't exist
|
||||
mind.current = null
|
||||
ghostize() //Ghostize checks for key so nothing else is necessary.
|
||||
container = null
|
||||
return ..()
|
||||
|
||||
@@ -7,16 +7,29 @@
|
||||
layer = ABOVE_MOB_LAYER
|
||||
zone = "head"
|
||||
slot = "brain"
|
||||
vital = 1
|
||||
vital = TRUE
|
||||
origin_tech = "biotech=5"
|
||||
attack_verb = list("attacked", "slapped", "whacked")
|
||||
var/mob/living/brain/brainmob = null
|
||||
var/damaged_brain = FALSE //whether the brain organ is damaged.
|
||||
var/decoy_override = FALSE //I apologize to the security players, and myself, who abused this, but this is going to go.
|
||||
|
||||
/obj/item/organ/brain/changeling_brain
|
||||
vital = FALSE
|
||||
decoy_override = TRUE
|
||||
|
||||
/obj/item/organ/brain/Insert(mob/living/carbon/C, special = 0)
|
||||
..()
|
||||
|
||||
name = "brain"
|
||||
|
||||
if(C.mind && C.mind.changeling) //congrats, you're trapped in a body you don't control
|
||||
if(brainmob && !(C.stat == DEAD || (C.status_flags & FAKEDEATH)))
|
||||
to_chat(brainmob, "<span class = danger>You can't feel your body! You're still just a brain!</span>")
|
||||
loc = C
|
||||
C.update_hair()
|
||||
return
|
||||
|
||||
if(brainmob)
|
||||
if(C.key)
|
||||
C.ghostize()
|
||||
@@ -26,7 +39,7 @@
|
||||
else
|
||||
C.key = brainmob.key
|
||||
|
||||
qdel(brainmob)
|
||||
QDEL_NULL(brainmob)
|
||||
|
||||
//Update the body's icon so it doesnt appear debrained anymore
|
||||
C.update_hair()
|
||||
@@ -37,7 +50,7 @@
|
||||
if(C.has_brain_worms())
|
||||
var/mob/living/simple_animal/borer/B = C.has_brain_worms()
|
||||
B.leave_victim() //Should remove borer if the brain is removed - RR
|
||||
transfer_identity(C)
|
||||
transfer_identity(C)
|
||||
C.update_hair()
|
||||
|
||||
/obj/item/organ/brain/prepare_eat()
|
||||
@@ -45,6 +58,8 @@
|
||||
|
||||
/obj/item/organ/brain/proc/transfer_identity(mob/living/L)
|
||||
name = "[L.name]'s brain"
|
||||
if(brainmob || decoy_override)
|
||||
return
|
||||
brainmob = new(src)
|
||||
brainmob.name = L.real_name
|
||||
brainmob.real_name = L.real_name
|
||||
@@ -54,7 +69,7 @@
|
||||
if(!brainmob.stored_dna)
|
||||
brainmob.stored_dna = new /datum/dna/stored(brainmob)
|
||||
C.dna.copy_dna(brainmob.stored_dna)
|
||||
if(L.mind && L.mind.current && (L.mind.current.stat == DEAD))
|
||||
if(L.mind && L.mind.current)
|
||||
L.mind.transfer_to(brainmob)
|
||||
to_chat(brainmob, "<span class='notice'>You feel slightly disoriented. That's normal when you're just a brain.</span>")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user