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

Missing documentation for AIVehicle::RefitVehicle #6514

Closed
DorpsGek opened this issue Sep 21, 2016 · 2 comments
Closed

Missing documentation for AIVehicle::RefitVehicle #6514

DorpsGek opened this issue Sep 21, 2016 · 2 comments
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Kogut opened the ticket and wrote:

Wagon unattached to engine may not be refitted, even if other preconditions are fullfilled.

Note that wagon in depot, unattached to an engine will not always return false for IsValidVehicle(vehicle_id) (note also AIVehicle.MoveWagon must be able to move newly constructed wagon, so it is tricky whatever lone wagon should return true for IsValidVehicle).

It seems that presence of engine changes whatever lone wagon IsValidVehicle but it is changing whatever lone wagon may be refitted.

I attached also debug AI used to test game behaviour.

Attachments

Reported version: 1.6.1
Operating system: All


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

Kogut wrote:

It gets better: I am investigating further, but at least in part it is confused by AIVehicle::BuildVehicle problem.

If depot already has unattached wagons AIVehicle::BuildVehicle will return id, but wagon will join other wagons and therefore this id will immediately become invalid.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6514#comment14278

@DorpsGek
Copy link
Member Author

Alberth closed the ticket.

Reason for closing: Requested by user

Not sure why you request closure, but wish granted


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

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant