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

AITile.HasTrasportType does not return true for airport tiles #4117

Closed
DorpsGek opened this issue Sep 10, 2010 · 3 comments
Closed

AITile.HasTrasportType does not return true for airport tiles #4117

DorpsGek opened this issue Sep 10, 2010 · 3 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

Attila7 opened the ticket and wrote:

According to the documentation, AITile.HasTransportType(tile,AITile.TRANSPORT_AIR) should return true if the tile has an airport on it. It does not.

I am not exactly sure where the bug is, but it appears that TRANSPORT_AIR needs special handling in function GetTileTrackStatus_Station in file station_cmd.cpp or the code should not end up in there in the first place.

Reported version: trunk
Operating system: All


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

SmatZ wrote:

* @return True if and only if the tile has the given TransportType.
TRANSPORT_AIR is special in such a way that all tiles have in fact that transport type (aircraft can fly over them)


This comment was imported from FlySpray: https://bugs.openttd.org/task/4117#comment8753

@DorpsGek
Copy link
Member Author

Yexo wrote:

The function isn't intended to work for airport tiles, but that fact is missing from the documentation. Use AIAirport.IsAirportTile instead.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4117#comment8754

@DorpsGek
Copy link
Member Author

Yexo closed the ticket.

Reason for closing: Won't fix

Documented the behavior in r20798


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

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