| 170 | } |
| 171 | |
| 172 | bool IsPossibleDockingTile(Tile t) |
| 173 | { |
| 174 | assert(IsValidTile(t)); |
| 175 | switch (GetTileType(t)) { |
| 176 | case MP_WATER: |
| 177 | if (IsLock(t) && GetLockPart(t) == LockPart::Middle) return false; |
| 178 | [[fallthrough]]; |
| 179 | case MP_RAILWAY: |
| 180 | case MP_STATION: |
| 181 | case MP_TUNNELBRIDGE: |
| 182 | return TrackStatusToTrackBits(GetTileTrackStatus(t, TRANSPORT_WATER, 0)) != TRACK_BIT_NONE; |
| 183 | |
| 184 | default: |
| 185 | return false; |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * Mark the supplied tile as a docking tile if it is suitable for docking. |
no test coverage detected