static */
| 206 | } |
| 207 | |
| 208 | /* static */ bool ScriptStation::HasRoadType(StationID station_id, ScriptRoad::RoadType road_type) |
| 209 | { |
| 210 | if (!IsValidStation(station_id)) return false; |
| 211 | if (!ScriptRoad::IsRoadTypeAvailable(road_type)) return false; |
| 212 | |
| 213 | for (const RoadStop *rs = ::Station::Get(station_id)->GetPrimaryRoadStop(RoadStopType::Bus); rs != nullptr; rs = rs->next) { |
| 214 | if (::GetPresentRoadTypes(rs->xy).Test(::RoadType(road_type))) return true; |
| 215 | } |
| 216 | for (const RoadStop *rs = ::Station::Get(station_id)->GetPrimaryRoadStop(RoadStopType::Truck); rs != nullptr; rs = rs->next) { |
| 217 | if (::GetPresentRoadTypes(rs->xy).Test(::RoadType(road_type))) return true; |
| 218 | } |
| 219 | |
| 220 | return false; |
| 221 | } |
| 222 | |
| 223 | /* static */ TownID ScriptStation::GetNearestTown(StationID station_id) |
| 224 | { |
nothing calls this directly
no test coverage detected