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

Change a nop refit back to nop instead of error #3475

Closed
DorpsGek opened this issue Jan 4, 2010 · 1 comment
Closed

Change a nop refit back to nop instead of error #3475

DorpsGek opened this issue Jan 4, 2010 · 1 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

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jan 4, 2010

Yexo opened the ticket and wrote:

Since r17899 a refit operation that doesn't actually refit any wagons throws an error. Before it was simply a nop. This is a problem for AIs as there is no easy way to determine if part of a vehicle can be refitted or not, so just always refitting is the easiest. If the refit fails they can't determine if this was because refitting isn't possible (an error) or because no part of the vehicle was refitted. Attached patch reverts part of r17899 so it will return true even if no part of the vehicle was refitted.

I realize it'll now also return true when refitting to a cargotype the vehicle doesn't support, but AIs can test for that with AIEngine::CanRefitCargo.

Attachments

Reported version: Version?
Operating system: All


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

DorpsGek commented Jan 4, 2010

Yexo closed the ticket.

Reason for closing: Fixed

In r18724


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

@DorpsGek DorpsGek closed this as completed Jan 4, 2010
@DorpsGek DorpsGek added Core 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