mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 12:47:16 +01:00
QoL: Stasis and Defibs
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>\The [user] sticks \a [O] into \the [src].</span>")
|
||||
B.preserved = TRUE
|
||||
|
||||
brainmob = B.brainmob
|
||||
B.brainmob = null
|
||||
@@ -108,6 +109,7 @@
|
||||
brainobj = null
|
||||
else //Or make a new one if empty.
|
||||
brain = new(user.loc)
|
||||
brain.preserved = FALSE
|
||||
brainmob.container = null//Reset brainmob mmi var.
|
||||
brainmob.loc = brain//Throw mob into brain.
|
||||
living_mob_list -= brainmob//Get outta here
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
if(!client)
|
||||
species.handle_npc(src)
|
||||
|
||||
else if(stat == DEAD && !stasis)
|
||||
handle_defib_timer()
|
||||
|
||||
if(!handle_some_updates())
|
||||
return //We go ahead and process them 5 times for HUD images and other stuff though.
|
||||
|
||||
@@ -1826,5 +1829,15 @@
|
||||
traumatic_shock = 0
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/handle_defib_timer()
|
||||
if(!should_have_organ(O_BRAIN))
|
||||
return // No brain.
|
||||
|
||||
var/obj/item/organ/internal/brain/brain = internal_organs_by_name[O_BRAIN]
|
||||
if(!brain)
|
||||
return // Still no brain.
|
||||
|
||||
brain.tick_defib_timer()
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
|
||||
Reference in New Issue
Block a user