Port set_stat and COMSIG_MOB_STATCHANGE from TG

This commit is contained in:
Elizabeth Lavenza
2024-04-13 18:04:11 -04:00
parent dd8c641520
commit 174aca4b01
25 changed files with 47 additions and 33 deletions
+2 -2
View File
@@ -75,7 +75,7 @@
brainmob.forceMove(src)
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
brainmob.set_stat(CONSCIOUS) //we manually revive the brain mob
brainmob.remove_from_dead_mob_list()
brainmob.add_to_alive_mob_list()
@@ -112,7 +112,7 @@
if(brain.brainmob)
brainmob.container = null //Reset brainmob mmi var.
brainmob.forceMove(brain) //Throw mob into brain.
brainmob.stat = DEAD
brainmob.set_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
brain.brainmob = brainmob //Set the brain to use the brainmob
+1 -1
View File
@@ -1,7 +1,7 @@
/mob/living/brain/death(gibbed)
if(stat == DEAD)
return
stat = DEAD
set_stat(DEAD)
if(!gibbed && container)//If not gibbed but in a container.
var/obj/item/mmi = container
+2 -2
View File
@@ -135,7 +135,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
brainmob.stored_dna = new /datum/dna/stored(brainmob)
C.dna.copy_dna(brainmob.stored_dna)
brainmob.timeofhostdeath = C.timeofdeath
brainmob.stat = CONSCIOUS
brainmob.set_stat(CONSCIOUS)
if(brainmob.mind)
brainmob.mind.assigned_role = new_role
if(C.mind)
@@ -158,7 +158,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
name = "[initial(name)] ([brainmob.name])"
to_chat(brainmob, welcome_message)
brainmob.mind.assigned_role = new_role
brainmob.stat = CONSCIOUS
brainmob.set_stat(CONSCIOUS)
brainmob.remove_from_dead_mob_list()
brainmob.add_to_alive_mob_list()