FS#6198 - It is impossible to specify capacity in purchase window for ARV correctly

Attached to Project: OpenTTD
Opened by George (George) - Wednesday, 31 December 2014, 00:54 GMT
Last edited by andythenorth (andythenorth) - Thursday, 31 August 2017, 17:53 GMT
Type Feature Request
Category Vehicles → Articulated
Status Closed
Assigned To No-one
Operating System All
Severity High
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



Problem occures in purchase menu only, already build ARVs have correct capacity.

When I specify the ARV that consist of at least two parts with the specified ID, I get the problem to specify capacity, that can not be divided to the amount of the parts.
For example, the ARV consists of two parts with the same ID
I need the capacity ARV capacity 333.
If I cpecify "purchase_cargo_capacity: return 333;" I get 666, If I specify "purchase_cargo_capacity: return 333/2;" I get 332.
If I use cargo_capacity CB, I can't use position_in_articulated_veh, so if it returns 333 I get 666, if it returns 333/2 I get 332.

What to do?
This task depends upon

Closed by  andythenorth (andythenorth)
Thursday, 31 August 2017, 17:53 GMT
Reason for closing:  Won't implement
Additional comments about closing:  From George:

- as I can test in r27876 EM167 in xUSSR set works correctly (I use capacity CB without purchase capacity). So, the problem was solved with some change.

Flyspray clean up, so closing, thanks.
Comment by George (George) - Wednesday, 31 December 2014, 00:55 GMT
Without position_in_articulated_veh it cant return 333 for first part and 0 for the second part
Comment by andythenorth (andythenorth) - Saturday, 12 August 2017, 17:01 GMT
Recommended: use an alternate ID for the trailing vehicles, and divide capacity appropriately.
Comment by andythenorth (andythenorth) - Monday, 21 August 2017, 18:50 GMT
Had to close and re-open to clear previous closure request :|