diff options
Diffstat (limited to 'src/script/api/script_waypoint.hpp')
-rw-r--r-- | src/script/api/script_waypoint.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/script/api/script_waypoint.hpp b/src/script/api/script_waypoint.hpp index 645cc2daf..797501e7e 100644 --- a/src/script/api/script_waypoint.hpp +++ b/src/script/api/script_waypoint.hpp @@ -13,6 +13,7 @@ #define SCRIPT_WAYPOINT_HPP #include "script_basestation.hpp" +#include "../../station_type.h" /** * Class that handles all waypoint related functions. @@ -21,16 +22,6 @@ class ScriptWaypoint : public ScriptBaseStation { public: /** - * Type of waypoints known in the game. - */ - enum WaypointType { - /* Values are important, as they represent the internal state of the game. */ - WAYPOINT_RAIL = 0x01, ///< Rail waypoint - WAYPOINT_BUOY = 0x10, ///< Buoy - WAYPOINT_ANY = 0x11, ///< All waypoint types - }; - - /** * All waypoint related error messages. */ enum ErrorMessages { @@ -45,6 +36,16 @@ public: }; /** + * Type of waypoints known in the game. + */ + enum WaypointType { + /* Note: these values represent part of the in-game StationFacility enum */ + WAYPOINT_RAIL = ::FACIL_TRAIN, ///< Rail waypoint + WAYPOINT_BUOY = ::FACIL_DOCK, ///< Buoy + WAYPOINT_ANY = WAYPOINT_RAIL | WAYPOINT_BUOY, ///< All waypoint types + }; + + /** * Checks whether the given waypoint is valid and owned by you. * @param waypoint_id The waypoint to check. * @return True if and only if the waypoint is valid. |