Difference between revisions of "Callback: Refitted capacity callback"

From GRFSpecs
Jump to navigationJump to search
m (Bot: Automated text replacement (-variational action 2 +VarAction2))
(mention misc vehicle flag 5 also here)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Refitted capacity callback (15) ==
 
== Refitted capacity callback (15) ==
   
This callback is used when a vehicle is refitted, to find the new capacity. It is a 15 bit callback since TTDPatch 2.0.1 alpha 40, and allows return values up to 7EFF=32511 units of cargo.
+
This callback is used when a vehicle is refitted, to find the new capacity. {{ottdp| |2.5|ttdprev=alpha 40}} It is a 15 bit callback since TTDPatch 2.0.1 alpha 40, and allows return values up to 7EFF=32511 units of cargo.
  +
{{ottdp|1.2|no}} Via misc. vehicle flag 5 this callback can also be enabled if the vehicle is not refitted and carrying the default cargo. See the [[VehicleRefitting|vehicle refitting]] page for details
   
  +
Information about the new cargo type is available in [[VariationalAction2/Vehicles#Vehicle_cargo_info_.2847.29|variable 47]].
Vehicle variable B9 (for a VarAction2) will be set to the new, climate-specific cargo type (column 3, type B in the [[CargoTypes|cargo type list]]), or to FF when only checking whether the vehicle is refittable.
 
   
 
{{ttdp|}} Additionally vehicle variable B9 (for a VarAction2) will be set to the new, climate-specific cargo type (column 3, type B in the [[CargoTypes|cargo type list]]), or to FF when only checking whether the vehicle is refittable.
Unlike regular refitted capacities (including those from callback 36), the return value is not subject to the usual division of capacities for cargoes other than passengers on trains and planes, instead the capacity is used exactly as returned by the callback. See also the summary page about  [[VehicleRefitting|vehicle refitting]].
 
  +
 
Unlike regular refitted capacities (including those from callback 36), the return value is not subject to the usual division of capacities for cargoes other than passengers on trains and planes, instead the capacity is used exactly as returned by the callback. See also the summary page about [[VehicleRefitting|vehicle refitting]].
 
[[Category:Callbacks]]
 
[[Category:Callbacks]]

Latest revision as of 18:56, 2 February 2012

Refitted capacity callback (15)

This callback is used when a vehicle is refitted, to find the new capacity. Supported by OpenTTD Supported by TTDPatch 2.5 (alpha 40)2.5 It is a 15 bit callback since TTDPatch 2.0.1 alpha 40, and allows return values up to 7EFF=32511 units of cargo. Supported by OpenTTD 1.21.2 Not supported by TTDPatch Via misc. vehicle flag 5 this callback can also be enabled if the vehicle is not refitted and carrying the default cargo. See the vehicle refitting page for details

Information about the new cargo type is available in variable 47.

Supported by TTDPatch Additionally vehicle variable B9 (for a VarAction2) will be set to the new, climate-specific cargo type (column 3, type B in the cargo type list), or to FF when only checking whether the vehicle is refittable.

Unlike regular refitted capacities (including those from callback 36), the return value is not subject to the usual division of capacities for cargoes other than passengers on trains and planes, instead the capacity is used exactly as returned by the callback. See also the summary page about vehicle refitting.