1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-09 13:37:02 +02:00

Cave terrain fixes

This commit is contained in:
Piratux 2022-10-09 16:48:16 +03:00
parent 72b5391ce8
commit 93636fd1c3
2 changed files with 6 additions and 5 deletions

View File

@ -128,7 +128,7 @@ function Public.roll_source_surface(destination_data)
cave_miner.cave_surface = game.create_surface(cave_surface_name, map_gen_settings)
cave_miner.cave_surface.request_to_generate_chunks({x = 0, y = 0}, 2)
cave_miner.cave_surface.force_generate_chunk_requests()
-- cave_miner.cave_surface.force_generate_chunk_requests() -- Figure out if this is needed at all since it causes issues
end
function Public.cleanup_cave_surface(destination_data)

View File

@ -309,17 +309,18 @@ local function get_biome(args)
end
function Public.terrain(args)
local tiles_placed = #args.tiles
local biome, square_distance, noise = get_biome(args)
biome(args, square_distance, noise)
-- fallback case when no tiles were placed
if #args.tiles == 0 then
-- args.tiles[#args.tiles + 1] = {name = 'dirt-7', position = args.p}
args.tiles[#args.tiles + 1] = {name = 'concrete', position = args.p}
-- fallback case when tile wasn't placed
if tiles_placed == #args.tiles then
args.tiles[#args.tiles + 1] = {name = 'dirt-7', position = args.p}
end
end
-- Finding a spot for structures is very hard (it might cause structures to spawn in weird locations, like ship)
function Public.chunk_structures(args)
end