diff options
author | rubidium <rubidium@openttd.org> | 2008-05-25 19:17:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-25 19:17:03 +0000 |
commit | 4625695653c3c0be16b61b640c206c557af9ec7b (patch) | |
tree | d480693e848eb121add7037faa150875d750cc98 /src/town_gui.cpp | |
parent | 6ea832ec7cbd572c72e96a179bb8c744834ee2e7 (diff) | |
download | openttd-4625695653c3c0be16b61b640c206c557af9ec7b.tar.xz |
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r-- | src/town_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 4e5e0cf8e..5d7715e95 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -76,7 +76,7 @@ uint GetMaskOfTownActions(int *nump, PlayerID pid, const Town *t) TownActions buttons = TACT_NONE; /* Spectators and unwanted have no options */ - if (pid != PLAYER_SPECTATOR && !(_patches.bribe && t->unwanted[pid])) { + if (pid != PLAYER_SPECTATOR && !(_settings.economy.bribe && t->unwanted[pid])) { /* Things worth more than this are not shown */ Money avail = GetPlayer(pid)->player_money + _price.station_value * 200; @@ -88,11 +88,11 @@ uint GetMaskOfTownActions(int *nump, PlayerID pid, const Town *t) const TownActions cur = (TownActions)(1 << i); /* Is the player not able to bribe ? */ - if (cur == TACT_BRIBE && (!_patches.bribe || t->ratings[pid] >= RATING_BRIBE_MAXIMUM)) + if (cur == TACT_BRIBE && (!_settings.economy.bribe || t->ratings[pid] >= RATING_BRIBE_MAXIMUM)) continue; /* Is the player not able to buy exclusive rights ? */ - if (cur == TACT_BUY_RIGHTS && !_patches.exclusive_rights) + if (cur == TACT_BUY_RIGHTS && !_settings.economy.exclusive_rights) continue; /* Is the player not able to build a statue ? */ @@ -313,7 +313,7 @@ public: } /* Space required for showing noise level information */ - if (_patches.station_noise_level) { + if (_settings.economy.station_noise_level) { ResizeWindowForWidget(this, TVW_INFOPANEL, 0, 10); } @@ -343,7 +343,7 @@ public: this->DrawViewport(); /* only show the town noise, if the noise option is activated. */ - if (_patches.station_noise_level) { + if (_settings.economy.station_noise_level) { SetDParam(0, this->town->noise_reached); SetDParam(1, this->town->MaxTownNoise()); DrawString(2, 137, STR_NOISE_IN_TOWN, 0); @@ -385,7 +385,7 @@ public: /* Called when setting station noise have changed, in order to resize the window */ this->SetDirty(); // refresh display for current size. This will allow to avoid glitches when downgrading - if (_patches.station_noise_level) { // adjust depending + if (_settings.economy.station_noise_level) { // adjust depending if (this->height == 150) { // window is smaller, needs to be bigger ResizeWindowForWidget(this, TVW_INFOPANEL, 0, 10); } |