diff options
author | truebrain <truebrain@openttd.org> | 2011-11-23 16:10:18 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-23 16:10:18 +0000 |
commit | e30256692fcea969ef6e0930ba4e5075a9f8c86b (patch) | |
tree | 28bda6c2dc24deeb87a546e6a15eaebb8e952f22 /src/town_cmd.cpp | |
parent | ef02931a3232abb594c1d00db8c1faacd829999f (diff) | |
download | openttd-e30256692fcea969ef6e0930ba4e5075a9f8c86b.tar.xz |
(svn r23303) -Add: economy.fund_buildings, to disallow funding buildings
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 7c67d064e..e303a2515 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2578,6 +2578,9 @@ static CommandCost TownActionBuildStatue(Town *t, DoCommandFlag flags) static CommandCost TownActionFundBuildings(Town *t, DoCommandFlag flags) { + /* Check if it's allowed to buy the rights */ + if (!_settings_game.economy.fund_buildings) return CMD_ERROR; + if (flags & DC_EXEC) { /* Build next tick */ t->grow_counter = 1; @@ -2680,6 +2683,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 buildings ? */ + if (cur == TACT_FUND_BUILDINGS && !_settings_game.economy.fund_buildings) continue; + /* Is the company not able to fund local road reconstruction? */ if (cur == TACT_ROAD_REBUILD && !_settings_game.economy.fund_roads) continue; |