1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-02-21 19:20:07 +02:00

Add water between ores for one direction wide map. (#1360)

This commit is contained in:
grilledham 2023-05-13 11:44:00 +01:00 committed by GitHub
parent 5501f8d8cb
commit b08a1a6325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 8 deletions

View File

@ -120,13 +120,13 @@ return function(config)
map = b.apply_entity(map, trees_shape)
end
if fish_spawn_rate then
map = b.fish(map, fish_spawn_rate)
end
if post_map_func then
map = post_map_func(map)
end
if fish_spawn_rate then
map = b.fish(map, fish_spawn_rate)
end
end)
return function(x, y, world)

View File

@ -145,7 +145,6 @@ local function post_map_func(map_shape)
local water_border = b.tile('water')
water_border = b.choose(water_bounds, water_border, b.empty_shape)
water_border = b.fish(water_border, 0.025)
return b.choose(map_bounds, map_shape, water_border)
end

View File

@ -147,7 +147,6 @@ local function post_map_func(map_shape)
local water_border = b.tile('water')
water_border = b.choose(water_bounds, water_border, b.empty_shape)
water_border = b.fish(water_border, 0.025)
return b.choose(map_bounds, map_shape, water_border)
end

View File

@ -154,7 +154,6 @@ local function post_map_func(map_shape)
local water_border = b.tile('water')
water_border = b.choose(water_bounds, water_border, b.empty_shape)
water_border = b.fish(water_border, 0.025)
return b.choose(map_bounds, map_shape, water_border)
end

View File

@ -152,9 +152,17 @@ local function post_map_func(map_shape)
return x > -30 and y > -146 and y < 146
end
local function line(x, y)
return x > 256 and y > -1 and y < 1
end
local water_line = b.change_tile(line, true, 'water')
local top_water_line = b.translate(water_line, 0, -48)
local bottom_water_line = b.translate(water_line, 0, 48)
map_shape = b.any({top_water_line, bottom_water_line, map_shape})
local water_border = b.tile('water')
water_border = b.choose(water_bounds, water_border, b.empty_shape)
water_border = b.fish(water_border, 0.025)
return b.choose(map_bounds, map_shape, water_border)
end