fixes the signed up icon not getting updated when a new poll is polled (#23961)

This commit is contained in:
GDN
2024-02-06 18:27:02 +00:00
committed by GitHub
parent 3377f181cb
commit 877b3b38f7
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -652,7 +652,7 @@ so as to remain in compliance with the most up-to-date laws."
success = poll.sign_up(G)
if(success)
// Add a small overlay to indicate we've signed up
update_signed_up_alert()
update_signed_up_alert(usr)
else if(target)
switch(action)
if(NOTIFY_ATTACK)
@@ -682,14 +682,14 @@ so as to remain in compliance with the most up-to-date laws."
poll.remove_candidate(G)
else
poll.sign_up(G)
update_signed_up_alert()
update_signed_up_alert(G)
/obj/screen/alert/notify_action/proc/update_signed_up_alert()
/obj/screen/alert/notify_action/proc/update_signed_up_alert(mob/user)
if(!signed_up_overlay)
signed_up_overlay = image('icons/mob/screen_gen.dmi', icon_state = "selector")
signed_up_overlay.layer = FLOAT_LAYER
signed_up_overlay.plane = FLOAT_PLANE + 2
if(usr in poll.signed_up)
if(user in poll.signed_up)
overlays += signed_up_overlay
else
overlays -= signed_up_overlay
+1 -1
View File
@@ -96,7 +96,7 @@ SUBSYSTEM_DEF(ghost_spawns)
if(P != P2 && P.hash == P2.hash)
// If there's already a poll for an identical mob type ongoing and the client is signed up for it, sign them up for this one
if(!inherited_sign_up && (M in P2.signed_up) && P.sign_up(M, TRUE))
A.update_signed_up_alert()
A.update_signed_up_alert(M)
inherited_sign_up = TRUE
// This number is used to display the number of polls the alert regroups
num_stack++