From ca4eb6431bde6932cd1f868cd1387260249eb76c Mon Sep 17 00:00:00 2001 From: Jupotter Date: Sat, 13 Apr 2013 11:58:58 +0300 Subject: [PATCH] Add check forposibrain without brainmob This should never happen, but check nonetheless. --- code/modules/mob/living/carbon/brain/posibrain.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 761029c7b1f..1bc59497ebc 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -17,7 +17,7 @@ attack_self(mob/user as mob) - if(!brainmob.key && searching == 0) + if(!brainmob && !brainmob.key && searching == 0) //Start the process of searching for a new user. user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process." icon_state = "posibrain-searching" @@ -65,7 +65,7 @@ proc/reset_search() //We give the players sixty seconds to decide, then reset the timer. - if(src.brainmob.key) return + if(src.brainmob && src.brainmob.key) return src.searching = 0 icon_state = "posibrain" @@ -86,7 +86,7 @@ var/msg = "*---------*\nThis is \icon[src] \a [src]!\n[desc]\n" msg += "" - if(src.brainmob.key) + if(src.brainmob && src.brainmob.key) switch(src.brainmob.stat) if(CONSCIOUS) if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk @@ -124,4 +124,4 @@ src.brainmob.brain_op_stage = 4.0 dead_mob_list -= src.brainmob - ..() \ No newline at end of file + ..()