Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Поменять генератор
- /c local surface = game.player.surface
- local mgs = surface.map_gen_settings
- mgs.property_expression_names = {}
- surface.map_gen_settings = mgs
- --УДОЛИТЬ чанки с водой
- /c
- local MIN_DISTANCE = 16
- local MIN_WATER = 1024 * 0.2
- local surface = game.player.surface
- for chunk in surface.get_chunks() do
- local distance = chunk.x * chunk.x + chunk.y * chunk.y
- if distance >= MIN_DISTANCE * MIN_DISTANCE then
- water = surface.count_tiles_filtered({
- area = {{chunk.x * 32, chunk.y * 32}, {chunk.x * 32 + 32, chunk.y * 32 + 32}},
- collision_mask= "water-tile"
- })
- if water >= MIN_WATER then
- surface.delete_chunk(chunk)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement