summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-02-05 13:46:09 +0000
committerterkhen <terkhen@openttd.org>2011-02-05 13:46:09 +0000
commita4b08dddd10062f49352b5aee49e392f95e281e2 (patch)
tree99cc5f5db98321e039b9b61fbe084b6f1fe80220 /src/town_cmd.cpp
parent91dcc9e0164987f6b17ed3a28e8ee2b497133c84 (diff)
downloadopenttd-a4b08dddd10062f49352b5aee49e392f95e281e2.tar.xz
(svn r21974) -Feature: Add a setting to enable/disable funding local road reconstruction.
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index b043a0450..613af54d6 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2469,6 +2469,9 @@ static CommandCost TownActionAdvertiseLarge(Town *t, DoCommandFlag flags)
static CommandCost TownActionRoadRebuild(Town *t, DoCommandFlag flags)
{
+ /* Check if the company is allowed to fund new roads. */
+ if (!_settings_game.economy.fund_roads) return CMD_ERROR;
+
if (flags & DC_EXEC) {
t->road_build_months = 6;
@@ -2639,6 +2642,9 @@ uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t)
/* Is the company not able to buy exclusive rights ? */
if (cur == TACT_BUY_RIGHTS && !_settings_game.economy.exclusive_rights) continue;
+ /* Is the company not able to fund local road reconstruction? */
+ if (cur == TACT_ROAD_REBUILD && !_settings_game.economy.fund_roads) continue;
+
/* Is the company not able to build a statue ? */
if (cur == TACT_BUILD_STATUE && HasBit(t->statues, cid)) continue;