Old revision #pg1abrk2j | New revision #pwwcxs3a7 | ||
---|---|---|---|
6 | industry properties: | 6 | industry properties: |
7 | * property 10 and 11 remain unchanged. additional cargos can only be defined via callback. | 7 | * property 10 and 11 remain unchanged. additional cargos can only be defined via callback. |
8 | * property 12 and 13, 1C, 1D and 1E remain unchanged. additional cargos must use production callback. | 8 | * property 12 and 13, 1C, 1D and 1E remain unchanged. additional cargos must use production callback. |
9 | * | 9 | * property 1A: new special flag 18/0x40000 to enable more than 3/2 input/output cargos. this changes the behaviour of various callbacks, see below. (IndustrySpec::behaviour, INDUSTRYBEH_xxx) |
10 | 10 | ||
11 | industry tile properties: | 11 | industry tile properties: |
12 | * property 0A, 0B and 0C remain unchanged. Industries have to distribute multiple acceptances over multiple tiles. | 12 | * property 0A, 0B and 0C remain unchanged. Industries have to distribute multiple acceptances over multiple tiles. |
13 | 13 | ||
14 | industry variables | 14 | industry variables (IndustriesScopeResolver::GetVariable): |
15 | * var 69[x]: waiting cargo for cargo x. x is an index into the cargo translation table | 15 | * var 69[x]: waiting cargo for cargo x. x is an index into the cargo translation table |
16 | * var 6A[x]: Amount of cargo produced this month for cargo x. x is an index into the cargo translation table | 16 | * var 6A[x]: Amount of cargo produced this month for cargo x. x is an index into the cargo translation table |
17 | * var 6B[x]: Amount of cargo transported this month for cargo x (like 98 and 9A). x is an index into the cargo translation table | 17 | * var 6B[x]: Amount of cargo transported this month for cargo x (like 98 and 9A). x is an index into the cargo translation table | … | … |
23 | 23 | ||
24 | callback 2B and 2C remain unchanged. Industries have to distribute multiple acceptances over multiple tiles. | 24 | callback 2B and 2C remain unchanged. Industries have to distribute multiple acceptances over multiple tiles. |
25 | 25 | ||
26 | callback 37: | 26 | callback 37: (CBID_INDUSTRY_CARGO_SUFFIX) |
27 | * if special flag 40000 is clear: | 27 | * if special flag 40000 is clear: |
28 | var 18 bits 0..7: | 28 | var 18 bits 0..7: |
29 | 00..04 with old behaviour | 29 | 00..04 with old behaviour | … | … |
35 | 35 | ||
36 | callback 3D remains unchanged, it works just fine. | 36 | callback 3D remains unchanged, it works just fine. |
37 | 37 | ||
38 | callback 14B, 14C: | 38 | callback 14B, 14C: (CBID_INDUSTRY_INPUT_CARGO_TYPES, CBID_INDUSTRY_OUTPUT_CARGO_TYPES) |
39 | * these callback are now called more often than before. | 39 | * these callback are now called more often than before. |
40 | * if the newgrf returns more types than allowed, this raises a newgrf error message. (ErrorUnknownCallbackResult) | 40 | * if the newgrf returns more types than allowed, this raises a newgrf error message. (ErrorUnknownCallbackResult) |
41 | * if special flag 40000 is clear, this also enforced max 3 input and 2 output cargos. | 41 | * if special flag 40000 is clear, this also enforced max 3 input and 2 output cargos. | … | … |
43 | * if the callback may return different cargo types at different types, then the "purchase list" variant must return a superset of all possible results. | 43 | * if the callback may return different cargo types at different types, then the "purchase list" variant must return a superset of all possible results. |
44 | OpenTTD checks this and issues ErrorUnknownCallbackResult or similar. | 44 | OpenTTD checks this and issues ErrorUnknownCallbackResult or similar. |
45 | 45 | ||
46 | production callback version 02: | 46 | production callback version 02: (IndustryProductionSpriteGroup, NewSpriteGroup, IndustryProductionCallback) |
47 | 02 0A <set-id> <version> <num-input-cargo> ( <input-cargo-x> <subtract-in-x> )* <num-output-cargos> ( <output-cargo-x> <add-out-x> )* <again> | 47 | 02 0A <set-id> <version> <num-input-cargo> ( <input-cargo-x> <subtract-in-x> )* <num-output-cargos> ( <output-cargo-x> <add-out-x> )* <again> |
48 | <set-id> B ID for this definition | 48 | <set-id> B ID for this definition |
49 | <version> B Version of the production callback format, 02 | 49 | <version> B Version of the production callback format, 02 |