forked from mirror/OpenTTD
Feature: Setting to disallow level crossings with competitors (#10755)
This commit is contained in:
@@ -737,6 +737,11 @@ CommandCost CmdBuildRoad(DoCommandFlag flags, TileIndex tile, RoadBits pieces, R
|
||||
return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
|
||||
}
|
||||
|
||||
if (!_settings_game.construction.crossing_with_competitor && company != OWNER_TOWN && company != OWNER_DEITY) {
|
||||
CommandCost ret = CheckTileOwnership(tile);
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
|
||||
if (GetRailTileType(tile) != RAIL_TILE_NORMAL) goto do_clear;
|
||||
|
||||
if (RoadNoLevelCrossing(rt)) {
|
||||
|
Reference in New Issue
Block a user