fix oneshot
This commit is contained in:
parent
4a0acef237
commit
90edabc9d5
7
init.lua
7
init.lua
@ -115,6 +115,7 @@ function vote.check_vote(voteset)
|
|||||||
local ignored_players = storage:get_string("ignored_players"):split(" ")
|
local ignored_players = storage:get_string("ignored_players"):split(" ")
|
||||||
for _, player in pairs(players) do
|
for _, player in pairs(players) do
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
if not voteset.results.voted[name] then
|
||||||
local is_ignored = false
|
local is_ignored = false
|
||||||
for _, ignored_name in ipairs(ignored_players) do
|
for _, ignored_name in ipairs(ignored_players) do
|
||||||
if name == ignored_name then
|
if name == ignored_name then
|
||||||
@ -122,14 +123,12 @@ function vote.check_vote(voteset)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if is_ignored then
|
if not is_ignored then
|
||||||
break
|
|
||||||
end
|
|
||||||
if not voteset.results.voted[name] then
|
|
||||||
all_players_voted = false
|
all_players_voted = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if all_players_voted then
|
if all_players_voted then
|
||||||
vote.end_vote(voteset)
|
vote.end_vote(voteset)
|
||||||
|
Loading…
Reference in New Issue
Block a user