1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-30 23:17:53 +02:00
ComfyFactorio/terrain_layouts/biters_and_resources_east.lua
2021-03-24 16:46:00 +01:00

12 lines
370 B
Lua

local function on_chunk_generated(event)
if event.area.left_top.x > -256 then
return
end
for _, e in pairs(event.surface.find_entities_filtered({area = event.area, type = {'resource', 'unit-spawner', 'turret'}})) do
e.destroy()
end
end
local event = require 'utils.event'
event.add(defines.events.on_chunk_generated, on_chunk_generated)