diff --git a/map_gen/combined/island_resort.lua b/map_gen/combined/island_resort.lua index 1aef2a08..eedbd742 100644 --- a/map_gen/combined/island_resort.lua +++ b/map_gen/combined/island_resort.lua @@ -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 = {} diff --git a/map_gen/shared/generate_not_threaded.lua b/map_gen/shared/generate_not_threaded.lua index 665de7dc..0a558526 100644 --- a/map_gen/shared/generate_not_threaded.lua +++ b/map_gen/shared/generate_not_threaded.lua @@ -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,