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