Deep Space Restrictor


With this library you can disable buildings in certain locations. It doesn't make any changes to the main game, the mod is internal.

Internal
15 hours ago
2.0
3
Planets Logistics
Owner:
ArkadiPorovozov
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
17 hours ago
Latest Version:
0.0.2 (15 hours ago)
Factorio version:
2.0
Downloaded by:
3 users

This library will help you disable buildings (by name) on specific surfaces. How to enable and configure them is below.


--control.lua
--[[
local DeepSpaceRestrictor = require("dsr-lib.control")

if not data then
data = {extend = function(_, tbl)
DeepSpaceRestrictor.load_rules(tbl)
end}
end

require("rules") -- this is where the rules come from
DeepSpaceRestrictor.setup()
]]

--rules.lua
--[[
data:extend({
{
type = "disabled-zone",
name = "vulcanus-n", --name
zone_type = "location", --location = planet or space-location , connection = space-connection
zone_name = "vulcanus", --location name
buildings = {"assembling-machine-3", "gun-turret"}, --list
overlay_sprite = "freeze-overlay" --overlay
},
})
]]
More details in guide.lua


AI was used in writing the draft code