Reduces Defib Safe Time: Adds Health HUD Defib Indicator

This commit is contained in:
Fox McCloud
2019-02-07 00:49:24 -05:00
parent 316b52b15b
commit dc09d07d86
6 changed files with 19 additions and 2 deletions

View File

@@ -162,6 +162,10 @@ REAGENT SCANNER
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)</span>", 1)
if(M.timeofdeath && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
user.show_message("<span class='notice'>Time of Death: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]</span>")
var/tdelta = round(world.time - M.timeofdeath)
if(tdelta < (DEFIB_TIME_LIMIT * 10))
user.show_message("<span class='danger'>Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!</span>")
if(istype(M, /mob/living/carbon/human) && mode == 1)
var/mob/living/carbon/human/H = M
var/list/damaged = H.get_damaged_organs(1,1)

View File

@@ -357,8 +357,8 @@
QDEL_NULL(ghost)
var/tplus = world.time - H.timeofdeath
var/tlimit = 3000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/tlimit = DEFIB_TIME_LIMIT * 10 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = DEFIB_TIME_LOSS * 10 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
@@ -420,6 +420,8 @@
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
H.med_hud_set_health()
H.med_hud_set_status()
defib.deductcharge(revivecost)
add_attack_logs(user, M, "Revived with [src]")
else