Mob lists
This commit is contained in:
@@ -64,8 +64,8 @@
|
||||
brainmob.container = src
|
||||
if(!(newbrain.organ_flags & ORGAN_FAILING)) // the brain organ hasn't been beaten to death.
|
||||
brainmob.stat = CONSCIOUS //we manually revive the brain mob
|
||||
GLOB.dead_mob_list -= brainmob
|
||||
GLOB.alive_mob_list += brainmob
|
||||
brainmob.remove_from_dead_mob_list()
|
||||
brainmob.add_to_alive_mob_list()
|
||||
|
||||
brainmob.reset_perspective()
|
||||
brain = newbrain
|
||||
@@ -102,8 +102,8 @@
|
||||
brainmob.stat = DEAD
|
||||
brainmob.emp_damage = 0
|
||||
brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision
|
||||
GLOB.alive_mob_list -= brainmob //Get outta here
|
||||
GLOB.dead_mob_list += brainmob
|
||||
brainmob.remove_from_alive_mob_list() //Get outta here
|
||||
brainmob.add_to_dead_mob_list()
|
||||
brain.brainmob = brainmob //Set the brain to use the brainmob
|
||||
brainmob = null //Set mmi brainmob var to null
|
||||
if(user)
|
||||
|
||||
@@ -159,8 +159,8 @@ GLOBAL_VAR(posibrain_notify_cooldown)
|
||||
to_chat(brainmob, welcome_message)
|
||||
brainmob.mind.assigned_role = new_role
|
||||
brainmob.stat = CONSCIOUS
|
||||
GLOB.dead_mob_list -= brainmob
|
||||
GLOB.alive_mob_list += brainmob
|
||||
brainmob.remove_from_dead_mob_list()
|
||||
brainmob.add_to_alive_mob_list()
|
||||
|
||||
visible_message(new_mob_message)
|
||||
check_success()
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
I.on_mob_death(src, gibbed)
|
||||
if(mind)
|
||||
mind.store_memory("Time of death: [tod]", 0)
|
||||
GLOB.alive_mob_list -= src
|
||||
remove_from_alive_mob_list()
|
||||
if(!gibbed)
|
||||
GLOB.dead_mob_list += src
|
||||
add_to_dead_mob_list()
|
||||
if(ckey)
|
||||
var/datum/preferences/P = GLOB.preferences_datums[ckey]
|
||||
if(P)
|
||||
|
||||
@@ -589,8 +589,8 @@
|
||||
if(full_heal)
|
||||
fully_heal(admin_revive)
|
||||
if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain)
|
||||
GLOB.dead_mob_list -= src
|
||||
GLOB.alive_mob_list += src
|
||||
remove_from_dead_mob_list()
|
||||
add_to_alive_mob_list()
|
||||
suiciding = 0
|
||||
stat = UNCONSCIOUS //the mob starts unconscious,
|
||||
if(!eye_blind)
|
||||
@@ -1289,11 +1289,11 @@
|
||||
return FALSE
|
||||
if(NAMEOF(src, stat))
|
||||
if((stat == DEAD) && (var_value < DEAD))//Bringing the dead back to life
|
||||
GLOB.dead_mob_list -= src
|
||||
GLOB.alive_mob_list += src
|
||||
remove_from_dead_mob_list()
|
||||
add_to_alive_mob_list()
|
||||
if((stat < DEAD) && (var_value == DEAD))//Kill he
|
||||
GLOB.alive_mob_list -= src
|
||||
GLOB.dead_mob_list += src
|
||||
remove_from_alive_mob_list()
|
||||
add_to_dead_mob_list()
|
||||
if(NAMEOF(src, health)) //this doesn't work. gotta use procs instead.
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
clear_fullscreens()
|
||||
|
||||
//New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here.
|
||||
GLOB.alive_mob_list -= src
|
||||
remove_from_alive_mob_list()
|
||||
ghostize()
|
||||
qdel(src)
|
||||
|
||||
@@ -95,8 +95,8 @@
|
||||
if(mmi.brainmob)
|
||||
if(mmi.brainmob.stat == DEAD)
|
||||
mmi.brainmob.stat = CONSCIOUS
|
||||
GLOB.dead_mob_list -= mmi.brainmob
|
||||
GLOB.alive_mob_list += mmi.brainmob
|
||||
mmi.brainmob.remove_from_dead_mob_list()
|
||||
mmi.brainmob.add_to_alive_mob_list()
|
||||
mind.transfer_to(mmi.brainmob)
|
||||
mmi.update_icon()
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user