Changeset - r15454:a4eeacd020ee
[Not reviewed]
master
0 2 0
terkhen - 14 years ago 2010-07-10 20:12:32
terkhen@openttd.org
(svn r20113) -Add [FS#3895]: Show an specific error message when trying to remove nonexistant roads (Krille).
2 files changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -3559,6 +3559,8 @@ STR_ERROR_CAN_T_BUILD_ROAD_HERE         
 
STR_ERROR_CAN_T_BUILD_TRAMWAY_HERE                              :{WHITE}Can't build tramway here...
 
STR_ERROR_CAN_T_REMOVE_ROAD_FROM                                :{WHITE}Can't remove road from here...
 
STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM                             :{WHITE}Can't remove tramway from here...
 
STR_ERROR_THERE_IS_NO_ROAD                                      :{WHITE}...there is no road
 
STR_ERROR_THERE_IS_NO_TRAMWAY                                   :{WHITE}...there is no tramway
 

	
 
# Waterway construction errors
 
STR_ERROR_CAN_T_BUILD_CANALS                                    :{WHITE}Can't build canals here...
src/road_cmd.cpp
Show inline comments
 
@@ -180,7 +180,7 @@ static CommandCost RemoveRoad(TileIndex 
 
{
 
	RoadTypes rts = GetRoadTypes(tile);
 
	/* The tile doesn't have the given road type */
 
	if (!HasBit(rts, rt)) return CMD_ERROR;
 
	if (!HasBit(rts, rt)) return_cmd_error(rt == ROADTYPE_TRAM ? STR_ERROR_THERE_IS_NO_TRAMWAY : STR_ERROR_THERE_IS_NO_ROAD);
 

	
 
	switch (GetTileType(tile)) {
 
		case MP_ROAD: {
 
@@ -271,7 +271,7 @@ static CommandCost RemoveRoad(TileIndex 
 

	
 
			/* limit the bits to delete to the existing bits. */
 
			pieces &= present;
 
			if (pieces == ROAD_NONE) return CMD_ERROR;
 
			if (pieces == ROAD_NONE) return_cmd_error(rt == ROADTYPE_TRAM ? STR_ERROR_THERE_IS_NO_TRAMWAY : STR_ERROR_THERE_IS_NO_ROAD);
 

	
 
			/* Now set present what it will be after the remove */
 
			present ^= pieces;
0 comments (0 inline, 0 general)