Feature: Draw infinite water when all borders are water (#13289)
This commit is contained in:
@@ -253,6 +253,11 @@ CommandCost CmdBuildObject(DoCommandFlags flags, TileIndex tile, ObjectType type
|
||||
Owner o = GetTileOwner(t);
|
||||
if (o != OWNER_NONE && o != OWNER_WATER) cost.AddCost(CheckOwnership(o, t));
|
||||
|
||||
/* If freeform edges are disabled, don't allow building on edge tiles. */
|
||||
if (!_settings_game.construction.freeform_edges && (!IsInsideMM(TileX(t), 1, Map::MaxX() - 1) || !IsInsideMM(TileY(t), 1, Map::MaxY() - 1))) {
|
||||
return CommandCost(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP);
|
||||
}
|
||||
|
||||
/* However, the tile has to be clear of vehicles. */
|
||||
cost.AddCost(EnsureNoVehicleOnGround(t));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user