Feature: Add NotRoadTypes (NRT)

This commit is contained in:
peter1138
2019-04-06 07:46:15 +01:00
committed by Michael Lutz
parent 21edf67f89
commit c02ef3e456
106 changed files with 4465 additions and 1245 deletions

View File

@@ -211,13 +211,11 @@ template<bool Tfrom, bool Tvia>
if (!IsValidStation(station_id)) return false;
if (!ScriptRoad::IsRoadTypeAvailable(road_type)) return false;
::RoadTypes r = RoadTypeToRoadTypes((::RoadType)road_type);
for (const RoadStop *rs = ::Station::Get(station_id)->GetPrimaryRoadStop(ROADSTOP_BUS); rs != nullptr; rs = rs->next) {
if ((::GetRoadTypes(rs->xy) & r) != 0) return true;
if (HasBit(::GetPresentRoadTypes(rs->xy), (::RoadType)road_type)) return true;
}
for (const RoadStop *rs = ::Station::Get(station_id)->GetPrimaryRoadStop(ROADSTOP_TRUCK); rs != nullptr; rs = rs->next) {
if ((::GetRoadTypes(rs->xy) & r) != 0) return true;
if (HasBit(::GetPresentRoadTypes(rs->xy), (::RoadType)road_type)) return true;
}
return false;