From 90edabc9d5fc576cb988547c26611a2e74a66d04 Mon Sep 17 00:00:00 2001 From: Andrey Stepanov Date: Wed, 11 Dec 2024 14:19:33 +0500 Subject: [PATCH] fix oneshot --- init.lua | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 40a534b..fcbd28e 100644 --- a/init.lua +++ b/init.lua @@ -115,20 +115,19 @@ function vote.check_vote(voteset) local ignored_players = storage:get_string("ignored_players"):split(" ") for _, player in pairs(players) do local name = player:get_player_name() - local is_ignored = false - for _, ignored_name in ipairs(ignored_players) do - if name == ignored_name then - is_ignored = true + if not voteset.results.voted[name] then + local is_ignored = false + for _, ignored_name in ipairs(ignored_players) do + if name == ignored_name then + is_ignored = true + break + end + end + if not is_ignored then + all_players_voted = false break end end - if is_ignored then - break - end - if not voteset.results.voted[name] then - all_players_voted = false - break - end end if all_players_voted then