Minor bug fixes

This commit is contained in:
Cooldude2606
2019-05-26 15:32:52 +01:00
parent 7079f84a68
commit 6432326b1b
31 changed files with 130 additions and 174 deletions

View File

@@ -1,7 +1,7 @@
--- Adds a better method of player starting items based on production levels.
local Event = require 'utils.event'
local Game = require 'utils.game'
local config = require 'config.advanced_starting_items'
local config = require 'config.advanced_start'
local items = config.items
Event.add(defines.events.on_player_created, function(event)

View File

@@ -9,15 +9,13 @@ Global.register(config,function(tbl)
config = tbl
end)
local white = Colours.white
local black = Colours.black
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 not config.disallow[color] do
while config.disallow[color] do
color = table.get_random_dictionary_entry(Colours,true)
end
color = Colours[color]