From a8193cb71d5c22b1c8c4d6581552912a57aabdcc Mon Sep 17 00:00:00 2001 From: LordME <58342752+TheLordME@users.noreply.github.com> Date: Mon, 16 Sep 2024 23:13:46 +0200 Subject: [PATCH 1/3] transfer vote ties now always extend and there is a message for randomly chosen results --- code/controllers/subsystem/vote.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 4476ae567222..2d7e65e9f3ec 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -113,7 +113,9 @@ SUBSYSTEM_DEF(vote) . = "Initiate Crew Transfer" if(2) . = CONFIG_GET(string/default_on_transfer_tie) - if(LAZYLEN(winners) > 0) + else if(LAZYLEN(winners) > 0) + if(LAZYLEN(winners) > 1) + text += "More than one winner, result chosen at random." . = pick(winners) text += "Vote Result: [.]" else From acbfdc8158b658701e485541deb14c192632dcc2 Mon Sep 17 00:00:00 2001 From: LordME <58342752+TheLordME@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:28:58 +0200 Subject: [PATCH 2/3] Fixes transfer vote result show --- code/controllers/subsystem/vote.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 2d7e65e9f3ec..c270d03c2413 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -113,10 +113,11 @@ SUBSYSTEM_DEF(vote) . = "Initiate Crew Transfer" if(2) . = CONFIG_GET(string/default_on_transfer_tie) - else if(LAZYLEN(winners) > 0) + if(LAZYLEN(winners) > 0) if(LAZYLEN(winners) > 1) text += "More than one winner, result chosen at random." - . = pick(winners) + if(!.) + . = pick(winners) text += "Vote Result: [.]" else text += "Vote Result: Inconclusive - No Votes!" From 5f9041e5ee43689b44a4030b4c504dff328a5a9e Mon Sep 17 00:00:00 2001 From: LordME <58342752+TheLordME@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:42:27 +0200 Subject: [PATCH 3/3] makes it a bit nicer --- code/controllers/subsystem/vote.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index c270d03c2413..32a95513032c 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -114,9 +114,9 @@ SUBSYSTEM_DEF(vote) if(2) . = CONFIG_GET(string/default_on_transfer_tie) if(LAZYLEN(winners) > 0) - if(LAZYLEN(winners) > 1) - text += "More than one winner, result chosen at random." if(!.) + if(LAZYLEN(winners) > 1) + text += "More than one winner, result chosen at random." . = pick(winners) text += "Vote Result: [.]" else