summaryrefslogtreecommitdiff
path: root/src/newgrf_industries.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-04 18:27:21 +0000
committerrubidium <rubidium@openttd.org>2007-07-04 18:27:21 +0000
commitc0ba3dba9da4a11867b428693c84b46853dc306b (patch)
tree055e7c9a0bb15c98a3fd1404abeba74e87f53ab1 /src/newgrf_industries.cpp
parentcb5cdfbf9d47b10ce9886e0f351b039eb8ac28e2 (diff)
downloadopenttd-c0ba3dba9da4a11867b428693c84b46853dc306b.tar.xz
(svn r10439) -Codechange: initial steps for customized industry productions.
Diffstat (limited to 'src/newgrf_industries.cpp')
-rw-r--r--src/newgrf_industries.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index 61f3ae224..8e0ba446d 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -123,8 +123,8 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par
case 0x41:
case 0x42: { // waiting cargo, but only if those two callback flags are set
uint16 callback = indspec->callback_flags;
- if (callback & (CBM_IND_PRODUCTION_CARGO_ARRIVAL | callback & CBM_IND_PRODUCTION_256_TICKS)) {
- return max(industry->cargo_waiting[variable - 0x40], (uint16)0x7FFF);
+ if (callback & (CBM_IND_PRODUCTION_CARGO_ARRIVAL | CBM_IND_PRODUCTION_256_TICKS)) {
+ return max(industry->incoming_cargo_waiting[variable - 0x40], (uint16)0x7FFF);
} else {
return 0;
}
@@ -173,10 +173,10 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par
/* */
case 0x88:
case 0x89: return indspec->produced_cargo[variable - 0x88];
- case 0x8A: return industry->cargo_waiting[0];
- case 0x8B: return GB(industry->cargo_waiting[0], 8, 8);
- case 0x8C: return industry->cargo_waiting[1];
- case 0x8D: return GB(industry->cargo_waiting[1], 8, 8);
+ case 0x8A: return industry->produced_cargo_waiting[0];
+ case 0x8B: return GB(industry->produced_cargo_waiting[0], 8, 8);
+ case 0x8C: return industry->produced_cargo_waiting[1];
+ case 0x8D: return GB(industry->produced_cargo_waiting[1], 8, 8);
case 0x8E:
case 0x8F: return industry->production_rate[variable - 0x8E];
case 0x90: