mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Simplify and cleanup IPC/defib revival after messy fixes
This commit is contained in:
@@ -330,13 +330,10 @@
|
||||
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/ping.ogg', 50, 0)
|
||||
H.stat = 1
|
||||
if(H in dead_mob_list)
|
||||
dead_mob_list -= H
|
||||
living_mob_list += H
|
||||
H.revive()
|
||||
H.emote("gasp")
|
||||
if(tplus > tloss)
|
||||
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
|
||||
H.updatehealth()
|
||||
defib.deductcharge(revivecost)
|
||||
add_logs(user, M, "revived", object="defibrillator")
|
||||
else
|
||||
|
||||
@@ -16,26 +16,20 @@
|
||||
if (species.flags & IS_SYNTHETIC)
|
||||
var/datum/organ/external/H = organs_by_name["head"]
|
||||
if (!H.amputated)
|
||||
if ((health >= (config.health_threshold_dead/100*75)) && stat == DEAD) //need to get them 25% away from death point before reviving them
|
||||
living_mob_list -= src
|
||||
mob_list -= src
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
mob_list += src
|
||||
stat = CONSCIOUS
|
||||
ear_deaf = 0
|
||||
tod = 0
|
||||
timeofdeath = 0
|
||||
if ((health >= (config.health_threshold_dead/100*75)) && stat == DEAD) //need to get them 25% away from death point before reviving synthetics
|
||||
revive()
|
||||
if (stat == CONSCIOUS && (src in dead_mob_list)) //Defib fix
|
||||
living_mob_list -= src
|
||||
mob_list -= src
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
mob_list += src
|
||||
ear_deaf = 0
|
||||
tod = 0
|
||||
timeofdeath = 0
|
||||
revive()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/revive() // handles revival through other means that cloning (defib, IPC repair)
|
||||
stat = CONSCIOUS
|
||||
dead_mob_list -= src
|
||||
living_mob_list |= src
|
||||
mob_list |= src
|
||||
ear_deaf = 0
|
||||
tod = 0
|
||||
timeofdeath = 0
|
||||
|
||||
/mob/living/carbon/human/getBrainLoss()
|
||||
if(species && species.flags & NO_INTORGANS) return
|
||||
|
||||
Reference in New Issue
Block a user