You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Callbacks for articulated vehicles do not work in the buy menu, resulting in the incorrect cargo capacity being displayed. The capacity of the first vehicle, not the total capacity, is displayed. The callback is not used, even if the cargo type FF (in the action3) directly targets the callback. The GRF specifications (Articulated engine callback (16), http://wiki.ttdpatch.net/tiki-index.php?page=Callbacks) state that the behaviour in TTDPatch is to use the callback to adjust the buy menu graphics.
It would be consistent to show the cargo capacity of the total articulated consist in the buy menu. Currently the total capacity of a double headed train is shown, and it would be good if articulated vehicles shared this behaviour.
Here are three subtly different examples to test different coding styles. The vehicle is a tram introduced in 2009 in all climates. The cargo capacity is 50 passengers per carriage, 3 cars so 150 total.
articdemo.grf
action3 targets the callback test action2 both for cargo type FF (buy menu graphics) and as the default.
This results in an error from nforenum, so I am not certain it is valid code.
articdemo2.grf
action3 targets a callback test action2 for the cargo type FF, and a different callback test action2 as the default.
This is a somewhat convoluted way I used to try and force the buy menu graphics to go via the callback.
articdemo3.grf
action3 has no cargo specific graphics, and targets a callback test action2 as the default.
This is the basic coding style, I would still expect the callback to be called for the buy menu.
Zephyris opened the ticket and wrote:
Reported version: 0.5.3
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/1769
The text was updated successfully, but these errors were encountered: