policies and code hooks

This commit is contained in:
silicons
2020-06-26 23:41:44 -07:00
parent ea57a84eb8
commit 0df5aa083b
7 changed files with 42 additions and 1 deletions
@@ -928,10 +928,17 @@
M.adjustOxyLoss(-20, 0)
M.adjustToxLoss(-20, 0)
M.updatehealth()
var/tplus = world.time - M.timeofdeath
if(M.revive())
M.grab_ghost()
M.emote("gasp")
log_combat(M, M, "revived", src)
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
var/timelimit = CONFIG_GET(number/defib_cmd_time_limit)
var/late = timelimit && (tplus > timelimit)
var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
if(policy)
to_chat(occupant, policy)
..()