Skip to content

Commit

Permalink
makes defibrillation grab ghost (#12778)
Browse files Browse the repository at this point in the history
* l + ratio

* Update defibrillator.dm

* ok
  • Loading branch information
mc-oofert authored May 7, 2023
1 parent f9e1000 commit 34731a0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions code/game/objects/items/defibrillator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
stack_trace("Powercell deleted while powering the defib, this isn't supposed to happen normally.")
set_dcell(null)


/mob/living/proc/get_ghost()
if(client) //Let's call up the correct ghost!
return null
Expand All @@ -140,7 +139,6 @@
return ghost
return null


/mob/living/carbon/human/proc/has_working_organs()
var/datum/internal_organ/heart/heart = internal_organs_by_name["heart"]

Expand Down Expand Up @@ -196,10 +194,10 @@
if((H.wear_suit && H.wear_suit.flags_atom & CONDUCT))
user.visible_message(span_warning("[icon2html(src, viewers(user))] \The [src] buzzes: Paddles registering >100,000 ohms, Possible cause: Suit or Armor interferring."))
return

var/mob/dead/observer/G = H.get_ghost()
if(istype(G))
notify_ghost(G, "<font size=3>Someone is trying to revive your body. Return to it if you want to be resurrected!</font>", ghost_sound = 'sound/effects/gladosmarinerevive.ogg', enter_text = "Enter", enter_link = "reentercorpse=1", source = H, action = NOTIFY_JUMP)
if(G)
G.reenter_corpse()
else if(!H.client)
//We couldn't find a suitable ghost, this means the person is not returning
user.visible_message(span_warning("[icon2html(src, viewers(user))] \The [src] buzzes: Patient has a DNR."))
Expand Down

0 comments on commit 34731a0

Please sign in to comment.