Skip to content

Commit

Permalink
Set hidden tile for landfill tiles (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
RedRafe authored Nov 23, 2024
1 parent 8e783c6 commit 0db2664
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions map_gen/shared/generate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ local function do_tile_inner(tiles, tile, pos)
end
end

local function do_landfill_hidden_tile(tiles, tile, pos)
if (tile.tile or tile) == 'landfill' and not tile.hidden_tile then
insert(tiles, {tile = 'water-shallow', position = pos})
end
end

local function do_tile(y, x, data, shape)
local pos = {x, y}

Expand Down Expand Up @@ -63,6 +69,7 @@ local function do_tile(y, x, data, shape)
else
do_tile_inner(data.tiles, tile, pos)
end
do_landfill_hidden_tile(data.hidden_tiles, tile, pos)
end

local function do_row(row, data, shape)
Expand Down Expand Up @@ -109,6 +116,7 @@ local function do_row(row, data, shape)
else
do_tile_inner(tiles, tile, pos)
end
do_landfill_hidden_tile(data.hidden_tiles, tile, pos)
end
end

Expand Down

0 comments on commit 0db2664

Please sign in to comment.