mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 18:47:20 +01:00
This is a merged port from /tg/station and Virgo on logging standards. The diary has been replaced with GLOB.world_game_log, diaryofmeanpeople is gone (because it wasn't actually used) and a whole bunch of logging procs have been changed to optimize Splunk.
63 lines
1.7 KiB
Plaintext
63 lines
1.7 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>")
|
|
log_game("[key_name(src)] fell unconscious at [atom_loc_line(get_turf(src))]")
|
|
stat = UNCONSCIOUS
|
|
if(updating)
|
|
// update_blind_effects()
|
|
update_canmove()
|
|
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>")
|
|
log_game("[key_name(src)] woke up at [atom_loc_line(get_turf(src))]")
|
|
stat = CONSCIOUS
|
|
if(updating)
|
|
// update_blind_effects()
|
|
update_canmove()
|
|
return 1
|
|
|
|
/mob/living/proc/can_be_revived()
|
|
. = TRUE
|
|
// if(health <= min_health)
|
|
if(health <= config.health_threshold_dead)
|
|
return FALSE
|
|
|
|
// 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
|
|
if(!can_be_revived())
|
|
return 0
|
|
create_attack_log("<font color='red'>Came back to life at [atom_loc_line(get_turf(src))]</font>")
|
|
log_game("[key_name(src)] came back to life at [atom_loc_line(get_turf(src))]")
|
|
stat = CONSCIOUS
|
|
dead_mob_list -= src
|
|
living_mob_list += src
|
|
timeofdeath = null
|
|
if(updating)
|
|
update_canmove()
|
|
// update_blind_effects()
|
|
updatehealth()
|
|
|
|
for(var/s in ownedSoullinks)
|
|
var/datum/soullink/S = s
|
|
S.ownerRevives(src)
|
|
for(var/s in sharedSoullinks)
|
|
var/datum/soullink/S = s
|
|
S.sharerRevives(src)
|
|
return 1
|