Feature: Setting to disallow level crossings with competitors (#10755)

This commit is contained in:
mrmbernardi
2023-09-02 12:46:24 +02:00
committed by GitHub
parent 236ec41fa2
commit a5c8365aa4
6 changed files with 22 additions and 0 deletions

View File

@@ -507,6 +507,11 @@ CommandCost CmdBuildSingleRail(DoCommandFlag flags, TileIndex tile, RailType rai
/* Level crossings may only be built on these slopes */
if (!HasBit(VALID_LEVEL_CROSSING_SLOPES, tileh)) return_cmd_error(STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION);
if (!_settings_game.construction.crossing_with_competitor && _current_company != OWNER_DEITY) {
CommandCost ret = CheckTileOwnership(tile);
if (ret.Failed()) return ret;
}
CommandCost ret = EnsureNoVehicleOnGround(tile);
if (ret.Failed()) return ret;