|
@@ -495,14 +495,18 @@ public:
|
|
|
/* Raw industries might be prospected. Show this fact by changing the string
|
|
|
* In Editor, you just build, while ingame, or you fund or you prospect */
|
|
|
if (_game_mode == GM_EDITOR) {
|
|
|
/* We've chosen many random industries but no industries have been specified */
|
|
|
SetDParam(0, STR_FUND_INDUSTRY_BUILD_NEW_INDUSTRY);
|
|
|
} else {
|
|
|
const IndustrySpec *indsp = GetIndustrySpec(this->index[this->selected_index]);
|
|
|
SetDParam(0, (_settings_game.construction.raw_industry_construction == 2 && indsp->IsRawIndustry()) ? STR_FUND_INDUSTRY_PROSPECT_NEW_INDUSTRY : STR_FUND_INDUSTRY_FUND_NEW_INDUSTRY);
|
|
|
if (count > 0) {
|
|
|
const IndustrySpec *indsp = GetIndustrySpec(this->index[this->selected_index]);
|
|
|
SetDParam(0, (_settings_game.construction.raw_industry_construction == 2 && indsp->IsRawIndustry()) ? STR_FUND_INDUSTRY_PROSPECT_NEW_INDUSTRY : STR_FUND_INDUSTRY_FUND_NEW_INDUSTRY);
|
|
|
} else {
|
|
|
SetDParam(0, STR_FUND_INDUSTRY_FUND_NEW_INDUSTRY);
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
void DrawWidget(const Rect &r, int widget) const override
|
|
@@ -727,12 +731,13 @@ public:
|
|
|
if (success && !_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
|
|
}
|
|
|
|
|
|
void OnHundredthTick() override
|
|
|
{
|
|
|
if (_game_mode == GM_EDITOR) return;
|
|
|
if (this->count == 0) return;
|
|
|
const IndustrySpec *indsp = GetIndustrySpec(this->selected_type);
|
|
|
|
|
|
if (indsp->enabled) {
|
|
|
bool call_back_result = GetIndustryProbabilityCallback(this->selected_type, IACT_USERCREATION, 1) > 0;
|
|
|
|
|
|
/* Only if result does match the previous state would it require a redraw. */
|