mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-14 10:13:13 +02:00
201fc80e55
* Updated experience gui * Fixed XP from rocket launches * Added more rich-text * Updated experience gui * Fixed XP from rocket launches * Added more rich-text * Added more rich_text * Added new hail_hydra and weapon_balance * Spitter spawn behemoth worms * Fixed linting * Reverted spawn chance back to 0.05 * Fixed Diggy _CHEAT Now overrides config.lua cheats when debug is not true
28 lines
631 B
Lua
28 lines
631 B
Lua
local Event = require 'utils.event'
|
|
|
|
local SetupPlayer = {}
|
|
|
|
global.SetupPlayer = {
|
|
first_player_spawned = false
|
|
}
|
|
|
|
function SetupPlayer.register(config)
|
|
Event.add(
|
|
defines.events.on_player_created,
|
|
function()
|
|
local redmew_player_create = global.config.player_create
|
|
|
|
if #config.starting_items > 0 then
|
|
redmew_player_create.starting_items = config.starting_items
|
|
end
|
|
|
|
if not _DEBUG then
|
|
local cheats = config.cheats
|
|
redmew_player_create.cheats = cheats
|
|
end
|
|
end
|
|
)
|
|
end
|
|
|
|
return SetupPlayer
|