mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Reworks CPR, allowing it to extend defibrillation time (#21754)
* Update traditional CPR to loop automatically * Implement most of the base stuff * Bring over most defib changes so far * Checks and fixes * cleans up some leftovers, getting it ready for review * Little bit of IPC flavor * excludes non oxy-breathers, sorry! * Better rescue breath handling * Refactor revivability into a status effect * Adds a little bit of feedback * Removes the original variables * Allows for CPR to activate cavity bombs * Update code/modules/mob/living/carbon/human/human_mob.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * snake case time * breathid instead * remove unused proc --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
@@ -243,7 +243,7 @@
|
||||
// Run through some quick failure states after shocking.
|
||||
var/time_dead = world.time - target.timeofdeath
|
||||
|
||||
if(time_dead > DEFIB_TIME_LIMIT)
|
||||
if(!target.is_revivable())
|
||||
user.visible_message("<span class='boldnotice'>[defib_ref] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
|
||||
defib_success = FALSE
|
||||
else if(target.getBruteLoss() >= 180 || target.getFireLoss() >= 180)
|
||||
@@ -280,7 +280,7 @@
|
||||
target.adjustBruteLoss(-heal_amount)
|
||||
|
||||
// Inflict some brain damage scaling with time spent dead
|
||||
var/defib_time_brain_damage = min(100 * time_dead / DEFIB_TIME_LIMIT, 99) // 20 from 1 minute onward, +20 per minute up to 99
|
||||
var/defib_time_brain_damage = min(100 * time_dead / BASE_DEFIB_TIME_LIMIT, 99) // 20 from 1 minute onward, +20 per minute up to 99
|
||||
if(time_dead > DEFIB_TIME_LOSS && defib_time_brain_damage > target.getBrainLoss())
|
||||
target.setBrainLoss(defib_time_brain_damage)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user