Skip to content

Commit

Permalink
Fixes the "You are Dead" tgui window popup (#2697)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaFire15 authored Aug 24, 2024
1 parent ff1c153 commit f2b6a99
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/modules/mob/dead/observer/logout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
update_z(null)
if (client)
client.images -= (GLOB.ghost_images_default+GLOB.ghost_images_simple)
client.tgui_panel?.clear_dead_popup()
//client.tgui_panel?.clear_dead_popup() - NSV13 - commented out because this is a bad place to do that and also client is commonly already gone when this proc is called.

if(observetarget)
if(ismob(observetarget))
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,10 @@
for(var/S in mind.spell_list)
var/obj/effect/proc_holder/spell/spell = S
spell.updateButtonIcon()
//NSV13 - clear that popup.
if(client)
client.tgui_panel?.clear_dead_popup()
//NSV13 end.

/mob/living/proc/remove_CC(should_update_mobility = TRUE)
SetStun(0, FALSE)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/living/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@
var/datum/antagonist/hivemind/hivemind = mind.has_antag_datum(/datum/antagonist/hivemind)
if(hivemind)
hivemind.regain_images()
//NSV13 - clear the dead alert.
if(stat != DEAD)
client?.tgui_panel?.clear_dead_popup()
//NSV13 end.
6 changes: 5 additions & 1 deletion code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,11 @@
///Force get the ghost from the mind
/mob/proc/grab_ghost(force)
if(mind)
return mind.grab_ghost(force = force)
//NSV13 - clear dead popup if alive.
. = mind.grab_ghost(force = force)
if(stat != DEAD && client)
client.tgui_panel?.clear_dead_popup()
//NSV13 end

///Notify a ghost that it's body is being cloned
/mob/proc/notify_ghost_cloning(var/message = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!", var/sound = 'sound/effects/genetics.ogg', var/atom/source = null, flashwindow)
Expand Down

0 comments on commit f2b6a99

Please sign in to comment.