summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2021-01-18 22:42:10 +0100
committerGitHub <noreply@github.com>2021-01-18 22:42:10 +0100
commitb3d048dfcf607cdc9f041b3913cb9932b492d539 (patch)
treeb68ca22aaac9eb8069ac21f06f6a69cf6dd5df34 /src/industry_cmd.cpp
parent7da224d29d4af6333d187ccbf5104e6a1bf805f9 (diff)
downloadopenttd-b3d048dfcf607cdc9f041b3913cb9932b492d539.tar.xz
Change: [NewGRF] industry special flag 19 now specifically targets only passenger production, instead of the second cargo of any water-based industry. (#8590)
This behavior is less surprising to NewGRF authors, and may even be intentional behavior for some industries.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 8696e3440..69d67b9d8 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -2754,8 +2754,7 @@ static void ChangeIndustryProduction(Industry *i, bool monthly)
/* Prevent production to overflow or Oil Rig passengers to be over-"produced" */
new_prod = Clamp(new_prod, 1, 255);
-
- if (((indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) != 0) && j == 1 && !(indspec->behaviour & INDUSTRYBEH_WATER_NO_CLAMP_PROD)) {
+ if (i->produced_cargo[j] == CT_PASSENGERS && !(indspec->behaviour & INDUSTRYBEH_NO_PAX_PROD_CLAMP)) {
new_prod = Clamp(new_prod, 0, 16);
}