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
AIOrder.SetOrderFlags doesn't always work for ships #8039
Comments
OpenTTD/src/script/api/script_order.cpp Lines 262 to 265 in 6fde854
Problem is there! It's not checking for oil rigs Somebody with time, the fix is replace that line with |
This is also affecting AIOrder.GerOrderDestination |
SamuXarick
added a commit
to SamuXarick/OpenTTD
that referenced
this issue
Mar 20, 2020
…t work for oil rigs
LordAro
pushed a commit
to LordAro/OpenTTD
that referenced
this issue
Mar 30, 2020
…t work for oil rigs
LordAro
pushed a commit
that referenced
this issue
Mar 31, 2020
douiwby
pushed a commit
to douiwby/OpenTTD
that referenced
this issue
Apr 16, 2020
…t work for oil rigs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version of OpenTTD
OpenTTD 1.10.0-RC1
Expected result
When my AI creates a new freight service with ships from a ship depot (
location1
), via an oil rig (location2
) to an oil refinery, it executes code similar to below when giving the ship (vehicle
) its orders. After the following lines I would expect that the second order of the ship is marked as "full load any cargo".Note that
location1
andlocation2
contain a TileIndex.vehicle
is the VehicleID of the ship.Actual result
The second order has no order flags that are visible in the order list of the ship. I'm not sure if it is related to the oil rig or to the ship. I know that similar code (with location1 and location2 being other stations/depots) does work properly with trains and trucks.
A workaround that works and I'll use for my AI is to change the code to
Steps to reproduce
Install RailwAI version 20 (I'll add a workaround in version 21), and wait until a freight route for ships is made. With the code in the file idea.nut I would expect it to set the order flag to.
The text was updated successfully, but these errors were encountered: