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

AIRail::RemoveRail requested to remove inexisting railway produces ERR_UNKNOWN #5651

Closed
DorpsGek opened this issue Jul 15, 2013 · 3 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Kogut opened the ticket and wrote:

r25610

NoAI api documentation: http://noai.openttd.org/api/trunk/classAIRail.html# ebe4bfa80bcefe70c06a9d84e7f80147

AIRail::RemoveRail requested to remove inexisting railway produces ERR_UNKNOWN, but it probably should be enforced by precondition ("at least one piece of rail exists at targeted area") or it should produce error code equivalent of "there is no railway track here" from GUI.

similar to http://bugs.openttd.org/task/5648?project=1&type[0]=&sev[0]=&pri[0]=&due[0]=&cat[0]=27&status[0]=&percent[0]=&reported[0]=

Reported version: trunk
Operating system: All


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

Kogut wrote:

my testAI used to check what I reported:

AIRail.SetCurrentRailType(AIRailTypeList().Begin());
AIRail.RemoveRail(AIMap.GetTileIndex(5, 5), AIMap.GetTileIndex(5, 6), AIMap.GetTileIndex(5, 7));
AILog.Info(AIError.GetLastErrorString());
AIRail.RemoveRail(AIMap.GetTileIndex(5, 5), AIMap.GetTileIndex(5, 6), AIMap.GetTileIndex(5, 9));
AILog.Info(AIError.GetLastErrorString());
if(!AIRail.BuildRail(AIMap.GetTileIndex(5, 5), AIMap.GetTileIndex(5, 6), AIMap.GetTileIndex(5, 7))) {
AILog.Error("Bad map.");
AISign.BuildSign(AIMap.GetTileIndex(5, 6), "<>");
}
AIRail.RemoveRail(AIMap.GetTileIndex(5, 5), AIMap.GetTileIndex(5, 6), AIMap.GetTileIndex(5, 9));
AILog.Info(AIError.GetLastErrorString());


This comment was imported from FlySpray: https://bugs.openttd.org/task/5651#comment12409

@DorpsGek
Copy link
Member Author

Kogut wrote:

Argh, inability to edit created tickets strikes again - it is "NoAI", not "Core" category.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5651#comment12410

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r25614


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

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) 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/)
Projects
None yet
Development

No branches or pull requests

1 participant