Merge pull request #12624 from Citadel-Station-13/policy
policy configuration & support hooks for clone memory disorder
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
playsound(get_turf(target), 'sound/magic/lightningbolt.ogg', 50, 1)
|
||||
target.adjustOxyLoss(-50, 0)
|
||||
target.updatehealth()
|
||||
var/tplus = world.time - target.timeofdeath
|
||||
if(target.revive())
|
||||
user.visible_message("...[target] wakes up, alive and aware!", "<span class='notice'><b>IT'S ALIVE!</b></span>")
|
||||
target.visible_message("...[target] wakes up, alive and aware!")
|
||||
@@ -68,6 +69,13 @@
|
||||
for(var/obj/item/organ/O in target.internal_organs)//zap those buggers back to life!
|
||||
if(O.organ_flags & ORGAN_FAILING)
|
||||
O.applyOrganDamage(-5)
|
||||
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(target, policy)
|
||||
target.log_message("revived using surgical revival, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
|
||||
return TRUE
|
||||
else
|
||||
user.visible_message("...[target.p_they()] convulses, then lies still.")
|
||||
|
||||
Reference in New Issue
Block a user