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:
Luc
2023-09-09 21:59:47 -05:00
committed by GitHub
co-authored by Henri215
parent e3eed1d23f
commit d392209cb5
14 changed files with 193 additions and 33 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ REAGENT SCANNER
if(H.timeofdeath && (H.stat == DEAD || (HAS_TRAIT(H, TRAIT_FAKEDEATH))))
to_chat(user, "<span class='notice'>Time of Death: [station_time_timestamp("hh:mm:ss", H.timeofdeath)]</span>")
var/tdelta = round(world.time - H.timeofdeath)
if(tdelta < DEFIB_TIME_LIMIT && !DNR)
if(H.is_revivable() && !DNR)
to_chat(user, "<span class='danger'>Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!</span>")
else
to_chat(user, "<font color='red'>Subject died [DisplayTimeText(tdelta)] ago.</font>")