mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-09-16 09:16:22 +02:00
added options to config
global.scenario.config.logistic_research_enabled global.scenario.config.enable_radar
This commit is contained in:
23
config.lua
23
config.lua
@@ -1,3 +1,10 @@
|
||||
local function apply_config()
|
||||
if not global.scenario.config.enable_radar then
|
||||
game.forces["player"].recipes["radar"].enabled = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Event.register(-1, function()
|
||||
global.scenario = {}
|
||||
global.scenario.variables = {}
|
||||
@@ -37,10 +44,26 @@ Event.register(-1, function()
|
||||
global.scenario.config.score_delay = 8 -- delay in seconds before hiding rocket score window (0 = never show)
|
||||
global.scenario.config.autolaunch_default = false -- default autolaunch option
|
||||
global.scenario.config.logistic_research_enabled = true -- if true then research for requesters and active providers will be enabled.
|
||||
global.scenario.config.enable_radar = true
|
||||
global.scenario.config.mapsettings = global.scenario.config.mapsettings or {}
|
||||
global.scenario.config.mapsettings.cross_width = 200 -- total width of cross
|
||||
global.scenario.config.mapsettings.spiral_land_width = 70 -- width of land in spiral
|
||||
global.scenario.config.mapsettings.spiral_water_width = 70 -- width of water in spiral
|
||||
global.scenario.custom_functions = {}
|
||||
global.scenario.config.nuke_min_time_hours = 3 --how long a player must be on the server to be allowed to use the nuke
|
||||
apply_config()
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
local function on_research_started(event)
|
||||
if not global.scenario.config.logistic_research_enabled then
|
||||
if event.research.name == "logistic-robotics" then
|
||||
game.forces["player"].current_research = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Event.register(defines.events.on_research_started, on_research_started)
|
||||
|
Reference in New Issue
Block a user