You can have config options at the top of your data.lua, or in a seperate config.lua file.
as a quick example, in my ores mod, I have this in a config.lua file
Code: Select all
-- if set to true, Nickel ore fields can spawn on maps. new maps will have autoplace control options.
EnableNickelOre=false
Code: Select all
require("config")
Code: Select all
if EnableNickelOre == true then
require("prototypes.nickel-ore")
end
so, if for example, you did it all in just 2 files, 1 with the Recycler, and 1 with the scrap, you could have 2 config lines, then in the data lua do checks too.
Code: Select all
EnableScrap=true
EnableRecycler=true
...
if EnableScrap == true then
require("prototypes.scrap")
end
if EnableRecycler == true then
require("prototypes.recycler")
end