mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-18 03:21:47 +02:00
updates
This commit is contained in:
parent
6fefc41e1e
commit
4b31596caa
@ -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 = {}
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user