mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
Refactors heart attacks, unbreaks incremental cloning
This commit is contained in:
@@ -249,9 +249,9 @@
|
||||
if(istype(owner, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.stat != DEAD && prob(50 / severity))
|
||||
H.heart_attack = 1
|
||||
H.set_heartattack(TRUE)
|
||||
spawn(600 / severity)
|
||||
H.heart_attack = 0
|
||||
H.set_heartattack(FALSE)
|
||||
if(H.stat == CONSCIOUS)
|
||||
to_chat(H, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ var/list/organ_cache = list()
|
||||
|
||||
/obj/item/organ/internal/heart/emp_act(intensity)
|
||||
if(owner && robotic == 2)
|
||||
owner.heart_attack = 1
|
||||
Stop() // In the name of looooove~!
|
||||
owner.visible_message("<span class='danger'>[owner] clutches their chest and gasps!</span>","<span class='userdanger'>You clutch your chest in pain!</span>")
|
||||
else if(owner && robotic == 1)
|
||||
take_damage(11,1)
|
||||
|
||||
@@ -165,11 +165,9 @@
|
||||
. = ..()
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.stat == DEAD || H.heart_attack)
|
||||
if(H.stat == DEAD)
|
||||
Stop()
|
||||
return
|
||||
if(!special)
|
||||
H.heart_attack = 1
|
||||
|
||||
spawn(120)
|
||||
if(!owner)
|
||||
@@ -183,15 +181,6 @@
|
||||
if(!owner)
|
||||
Stop()
|
||||
|
||||
|
||||
/obj/item/organ/internal/heart/insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(ishuman(M) && beating)
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.heart_attack)
|
||||
H.heart_attack = 0
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/heart/proc/Stop()
|
||||
beating = 0
|
||||
update_icon()
|
||||
|
||||
Reference in New Issue
Block a user