1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-21 03:12:41 +01:00

Codechange: Add functions to test if a station/roadstop class is a waypoint.

This is now checked by class label instead of by index.
This commit is contained in:
Peter Nelson
2024-05-07 12:13:47 +01:00
committed by Peter Nelson
parent 9f8c9724be
commit d2c8b476b5
7 changed files with 36 additions and 10 deletions

View File

@@ -1112,7 +1112,7 @@ public:
for (const auto &cls : StationClass::Classes()) {
/* Skip waypoints. */
if (cls.Index() == STAT_CLASS_WAYP) continue;
if (IsWaypointClass(cls)) continue;
if (cls.GetUISpecCount() == 0) continue;
station_classes.push_back(cls.Index());
}