Difference between revisions of "Callback: Load amount"
m (Create a separate page for each callback *** existing text overwritten ***) |
(use new grf templates) |
||
(One intermediate revision by the same user 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. |
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.