Skip to content

Commit

Permalink
Fixed bug #8651 (#9060)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcatjmeow committed Jun 29, 2020
1 parent 7468c63 commit a580cfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions code/game/objects/items/defib.dm
Expand Up @@ -449,9 +449,8 @@
if((!req_defib && grab_ghost) || (req_defib && defib.grab_ghost))
H.notify_ghost_cloning("Your heart is being defibrillated!")
H.grab_ghost() // Shove them back in their body.
else if(H.can_defib())
else if(H.can_defib(FALSE))
H.notify_ghost_cloning("Your heart is being defibrillated. Re-enter your corpse if you want to be revived!", source = src)

do_help(H, user)

/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/carbon.dm
Expand Up @@ -833,7 +833,7 @@
if(!getorgan(/obj/item/organ/brain) && (!mind || !mind.has_antag_datum(/datum/antagonist/changeling)))
return 0

/mob/living/carbon/proc/can_defib() //yogs start
/mob/living/carbon/proc/can_defib(careAboutGhost = TRUE) //yogs start
if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK)) //can't revive
return FALSE
if((world.time - timeofdeath) > DEFIB_TIME_LIMIT * 10) //too late
Expand All @@ -845,7 +845,7 @@
var/obj/item/organ/brain/BR = getorgan(/obj/item/organ/brain)
if(QDELETED(BR) || BR.brain_death || BR.organ_flags & ORGAN_FAILING || BR.suicided)
return FALSE
if(get_ghost())
if(careAboutGhost && get_ghost())
return FALSE
return TRUE //yogs end

Expand Down

0 comments on commit a580cfa

Please sign in to comment.