Difference between revisions of "Callback: Load amount"
Planetmaker (talk | contribs) (Create CB LoadAmount) |
(use new grf templates) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Load amount (12) == |
== Load amount (12) == |
||
+ | |||
+ | {{grfTill|7}} This callback is only called for GRF version 7 and below. |
||
+ | {{grfFrom|8}} For GRF version 8 and above use [[Callback:_Change_vehicle_properties|callback 36]]. |
||
This callback is used instead of [[Action0General#Load amount|property 07]] when loading a game or rearranging a train in a depot (or when buying other vehicles). If the callback fails, the value of property 07 is used instead. |
This callback is used instead of [[Action0General#Load amount|property 07]] when loading a game or rearranging a train in a depot (or when buying other vehicles). If the callback fails, the value of property 07 is used instead. |
||
Line 8: | Line 11: | ||
Finally to distinguish the passenger and the mail part you can use variable 47 or even 40. |
Finally to distinguish the passenger and the mail part you can use variable 47 or even 40. |
||
+ | [[Category:Callbacks]] |
Latest revision as of 13:19, 1 April 2012
Load amount (12)
GRFv≤7 This callback is only called for GRF version 7 and below. GRFv≥8 For GRF version 8 and above use callback 36.
This callback is used instead of property 07 when loading a game or rearranging a train in a depot (or when buying other vehicles). If the callback fails, the value of property 07 is used instead.
Note: For aircraft carrying both passengers and mail this callback is broken (wrt. mail) in TTDPatch and OpenTTD before r14672.
Since OpenTTD r14672 the callback is called for passengers and for mail. The mail compartment behaves like a wagon attached to a train engine. I.e. to read general variables of the aircraft you have to use varaction2 type 82/86/8A (related object), as most variables are not valid for the mail compartment.
Finally to distinguish the passenger and the mail part you can use variable 47 or even 40.