1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-18 03:21:47 +02:00
This commit is contained in:
grilledham 2018-05-24 14:29:40 +01:00
parent 6fefc41e1e
commit 4b31596caa
2 changed files with 15 additions and 0 deletions

View File

@ -4,9 +4,23 @@ local perlin = require 'map_gen.shared.perlin_noise'
local radius = 129
local radsquare = radius * radius
local clear_types = {'simple-entity', 'resource', 'tree'}
local function do_clear_entites(world)
local entities = world.surface.find_entities_filtered({area = world.area, type = clear_types})
for _, entity in pairs(entities) do
entity.destroy()
end
end
return function(x, y, world)
local surface = world.surface
if not world.island_resort_cleared then
world.island_resort_cleared = true
do_clear_entites(world)
end
local entities = {}
local decoratives = {}

View File

@ -100,6 +100,7 @@ local function on_chunk(event)
local area = event.area
local data = {
area = area,
top_x = area.left_top.x,
top_y = area.left_top.y,
surface = event.surface,