Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect capacity of articulated vehicles displayed in buy menu. #1769

Closed
DorpsGek opened this issue Feb 13, 2008 · 3 comments
Closed

Incorrect capacity of articulated vehicles displayed in buy menu. #1769

DorpsGek opened this issue Feb 13, 2008 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Zephyris opened the ticket and wrote:

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.

Reported version: 0.5.3
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/1769
@DorpsGek
Copy link
Member Author

peter1138 wrote:

Do you have a test GRF, please?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1769#comment3491

@DorpsGek
Copy link
Member Author

Zephyris wrote:

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.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1769#comment3492

@DorpsGek
Copy link
Member Author

peter1138 closed the ticket.

Reason for closing: Fixed

All three work in r12137


This comment was imported from FlySpray: https://bugs.openttd.org/task/1769

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Articulated labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant