Callback: Refit cost factor
From GRFSpecs
Jump to navigationJump to searchRefit cost factor (15E)
This callback can be used to override the refit cost property of vehicles. This callback will also be called in purchase list scope, so either limit the used variables to what is available in the purchase list or branch on the special purchase list cargo type.
Variable 10 contains information about the target cargo type similar to variable 47.
Format: ccccwwtt
Variable | Value |
---|---|
tt | The cargo type being refitted to; translated if a translation table has been installed |
ww | Subtype being refitted to |
cccc | The cargo class value of the cargo being refitted to |
Return values:
- Bits 0-13: Refit cost factor, cost base depends on the vehicle type and is the same as the refit cost property.
- Bit 14: If set, the refit is allowed as an auto-refit.
If the callback fails, the value of the refit cost property is used.