diff --git a/src/script/api/script_basestation.hpp b/src/script/api/script_basestation.hpp index cf6388f327..adf58c6a38 100644 --- a/src/script/api/script_basestation.hpp +++ b/src/script/api/script_basestation.hpp @@ -12,6 +12,7 @@ #include "script_text.hpp" #include "script_date.hpp" +#include "../../station_type.h" /** * Base class for stations and waypoints. @@ -19,15 +20,9 @@ */ class ScriptBaseStation : public ScriptObject { public: - /** - * Special station IDs for building adjacent/new stations when - * the adjacent/distant join features are enabled. - */ - enum SpecialStationIDs { - STATION_NEW = 0xFFFD, ///< Build a new station - STATION_JOIN_ADJACENT = 0xFFFE, ///< Join an neighbouring station if one exists - STATION_INVALID = 0xFFFF, ///< Invalid station id. - }; + static const StationID STATION_NEW = ::NEW_STATION; ///< Build a new station + static const StationID STATION_JOIN_ADJACENT = ::ADJACENT_STATION; ///< Join an neighbouring station if one exists + static const StationID STATION_INVALID = ::INVALID_STATION; ///< Invalid station id. /** * Checks whether the given basestation is valid and owned by you. diff --git a/src/station_type.h b/src/station_type.h index 7a4bd0cb62..54a4ea814c 100644 --- a/src/station_type.h +++ b/src/station_type.h @@ -22,7 +22,8 @@ struct RoadStop; struct StationSpec; struct Waypoint; -static const StationID NEW_STATION = 0xFFFE; +static const StationID NEW_STATION = 0xFFFD; +static const StationID ADJACENT_STATION = 0xFFFE; static const StationID INVALID_STATION = 0xFFFF; typedef SmallStack StationIDStack;