Old revision #phhnp7qo0 | New revision #p68rqetdr | ||
---|---|---|---|
3 | * @param tile Tile to query | 3 | * @param tile Tile to query |
4 | * @param diagdir Optional diagonal direction to look for axis compatibility. | 4 | * @param diagdir Optional diagonal direction to look for axis compatibility. |
5 | * @return True if the tile is a target for ships to get to a nearby dock. | 5 | * @return True if the tile is a target for ships to get to a nearby dock. |
6 | * @note If the axis of the provided diagdir is paral | 6 | * @note If the axis of the provided diagdir is parallel to the axis of a nearby |
7 | * dock station, this function returns | 7 | * dock station, this function returns False. If diagdir is not provided, |
8 | * only tile locations are compared. | 8 | * only tile locations are compared. |
9 | */ | 9 | */ |
10 | 10 | bool IsTileDock(TileIndex tile, DiagDirection diagdir = INVALID_DIAGDIR) | |
11 | { | 11 | { |
12 | Axis axis = diagdir == INVALID_DIAGDIR ? INVALID_AXIS : DiagDirToAxis(diagdir); | 12 | Axis axis = diagdir == INVALID_DIAGDIR ? INVALID_AXIS : DiagDirToAxis(diagdir); |
13 | 13 |