Merge pull request #12624 from Citadel-Station-13/policy

policy configuration & support hooks for clone memory disorder
This commit is contained in:
Lin
2020-07-11 16:40:38 -05:00
committed by GitHub
10 changed files with 71 additions and 0 deletions

View File

@@ -411,6 +411,11 @@
to_chat(occupant, "<span class='notice'><b>There is a bright flash!</b><br><i>You feel like a new being.</i></span>")
mob_occupant.flash_act()
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
var/policy = policies[POLICYCONFIG_ON_CLONE]
if(policy)
to_chat(occupant, policy)
occupant.log_message("revived using cloning.", LOG_GAME)
mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, mob_occupant.getCloneLoss())
occupant.forceMove(T)

View File

@@ -619,6 +619,13 @@
if(req_defib)
if(defib.healdisk)
H.heal_overall_damage(25, 25)
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(H, policy)
H.log_message("revived using a defibrillator, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
if(req_defib)
defib.deductcharge(revivecost)
cooldown = 1