Skip to content

Commit

Permalink
[MIRROR] [no gbp] poll completion follow link points to current clien…
Browse files Browse the repository at this point in the history
…t 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 <[email protected]>
Co-authored-by: 13spacemen <[email protected]>
Co-authored-by: san7890 <[email protected]>
  • Loading branch information
4 people authored Mar 27, 2024
1 parent 81959fa commit 460afbc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions code/datums/candidate_poll.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."))

0 comments on commit 460afbc

Please sign in to comment.