Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #8651 - Defibs now alert ghosts! #9060

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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