* Check whether a station type can be build. * @return true if building is allowed. */
| 85 | * @return true if building is allowed. |
| 86 | */ |
| 87 | static bool IsStationAvailable(const StationSpec *statspec) |
| 88 | { |
| 89 | if (statspec == nullptr || !statspec->callback_mask.Test(StationCallbackMask::Avail)) return true; |
| 90 | |
| 91 | uint16_t cb_res = GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, nullptr, INVALID_TILE); |
| 92 | if (cb_res == CALLBACK_FAILED) return true; |
| 93 | |
| 94 | return Convert8bitBooleanCallback(statspec->grf_prop.grffile, CBID_STATION_AVAILABILITY, cb_res); |
| 95 | } |
| 96 | |
| 97 | void CcPlaySound_CONSTRUCTION_RAIL(Commands, const CommandCost &result, TileIndex tile) |
| 98 | { |
no test coverage detected