forked from mirror/OpenTTD
(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.
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user