[Lou][2.0.12] LuaSurface::set_tiles doesn't properly unstack tiles
Posted: Wed Oct 30, 2024 2:16 am
Scenario:
- Create a tile with concrete (minable tile) over landfill (foundation tile) over water (non-minable tile).
- Use LuaSurface::set_tiles to set the tile to landfill.
Expected behavior:
- Tile now just have a landfill (as tile) over the water (as hidden_tile).
Actual behavior:
- Tile now has landfill (as tile) over concrete (as hidden_tile) over landfill (as double_hidden_tile).
Another scenario:
- Create a tile with landfill (foundation tile) over water (non-minable tile).
- Use LuaSurface::set_tiles to set the tile to water.
Expected behavior:
- Tile now has just water (as tile). This was the behavior in 1.1.
Actual behavior:
- Tile now has water as both tile and hidden_tile.
- Create a tile with concrete (minable tile) over landfill (foundation tile) over water (non-minable tile).
- Use LuaSurface::set_tiles to set the tile to landfill.
Expected behavior:
- Tile now just have a landfill (as tile) over the water (as hidden_tile).
Actual behavior:
- Tile now has landfill (as tile) over concrete (as hidden_tile) over landfill (as double_hidden_tile).
Another scenario:
- Create a tile with landfill (foundation tile) over water (non-minable tile).
- Use LuaSurface::set_tiles to set the tile to water.
Expected behavior:
- Tile now has just water (as tile). This was the behavior in 1.1.
Actual behavior:
- Tile now has water as both tile and hidden_tile.