Add setting for map edge behaviour, and how to display area outside map

This commit is contained in:
Jonathan G Rennison
2023-12-22 17:32:44 +00:00
parent 540cec2af5
commit 378a545dd4
9 changed files with 99 additions and 7 deletions

View File

@@ -227,7 +227,15 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
assert(t < MapSize());
/* MP_VOID tiles can be terraformed but as tunnels and bridges
* cannot go under / over these tiles they don't need checking. */
if (IsTileType(t, MP_VOID)) continue;
if (IsTileType(t, MP_VOID)) {
if (_settings_game.construction.map_edge_mode != 0) {
CommandCost err(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP);
err.SetTile(t);
return err;
} else {
continue;
}
}
/* Find new heights of tile corners */
int z_N = TerraformGetHeightOfTile(&ts, t + TileDiffXY(0, 0));