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

patch: autoconvert #4774

Closed
DorpsGek opened this issue Sep 14, 2011 · 4 comments
Closed

patch: autoconvert #4774

DorpsGek opened this issue Sep 14, 2011 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

cirdan opened the ticket and wrote:

I would like to submit my autoconvert patch for inclusion in trunk.

This patch series implements the following two features:

a) Allow to define per-railtype replacements for a rail engine.

With the patch, an engine can have a "default" global replacement (which is the current situation) and then a particular replacement for each railtype in the game. When a train enters a depot and is checked for autoreplace, the replacements are searched using the depot's railtype first, falling back to the global list if there is none (thus preserving backwards compatibility).

A first use of this feature would be to specify different replacements for an engine; for instance, a diesel engine can be set to be replaced by an electric engine if it is running on track that has already been electrified, or by another diesel engine otherwise.

b) Allow to use the convert tool on depots with trains.

When rail conversion is attempted on a depot, trains inside are checked for replacements using the target railtype replacement list; if all of the vehicles can be successfully replaced, the depot is converted. (Otherwise, the usual "train in the way" error is thrown.)

Attachments

Reported version: trunk
Operating system: All


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

crocodile wrote:

Thank you for your patch. But I've found some issues with it.

Firstly, game crashes when I try to autochange any vehicles other than trains. You can try it in attached savegame.

Secondly, my tortoisesvn can't patch using your file, I had to convert it so it could use it. (it's not a bug, it's just a minor inconvenience)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4774#comment10447

@DorpsGek
Copy link
Member Author

crocodile wrote:

Another problem I ran into:
If you try to autoconvert depo with carriages, which are not connected to anything, game crashes


This comment was imported from FlySpray: https://bugs.openttd.org/task/4774#comment10448

@DorpsGek
Copy link
Member Author

cirdan wrote:

Thanks for the report, and sorry for the delay--I don't check the bugtracker very often.

Firstly, game crashes when I try to autochange any vehicles other than trains. You can try it in attached savegame.

There was no need for a savegame: the program crashes as soon as you try to access the autoreplace UI for any vehicle type other than trains, so it was easy to reproduce. The attached patch should fix this.

If you try to autoconvert depo with carriages, which are not connected to anything, game crashes

Hmm, I have a specially prepared savegame that I use as a test, which includes free wagons in a depot, and indeed does it crash. I wonder why I didn't catch this earlier... Anyway, it should also be fixed now.

Secondly, my tortoisesvn can't patch using your file, I had to convert it so it could use it. (it's not a bug, it's just a minor inconvenience)

This is a known issue with tortoisesvn: it chokes on patches unless they have a very specific format. But I can't help you with that because I don't use tortoisesvn.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4774#comment10467

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Mass closure of patch tickets with no commentary for >5 years. Goal is to reduce patch queue as an experiment to see if it aids faster reviewing and rejection/acceptance (it may not). If this offends you and the patch is maintained and compiles with current trunk, discuss with andythenorth in irc. (andythenorth has no ability to review patches but can re-open tickets).


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

@DorpsGek DorpsGek added Autoreplace flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 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/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant