1
0
Fork 0

Codechange: make script and internal NEW_STATION have the same value

pull/13397/head
Rubidium 2025-01-28 17:21:15 +01:00 committed by rubidium42
parent b32e638e94
commit d1e001f1c8
2 changed files with 6 additions and 10 deletions

View File

@ -12,6 +12,7 @@
#include "script_text.hpp" #include "script_text.hpp"
#include "script_date.hpp" #include "script_date.hpp"
#include "../../station_type.h"
/** /**
* Base class for stations and waypoints. * Base class for stations and waypoints.
@ -19,15 +20,9 @@
*/ */
class ScriptBaseStation : public ScriptObject { class ScriptBaseStation : public ScriptObject {
public: public:
/** static const StationID STATION_NEW = ::NEW_STATION; ///< Build a new station
* Special station IDs for building adjacent/new stations when static const StationID STATION_JOIN_ADJACENT = ::ADJACENT_STATION; ///< Join an neighbouring station if one exists
* the adjacent/distant join features are enabled. static const StationID STATION_INVALID = ::INVALID_STATION; ///< Invalid station id.
*/
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.
};
/** /**
* Checks whether the given basestation is valid and owned by you. * Checks whether the given basestation is valid and owned by you.

View File

@ -22,7 +22,8 @@ struct RoadStop;
struct StationSpec; struct StationSpec;
struct Waypoint; 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; static const StationID INVALID_STATION = 0xFFFF;
typedef SmallStack<StationID, StationID, INVALID_STATION, 8, 0xFFFD> StationIDStack; typedef SmallStack<StationID, StationID, INVALID_STATION, 8, 0xFFFD> StationIDStack;