Skip to content

Commit

Permalink
Fix: One-way roads could be over-built by road stops (regardless of r…
Browse files Browse the repository at this point in the history
…oad owner.)
  • Loading branch information
PeterN committed Jun 6, 2018
1 parent e7ce490 commit 408cee1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lang/english.txt
Expand Up @@ -4234,6 +4234,7 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... this
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... road facing in the wrong direction
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... drive through stops can't have corners
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... drive through stops can't have junctions
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... road is one way or blocked

# Station destruction related errors
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Can't remove part of station...
Expand Down
2 changes: 2 additions & 0 deletions src/station_cmd.cpp
Expand Up @@ -960,6 +960,8 @@ static CommandCost CheckFlatLandRoadStop(TileArea tile_area, DoCommandFlag flags
num_roadbits += CountBits(GetRoadBits(cur_tile, ROADTYPE_ROAD));
}

if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE) return_cmd_error(STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD);

/* There is a tram, check if we can build road+tram stop over it. */
if (HasBit(cur_rts, ROADTYPE_TRAM)) {
Owner tram_owner = GetRoadOwner(cur_tile, ROADTYPE_TRAM);
Expand Down

0 comments on commit 408cee1

Please sign in to comment.