Loading

Revision differences

Old revision #pg1abrk2jNew revision #pwwcxs3a7
6industry properties:  6industry 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*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.  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  
11industry tile properties:  11industry 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  
14industry variables:  14industry 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  
24callback 2B and 2C remain unchanged. Industries have to distribute multiple acceptances over multiple tiles.  24callback 2B and 2C remain unchanged. Industries have to distribute multiple acceptances over multiple tiles.  
25  25  
26callback 37:  26callback 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  
36callback 3D remains unchanged, it works just fine.  36callback 3D remains unchanged, it works just fine.  
37  37  
38callback 14B, 14C:  38callback 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  
46production callback version 02:  46production 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