You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
571 B
16 lines
571 B
-- NOTE: Always use the Event object for events otherwise it replaces other event handlers.
|
|
if script.active_mods["miniloader"] then
|
|
local miniloader_util = require("__miniloader__/lualib/util.lua")
|
|
|
|
function miniloader_on_area_cloned(ev)
|
|
local miniloaders = miniloader_util.find_miniloaders{
|
|
surface = ev.destination_surface,
|
|
area = ev.destination_area,
|
|
}
|
|
for _, loader in ipairs(miniloaders) do
|
|
miniloader_util.update_inserters(loader)
|
|
end
|
|
end
|
|
|
|
Event.addListener(defines.events.on_area_cloned, miniloader_on_area_cloned)
|
|
end
|
|
|