summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-01 17:21:25 +0000
committerrubidium <rubidium@openttd.org>2007-07-01 17:21:25 +0000
commit0debbfd73db418c3159e73af9411f4ab1539bd0a (patch)
treed8b9ee2e9559c5eb25defbb0007ccbbd8a28fdf4 /src
parentb6b78a3f217d0986b9a23d61bdb04c916f945a91 (diff)
downloadopenttd-0debbfd73db418c3159e73af9411f4ab1539bd0a.tar.xz
(svn r10406) -Fix [FS#968]: only industries in the temperate climate should be affected by the "do not increase production" flag.
Diffstat (limited to 'src')
-rw-r--r--src/industry.h2
-rw-r--r--src/industry_cmd.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/industry.h b/src/industry.h
index 0ec4e1491..57b4fdc9e 100644
--- a/src/industry.h
+++ b/src/industry.h
@@ -57,7 +57,7 @@ enum IndustyBehaviour {
INDUSTRYBEH_ONLY_INTOWN = 1 << 4, ///< can only be built in towns (arctic/tropic banks, water tower)
INDUSTRYBEH_ONLY_NEARTOWN = 1 << 5, ///< is always built near towns (toy shop)
INDUSTRYBEH_PLANT_ON_BUILT = 1 << 6, ///< Fields are planted around when built (all farms)
- INDUSTRYBEH_DONT_INCR_PROD = 1 << 7, ///< do not increase production (oil wells)
+ INDUSTRYBEH_DONT_INCR_PROD = 1 << 7, ///< do not increase production (oil wells) in the temperate climate
INDUSTRYBEH_BEFORE_1950 = 1 << 8, ///< can only be built before 1950 (oil wells)
INDUSTRYBEH_AFTER_1960 = 1 << 9, ///< can only be built after 1960 (oil rigs)
INDUSTRYBEH_AI_AIRSHIP_ROUTES = 1 << 10, ///< ai will attempt to establish air/ship routes to this industry (oil rig)
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 188a701a5..c20246c42 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1642,7 +1642,7 @@ static void ExtChangeIndustryProduction(Industry *i)
if (CHANCE16I(20, 1024, r)) new_prod -= max(((RandomRange(50) + 10) * old_prod) >> 8, 1U);
/* Chance of increasing becomes better when more is transported */
if (CHANCE16I(20 + (i->last_month_pct_transported[j] * 20 >> 8), 1024, r >> 16) &&
- (indspec->behaviour & INDUSTRYBEH_DONT_INCR_PROD) == 0) {
+ ((indspec->behaviour & INDUSTRYBEH_DONT_INCR_PROD) == 0 || _opt.landscape != LT_TEMPERATE)) {
new_prod += max(((RandomRange(50) + 10) * old_prod) >> 8, 1U);
}