mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 04:21:41 +09:00
Fixed Existing Lua Check Errors
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user