1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 16:39:09 +00:00

Add: [NewGRF] Extended custom waypoint classes.

This allows waypoints to be split into categories just like stations, instead of all being lumped together.

Station class labels with the first byte set to 0xFF will be treated in the same way as the 'WAYP' class.
This commit is contained in:
2024-05-11 03:10:38 +01:00
parent b30fe0d7da
commit 57ae9eb0fd
2 changed files with 2 additions and 2 deletions

View File

@@ -188,7 +188,7 @@ void RoadStopUpdateCachedTriggers(BaseStation *st);
*/
inline bool IsWaypointClass(const RoadStopClass &cls)
{
return cls.global_id == ROADSTOP_CLASS_LABEL_WAYPOINT;
return cls.global_id == ROADSTOP_CLASS_LABEL_WAYPOINT || GB(cls.global_id, 24, 8) == UINT8_MAX;
}
#endif /* NEWGRF_ROADSTATION_H */

View File

@@ -188,7 +188,7 @@ const StationSpec *GetStationSpec(TileIndex t);
*/
inline bool IsWaypointClass(const StationClass &cls)
{
return cls.global_id == STATION_CLASS_LABEL_WAYPOINT;
return cls.global_id == STATION_CLASS_LABEL_WAYPOINT || GB(cls.global_id, 24, 8) == UINT8_MAX;
}
/* Evaluate a tile's position within a station, and return the result a bitstuffed format. */