From 460afbc8460d991d786d52a4edf88374b94f4c8b Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:00:18 +0300 Subject: [PATCH] [MIRROR] [no gbp] poll completion follow link points to current client mob (#1647) (#2575) * [no gbp] poll completion follow link points to current client mob (#82222) ## About The Pull Request Previously the follow link before the name didn't work because by the time you clicked it, the old mob it referenced was gone ## Changelog :cl: fix: the follow link upon poll completion should work properly now /:cl: --------- * [no gbp] poll completion follow link points to current client mob --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: 13spacemen <46101244+13spacemen@users.noreply.github.com> Co-authored-by: san7890 --- code/datums/candidate_poll.dm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/datums/candidate_poll.dm b/code/datums/candidate_poll.dm index fc86d70f546..f1fa9812014 100644 --- a/code/datums/candidate_poll.dm +++ b/code/datums/candidate_poll.dm @@ -138,8 +138,7 @@ /datum/candidate_poll/proc/announce_chosen(list/poll_recipients) if(!length(chosen_candidates)) return - for(var/mob/poll_recipient as anything in poll_recipients) - for(var/mob/chosen as anything in chosen_candidates) - if(isnull(chosen)) - continue - to_chat(poll_recipient, span_ooc("[isobserver(poll_recipient) ? FOLLOW_LINK(poll_recipient, chosen) : null][span_warning(" [full_capitalize(role)] Poll: ")][key_name(chosen, include_name = FALSE)] was selected.")) + for(var/mob/chosen in chosen_candidates) + var/client/chosen_client = chosen.client + for(var/mob/poll_recipient as anything in poll_recipients) + to_chat(poll_recipient, span_ooc("[isobserver(poll_recipient) ? FOLLOW_LINK(poll_recipient, chosen_client.mob) : null][span_warning(" [full_capitalize(role)] Poll: ")][key_name(chosen_client, include_name = FALSE)] was selected."))