Adds the recommended fixes

This commit is contained in:
Crazylemon64
2016-02-19 20:42:25 -08:00
parent 18cc737c0f
commit ae3ab870f8
+15 -5
View File
@@ -342,9 +342,11 @@
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(!ghost.client)
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H,key = ghost.key
log_to_dd("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost.")
qdel(ghost)
ghost = null
var/tplus = world.time - H.timeofdeath
@@ -393,7 +395,7 @@
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed: Patient's brain is unresponsive</span>")
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
ghost << "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)"
ghost << sound('sound/effects/genetics.ogg')
else
@@ -467,6 +469,13 @@
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H,key = ghost.key
log_to_dd("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost.")
qdel(ghost)
ghost = null
var/tplus = world.time - H.timeofdeath
var/tlimit = 6000 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 3000 //brain damage starts setting in on the patient after some time left rotting
@@ -504,11 +513,12 @@
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
ghost << "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)"
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed.</span>")
if(ghost)
ghost << "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)"
ghost << sound('sound/effects/genetics.ogg')
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
if(isrobot(user))
var/mob/living/silicon/robot/R = user