summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrevorShelton <54145769+TrevorShelton@users.noreply.github.com>2020-06-28 01:55:57 -0700
committerCharles Pigott <charlespigott@googlemail.com>2020-07-10 14:47:55 +0100
commitc7e391da93e85ded007493711951e2263cfe39d6 (patch)
treefd326f9922c611d3708149b4b3b343aff46882ce /src
parent053d4f3bff97014bbf68b499302e93c6a9aea8b8 (diff)
downloadopenttd-c7e391da93e85ded007493711951e2263cfe39d6.tar.xz
Change #8162: Conversion of Town Road, Impr. Error
This changes the error when you attempt to convert a road owned by a town to another road, specifying that it's owned by the town rather than simply being incompatible. As the original poster of the issue pointed out, these seemed to be the only occurences of the incompatible road string, so now it's unused, but they would be left untouched in case of future use or since changing it to a different error would do the work of removing it then. If requested, it likely wouldn't be too difficult to remove the string entirely.
Diffstat (limited to 'src')
-rw-r--r--src/road_cmd.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 29d7f69bd..b8aee88d6 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -2399,7 +2399,8 @@ CommandCost CmdConvertRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
}
if (rtt == RTT_ROAD && owner == OWNER_TOWN) {
- error.MakeError(STR_ERROR_INCOMPATIBLE_ROAD);
+ error.MakeError(STR_ERROR_OWNED_BY);
+ GetNameOfOwner(OWNER_TOWN, tile);
continue;
}
}
@@ -2445,7 +2446,8 @@ CommandCost CmdConvertRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
}
if (rtt == RTT_ROAD && owner == OWNER_TOWN) {
- error.MakeError(STR_ERROR_INCOMPATIBLE_ROAD);
+ error.MakeError(STR_ERROR_OWNED_BY);
+ GetNameOfOwner(OWNER_TOWN, tile);
continue;
}
}