Fixed Existing Lua Check Errors

This commit is contained in:
Cooldude2606
2020-05-26 18:21:10 +01:00
parent 2aaeb06be3
commit 32507492b8
76 changed files with 1622 additions and 1617 deletions

View File

@@ -8,22 +8,22 @@ local config = require 'config.preset_player_colours' --- @dep config.preset_pla
local Global = require 'utils.global' --- @dep utils.global
require 'overrides.table'
Global.register(config,function(tbl)
Global.register(config, function(tbl)
config = tbl
end)
Event.add(defines.events.on_player_created,function(event)
Event.add(defines.events.on_player_created, function(event)
local player = Game.get_player_by_index(event.player_index)
local color = 'white'
if config.players[player.name] then
color = config.players[player.name]
else
while config.disallow[color] do
color = table.get_random_dictionary_entry(Colours,true)
color = table.get_random_dictionary_entry(Colours, true)
end
color = Colours[color]
end
color = {r=color.r/255,g=color.g/255,b=color.b/255,a=0.5}
color = {r=color.r/255, g=color.g/255, b=color.b/255, a=0.5}
player.color = color
player.chat_color = color
end)