mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-27 01:41:50 +00:00
Reduces Defib Safe Time: Adds Health HUD Defib Indicator
This commit is contained in:
@@ -391,3 +391,7 @@
|
||||
#define MOUSE_OPACITY_TRANSPARENT 0
|
||||
#define MOUSE_OPACITY_ICON 1
|
||||
#define MOUSE_OPACITY_OPAQUE 2
|
||||
|
||||
// Defib stats
|
||||
#define DEFIB_TIME_LIMIT 120
|
||||
#define DEFIB_TIME_LOSS 60
|
||||
@@ -164,6 +164,11 @@
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
var/mob/living/simple_animal/borer/B = has_brain_worms()
|
||||
if(stat == DEAD || (status_flags & FAKEDEATH))
|
||||
if(timeofdeath)
|
||||
var/tdelta = round(world.time - timeofdeath)
|
||||
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
holder.icon_state = "huddefib"
|
||||
return
|
||||
holder.icon_state = "huddead"
|
||||
else if(status_flags & XENO_HOST)
|
||||
holder.icon_state = "hudxeno"
|
||||
|
||||
@@ -162,6 +162,10 @@ REAGENT SCANNER
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
if(!gibbed && !QDELETED(src))
|
||||
addtimer(CALLBACK(src, .proc/med_hud_set_status), (DEFIB_TIME_LIMIT * 10) + 1)
|
||||
callHook("death", list(src, gibbed))
|
||||
|
||||
for(var/s in ownedSoullinks)
|
||||
|
||||
Reference in New Issue
Block a user