1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-10 00:43:27 +02:00
ComfyFactorio/terrain_layouts/biters_and_resources_east.lua

12 lines
370 B
Lua
Raw Normal View History

2019-12-20 15:46:20 +02:00
local function on_chunk_generated(event)
2021-03-24 17:46:00 +02:00
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
2019-12-20 15:46:20 +02:00
end
local event = require 'utils.event'
2021-03-24 17:46:00 +02:00
event.add(defines.events.on_chunk_generated, on_chunk_generated)