Add "enable_producers" option

Defaults to true, but if set to false skips registering everything that produces energy. Intended for use in conjunction with creative mode but will work regardless.
This commit is contained in:
cheapie 2018-08-19 17:15:13 -05:00
parent 1baf6af311
commit a04bb906df
4 changed files with 19 additions and 12 deletions

View File

@ -14,6 +14,7 @@ local defaults = {
enable_longterm_radiation_damage = "true",
enable_nuclear_reactor_digiline_selfdestruct = "false",
creative_mode = "false",
enable_producers = "true",
}
for k, v in pairs(defaults) do

View File

@ -8,9 +8,11 @@ dofile(path.."/cables.lua")
dofile(path.."/battery_box.lua")
-- Generators
dofile(path.."/solar_array.lua")
dofile(path.."/nuclear_reactor.lua")
dofile(path.."/generator.lua")
if technic.config:get_bool("enable_producers") then
dofile(path.."/solar_array.lua")
dofile(path.."/nuclear_reactor.lua")
dofile(path.."/generator.lua")
end
-- Machines
dofile(path.."/quarry.lua")

View File

@ -8,11 +8,13 @@ dofile(path.."/cables.lua")
dofile(path.."/battery_box.lua")
-- Generators
dofile(path.."/solar_panel.lua")
dofile(path.."/solar_array.lua")
dofile(path.."/geothermal.lua")
dofile(path.."/water_mill.lua")
dofile(path.."/generator.lua")
if technic.config:get_bool("enable_producers") then
dofile(path.."/solar_panel.lua")
dofile(path.."/solar_array.lua")
dofile(path.."/geothermal.lua")
dofile(path.."/water_mill.lua")
dofile(path.."/generator.lua")
end
-- Machines
dofile(path.."/alloy_furnace.lua")

View File

@ -8,11 +8,13 @@ dofile(path.."/cables.lua")
dofile(path.."/battery_box.lua")
-- Generators
if technic.config:get_bool("enable_wind_mill") then
dofile(path.."/wind_mill.lua")
if technic.config:get_bool("enable_producers") then
if technic.config:get_bool("enable_wind_mill") then
dofile(path.."/wind_mill.lua")
end
dofile(path.."/generator.lua")
dofile(path.."/solar_array.lua")
end
dofile(path.."/generator.lua")
dofile(path.."/solar_array.lua")
-- Machines
dofile(path.."/alloy_furnace.lua")