Skip to content

Commit

Permalink
early returns
Browse files Browse the repository at this point in the history
  • Loading branch information
kiVts committed Oct 9, 2023
1 parent 7b1dd31 commit 3c29951
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions code/modules/reagents/chemistry_properties/prop_positive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,15 @@
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, BURN)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, TOX)
dead.apply_damage(-potency * POTENCY_MULTIPLIER_VLOW, CLONE)
if(dead.health > HEALTH_THRESHOLD_DEAD && COOLDOWN_FINISHED(src, ghost_notif))
var/mob/dead/observer/ghost = dead.get_ghost()
if(ghost?.client)
COOLDOWN_START(src, ghost_notif, 30 SECONDS)
playsound_client(ghost.client, 'sound/effects/adminhelp_new.ogg')
to_chat(ghost, SPAN_BOLDNOTICE("Your heart is struggling to pump! There is a chance you might get up!(Verbs -> Ghost -> Re-enter corpse, or <a href='?src=\ref[ghost];reentercorpse=1'>click here!</a>)"))
if(dead.health < HEALTH_THRESHOLD_DEAD)
return
if(!COOLDOWN_FINISHED(src, ghost_notif))
return
var/mob/dead/observer/ghost = dead.get_ghost()
if(ghost?.client)
COOLDOWN_START(src, ghost_notif, 30 SECONDS)
playsound_client(ghost.client, 'sound/effects/adminhelp_new.ogg')
to_chat(ghost, SPAN_BOLDNOTICE("Your heart is struggling to pump! There is a chance you might get up!(Verbs -> Ghost -> Re-enter corpse, or <a href='?src=\ref[ghost];reentercorpse=1'>click here!</a>)"))
return TRUE

/datum/chem_property/positive/hyperdensificating
Expand Down

0 comments on commit 3c29951

Please sign in to comment.