summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-07-20 16:08:28 +0000
committerbelugas <belugas@openttd.org>2007-07-20 16:08:28 +0000
commit1b1fbdd33154ad3b304c20c7ef3b4728c75dd4b3 (patch)
tree9df0c99e3a7dd771c9c2a2856437d06c571fa683 /src/industry_gui.cpp
parentc0b044ac454a6ee045436570ed22a2acf7d62632 (diff)
downloadopenttd-1b1fbdd33154ad3b304c20c7ef3b4728c75dd4b3.tar.xz
(svn r10637) -Fix: Enable the Random Industries in scenario editor if setting Number of Industries is not NONE.
Spotted by skiddl13. Thanks to glx for help in finding and better looking code :)
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 29794a6a6..600878eae 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -153,9 +153,7 @@ static void BuildDynamicIndustryWndProc(Window *w, WindowEvent *e)
* 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 */
- if (indsp == NULL && _patches.raw_industry_construction == 0) {
- _fund_gui.enabled[WP(w, fnd_d).index] = false;
- }
+ if (indsp == NULL) _fund_gui.enabled[WP(w, fnd_d).index] = _opt.diff.number_industries != 0;
w->widget[DYNA_INDU_FUND_WIDGET].data = STR_BUILD_NEW_INDUSTRY;
} else {
w->widget[DYNA_INDU_FUND_WIDGET].data = (_patches.raw_industry_construction == 2 && indsp->IsRawIndustry()) ? STR_PROSPECT_NEW_INDUSTRY : STR_FUND_NEW_INDUSTRY;