summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-29 23:42:59 +0000
committerrubidium <rubidium@openttd.org>2007-07-29 23:42:59 +0000
commit2800a49f0361b586573e8d3c78a1ecb13e414b18 (patch)
tree35f2cfc46313d08457c127c393370517d519fab3 /src/road_cmd.cpp
parenta15df67f9a3d78f1b55b9fdd7b780b26f2cf60d3 (diff)
downloadopenttd-2800a49f0361b586573e8d3c78a1ecb13e414b18.tar.xz
(svn r10733) -Codechange: change MP_STREET into MP_ROAD as we use the word "road" everywhere except in the tile type.
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index f0ff25bf2..b6abc4b35 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -124,7 +124,7 @@ CommandCost CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
Town *t = NULL;
switch (GetTileType(tile)) {
- case MP_STREET:
+ case MP_ROAD:
if (_game_mode != GM_EDITOR && GetRoadOwner(tile, rt) == OWNER_TOWN) t = GetTownByTile(tile);
break;
@@ -154,7 +154,7 @@ CommandCost CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
* removal allowance depends on difficulty setting */
if (!CheckforTownRating(flags, t, ROAD_REMOVE)) return CMD_ERROR;
- if (!IsTileType(tile, MP_STREET)) {
+ if (!IsTileType(tile, MP_ROAD)) {
/* If it's the last roadtype, just clear the whole tile */
if (rts == RoadTypeToRoadTypes(rt)) return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
@@ -364,7 +364,7 @@ CommandCost CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
tileh = GetTileSlope(tile, NULL);
switch (GetTileType(tile)) {
- case MP_STREET:
+ case MP_ROAD:
switch (GetRoadTileType(tile)) {
case ROAD_TILE_NORMAL: {
if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS);
@@ -481,7 +481,7 @@ do_clear:;
cost.AddCost(ret);
}
- if (IsTileType(tile, MP_STREET)) {
+ if (IsTileType(tile, MP_ROAD)) {
/* Don't put the pieces that already exist */
pieces &= ComplementRoadBits(existing);
}
@@ -494,7 +494,7 @@ do_clear:;
if (flags & DC_EXEC) {
switch (GetTileType(tile)) {
- case MP_STREET: {
+ case MP_ROAD: {
RoadTileType rtt = GetRoadTileType(tile);
if (existing == ROAD_NONE || rtt == ROAD_TILE_CROSSING) {
SetRoadTypes(tile, GetRoadTypes(tile) | RoadTypeToRoadTypes(rt));
@@ -529,7 +529,7 @@ do_clear:;
break;
}
- if (rt != ROADTYPE_TRAM && IsTileType(tile, MP_STREET) && GetRoadTileType(tile) == ROAD_TILE_NORMAL) {
+ if (rt != ROADTYPE_TRAM && IsTileType(tile, MP_ROAD) && GetRoadTileType(tile) == ROAD_TILE_NORMAL) {
existing |= pieces;
SetDisallowedRoadDirections(tile, (existing == ROAD_X || existing == ROAD_Y) ?
GetDisallowedRoadDirections(tile) ^ toggle_drd : DRD_NONE);