JGRennison / OpenTTD-patches

OpenTTD - http://www.openttd.org/ - with additional patches
Other
585 stars 133 forks source link

[Bug]: Template autorenew fails with "Train too long" if there are "spare" wagons in the depot #707

Closed mallardtheduck closed 4 months ago

mallardtheduck commented 5 months ago

Version of OpenTTD

jgrpp-0.59.1

Expected result

The other vehicles that happen to be in a depot should not affect template autorenew.

Actual result

If there are "spare" wagons in a depot (common for me since I like to have "keep remainders" enabled for autorenew) that in total are longer than the maximum allowed train length, then template autorenew fails for any train that uses that depot with the "Train too long" message.

Maybe an intermediate step in the renew process is trying to add all the unattached wagons in the depot to the train and failing...?

As a mitigation I've set the maximum train length in my game to 64 units, but that's far from ideal (and will still hit the problem eventually).

Steps to reproduce

  1. Place an (in)appropriate number of wagons in a depot, not attached to a locomotive.
  2. Have a train try to autorenew there.
  3. "Advice/information on company's vehicles" should be enabled to see the message.

(In my case I'm working with passenger carriages and locomotives from the RUKTS pack, in case that's relevant.)

JGRennison commented 5 months ago

This should be fixed in the next release