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/industry_gui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/industry_gui.cpp') diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 40c481d43..f52fec3cc 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -131,7 +131,7 @@ class BuildIndustryWindow : public Window { /* Rule is that editor mode loads all industries. * In game mode, all non raw industries are loaded too * and raw ones are loaded only when setting allows it */ - if (_game_mode != GM_EDITOR && indsp->IsRawIndustry() && _patches.raw_industry_construction == 0) { + if (_game_mode != GM_EDITOR && indsp->IsRawIndustry() && _settings.construction.raw_industry_construction == 0) { /* Unselect if the industry is no longer in the list */ if (this->selected_type == ind) this->selected_index = -1; continue; @@ -198,7 +198,7 @@ public: if (indsp == NULL) this->enabled[this->selected_index] = _opt.diff.number_industries != 0; this->widget[DPIW_FUND_WIDGET].data = STR_BUILD_NEW_INDUSTRY; } else { - this->widget[DPIW_FUND_WIDGET].data = (_patches.raw_industry_construction == 2 && indsp->IsRawIndustry()) ? STR_PROSPECT_NEW_INDUSTRY : STR_FUND_NEW_INDUSTRY; + this->widget[DPIW_FUND_WIDGET].data = (_settings.construction.raw_industry_construction == 2 && indsp->IsRawIndustry()) ? STR_PROSPECT_NEW_INDUSTRY : STR_FUND_NEW_INDUSTRY; } this->SetWidgetDisabledState(DPIW_FUND_WIDGET, !this->enabled[this->selected_index]); @@ -304,7 +304,7 @@ public: this->SetDirty(); - if ((_game_mode != GM_EDITOR && _patches.raw_industry_construction == 2 && indsp != NULL && indsp->IsRawIndustry()) || + if ((_game_mode != GM_EDITOR && _settings.construction.raw_industry_construction == 2 && indsp != NULL && indsp->IsRawIndustry()) || this->selected_type == INVALID_INDUSTRYTYPE) { /* Reset the button state if going to prospecting or "build many industries" */ this->RaiseButtons(); @@ -325,7 +325,7 @@ public: GenerateIndustries(); _generating_world = false; } - } else if (_game_mode != GM_EDITOR && _patches.raw_industry_construction == 2 && GetIndustrySpec(this->selected_type)->IsRawIndustry()) { + } else if (_game_mode != GM_EDITOR && _settings.construction.raw_industry_construction == 2 && GetIndustrySpec(this->selected_type)->IsRawIndustry()) { DoCommandP(0, this->selected_type, InteractiveRandom(), NULL, CMD_BUILD_INDUSTRY | CMD_MSG(STR_4830_CAN_T_CONSTRUCT_THIS_INDUSTRY)); this->HandleButtonClick(DPIW_FUND_WIDGET); } else { -- cgit v1.2.3-54-g00ecf