Fixed auto promote

This commit is contained in:
Cooldude2606
2020-09-03 17:42:06 +01:00
parent e33188dd0c
commit 8ff7ad5019

View File

@@ -1000,8 +1000,8 @@ Event.add(defines.events.on_player_joined_game, role_update)
-- Every 60 seconds the auto promote check is preformed -- Every 60 seconds the auto promote check is preformed
Event.on_nth_tick(3600, function() Event.on_nth_tick(3600, function()
local promotes = {} local promotes = {}
for _, player in pairs(game.connected_players) do for _, player in ipairs(game.connected_players) do
for _, role in ipairs(Roles.config.roles) do for _, role in pairs(Roles.config.roles) do
if role.auto_promote_condition then if role.auto_promote_condition then
local success, err = pcall(role.auto_promote_condition, player) local success, err = pcall(role.auto_promote_condition, player)
if not success then if not success then