Changeset - r23715:b1baa75a9644
[Not reviewed]
master
0 1 0
peter1138 - 6 years ago 2019-04-27 18:36:02
peter1138@openttd.org
Change: Allow building road stops over self-owned one-way/blocked road.
1 file changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -1004,13 +1004,16 @@ static CommandCost CheckFlatLandRoadStop
 

	
 
					if (RoadTypeIsRoad(rt) && !HasPowerOnRoad(rt, road_rt)) return_cmd_error(STR_ERROR_NO_SUITABLE_ROAD);
 

	
 
					if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE) {
 
						CommandCost ret = CheckOwnership(road_owner);
 
						if (ret.Failed()) return ret;
 
					}
 

	
 
					cost.AddCost(RoadBuildCost(road_rt) * (2 - num_pieces));
 
				} else if (RoadTypeIsRoad(rt)) {
 
					cost.AddCost(RoadBuildCost(rt) * 2);
 
				}
 

	
 
				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. */
 
				RoadType tram_rt = GetRoadType(cur_tile, RTT_TRAM);
 
				if (tram_rt != INVALID_ROADTYPE) {
0 comments (0 inline, 0 general)