fix oneshot

This commit is contained in:
Andrey Stepanov 2024-12-11 14:19:33 +05:00
parent 4a0acef237
commit 90edabc9d5
Signed by: Koldun
GPG Key ID: 53DE683337F5D25F

View File

@ -115,6 +115,7 @@ 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()
if not voteset.results.voted[name] then
local is_ignored = false
for _, ignored_name in ipairs(ignored_players) do
if name == ignored_name then
@ -122,14 +123,12 @@ function vote.check_vote(voteset)
break
end
end
if is_ignored then
break
end
if not voteset.results.voted[name] then
if not is_ignored then
all_players_voted = false
break
end
end
end
if all_players_voted then
vote.end_vote(voteset)