From dc77647ea4a2becac4eff3190970cb35671b0131 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 25 May 2008 19:17:03 +0000 Subject: (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. --- src/town_gui.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/town_gui.cpp') 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); } -- cgit v1.2.3-54-g00ecf