Skip to content

Commit

Permalink
Fixes some heartbeat things we didn't do (tgstation#82327)
Browse files Browse the repository at this point in the history
## About The Pull Request

The things discussed in the comments of tgstation#82305 were not done before it
was merged. Hindsight is 20/20, shoulda drafted it

## Changelog

:cl: Melbret
fix: Revival Surgery, Strange Reagent, and the Reviver Implant will
restart your heart when you are revived
/:cl:
  • Loading branch information
MrMelbert authored Mar 31, 2024
1 parent dcd1725 commit 1250572
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,10 @@

return ..()

/mob/living/carbon/do_strange_reagent_revival(healing_amount)
set_heartattack(FALSE)
return ..()

/mob/living/carbon/can_be_revived()
if(!get_organ_by_type(/obj/item/organ/internal/brain) && (!IS_CHANGELING(src)) || HAS_TRAIT(src, TRAIT_HUSK))
return FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
owner.visible_message(span_warning("[owner]'s body convulses a bit."))
playsound(owner, SFX_BODYFALL, 50, TRUE)
playsound(owner, 'sound/machines/defib_zap.ogg', 75, TRUE, -1)
owner.set_heartattack(FALSE)
owner.revive()
owner.emote("gasp")
owner.set_jitter_if_lower(200 SECONDS)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/surgery/revival.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
target.grab_ghost()
target.adjustOxyLoss(-50, 0)
target.updatehealth()
if(iscarbon(target))
var/mob/living/carbon/carbon_target = target
carbon_target.set_heartattack(FALSE)
if(target.revive())
on_revived(user, target)
return TRUE
Expand Down

0 comments on commit 1250572

Please sign in to comment.