1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 13:39:09 +00:00

(svn r19400) -Codechange: CheckforTownRating returns a CommandCost.

This commit is contained in:
alberth
2010-03-13 15:33:07 +00:00
parent 7134201524
commit 6b6ff9c52b
4 changed files with 21 additions and 15 deletions

View File

@@ -140,7 +140,9 @@ bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, RoadType
/* check if you're allowed to remove the street owned by a town
* removal allowance depends on difficulty setting */
if (!CheckforTownRating(flags, t, ROAD_REMOVE)) return false;
CommandCost ret = CheckforTownRating(flags, t, ROAD_REMOVE);
ret.SetGlobalErrorMessage();
if (ret.Failed()) return false;
/* Get a bitmask of which neighbouring roads has a tile */
RoadBits n = ROAD_NONE;