From 395759529f9f2ea9a3d25cdf0de97f43f40fd2cb Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 17 Oct 2022 18:57:31 +0200 Subject: [PATCH] [MIRROR] Allows late-joiners to have a chance at commending other people [MDB IGNORE] (#16931) * Allows late-joiners to have a chance at commending other people (#70574) About The Pull Request Basically, it was iterating the list of the people that had joined the game, in order. There's only one problem with that: The first entries in that list were always the round-start people, so as soon as you late-join into the shift, you can say goodbye to your chance at commending someone else, which explains why certain players claim to never have had the chance to commend someone else whilst I can oftentimes get the prompt for three or four rounds in a row. Why It's Good For The Game Makes the system work as intended, by actually making everyone that joined the round and is still alive at the end of it, a chance to commend others. * Allows late-joiners to have a chance at commending other people Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> --- code/__HELPERS/hearted.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/hearted.dm b/code/__HELPERS/hearted.dm index bfc487254f3..27e4fb723b5 100644 --- a/code/__HELPERS/hearted.dm +++ b/code/__HELPERS/hearted.dm @@ -9,7 +9,10 @@ return message_admins("Polling [number_to_ask] players for commendations.") - for(var/i in GLOB.joined_player_list) + // We need the list to be random, otherwise we'll end up always asking the same people to give out commendations. + var/list/eligible_player_list = shuffle(GLOB.joined_player_list) + + for(var/i in eligible_player_list) var/mob/check_mob = get_mob_by_ckey(i) if(!check_mob?.mind || !check_mob.client) continue