mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Add check forposibrain without brainmob
This should never happen, but check nonetheless.
This commit is contained in:
@@ -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 = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
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
|
||||
|
||||
..()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user