Files
Paradise/code/modules/mob/living/stat_states.dm
T
moxianandGitHub e5548b92b9 Removes obsolete check in update_revive (thus fixing SR revival of people dead to tox) (#17907)
* Make SR usable for reviving people dead to tox

* Remove effectively-unreachable drone can_be_revive override
2022-06-09 15:48:35 +01:00

69 lines
2.0 KiB
Plaintext

// There, now `stat` is a proper state-machine
/mob/living/proc/KnockOut(updating = 1)
if(stat == DEAD)
log_runtime(EXCEPTION("KnockOut called on a dead mob."), src)
return 0
else if(stat == UNCONSCIOUS)
return 0
create_attack_log("<font color='red'>Fallen unconscious at [atom_loc_line(get_turf(src))]</font>")
add_attack_logs(src, null, "Fallen unconscious", ATKLOG_ALL)
log_game("[key_name(src)] fell unconscious at [atom_loc_line(get_turf(src))]")
stat = UNCONSCIOUS
if(updating)
update_sight()
update_blind_effects()
update_canmove()
set_typing_indicator(FALSE)
return 1
/mob/living/proc/WakeUp(updating = 1)
if(stat == DEAD)
log_runtime(EXCEPTION("WakeUp called on a dead mob."), src)
return 0
else if(stat == CONSCIOUS)
return 0
create_attack_log("<font color='red'>Woken up at [atom_loc_line(get_turf(src))]</font>")
add_attack_logs(src, null, "Woken up", ATKLOG_ALL)
log_game("[key_name(src)] woke up at [atom_loc_line(get_turf(src))]")
stat = CONSCIOUS
if(updating)
update_sight()
update_blind_effects()
update_canmove()
return 1
// death() is used to make a mob die
// handles revival through other means than cloning or adminbus (defib, IPC repair)
/mob/living/proc/update_revive(updating = TRUE)
if(stat != DEAD)
return 0
create_attack_log("<font color='red'>Came back to life at [atom_loc_line(get_turf(src))]</font>")
add_attack_logs(src, null, "Came back to life", ATKLOG_ALL)
log_game("[key_name(src)] came back to life at [atom_loc_line(get_turf(src))]")
stat = CONSCIOUS
GLOB.dead_mob_list -= src
GLOB.alive_mob_list |= src
if(mind)
remove_from_respawnable_list()
timeofdeath = null
if(updating)
update_canmove()
update_blind_effects()
update_sight()
updatehealth("update revive")
hud_used?.reload_fullscreen()
SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, updating)
if(mind)
for(var/S in mind.spell_list)
var/obj/effect/proc_holder/spell/spell = S
spell.updateButtonIcon()
return 1
/mob/living/proc/check_death_method()
return TRUE