Class that handles all waypoint related functions. More...
#include <script_waypoint.hpp>
Public Types | |
enum | ErrorMessages { ERR_WAYPOINT_BASE = ScriptError::ERR_CAT_WAYPOINT << ScriptError::ERR_CAT_BIT_SIZE, ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS } |
All waypoint related error messages. More... | |
enum | WaypointType { WAYPOINT_RAIL = ::FACIL_TRAIN, WAYPOINT_BUOY = ::FACIL_DOCK, WAYPOINT_ANY = WAYPOINT_RAIL | WAYPOINT_BUOY } |
Type of waypoints known in the game. More... | |
Static Public Member Functions | |
static bool | IsValidWaypoint (StationID waypoint_id) |
Checks whether the given waypoint is valid and owned by you. | |
static StationID | GetWaypointID (TileIndex tile) |
Get the StationID of a tile. | |
static bool | HasWaypointType (StationID waypoint_id, WaypointType waypoint_type) |
Check if any part of the waypoint contains a waypoint of the type waypoint_type. |
Class that handles all waypoint related functions.
ai game
Definition at line 22 of file script_waypoint.hpp.
All waypoint related error messages.
Definition at line 27 of file script_waypoint.hpp.
Type of waypoints known in the game.
Definition at line 41 of file script_waypoint.hpp.
Get the StationID of a tile.
tile | The tile to find the StationID of. |
Definition at line 24 of file script_waypoint.cpp.
References GetStationIndex(), ScriptMarine::IsBuoyTile(), and ScriptRail::IsRailWaypointTile().
bool ScriptWaypoint::HasWaypointType | ( | StationID | waypoint_id, | |
WaypointType | waypoint_type | |||
) | [static] |
Check if any part of the waypoint contains a waypoint of the type waypoint_type.
waypoint_id | The waypoint to look at. | |
waypoint_type | The WaypointType to look for. |
Definition at line 31 of file script_waypoint.cpp.
References HasExactlyOneBit(), and IsValidWaypoint().
bool ScriptWaypoint::IsValidWaypoint | ( | StationID | waypoint_id | ) | [static] |
Checks whether the given waypoint is valid and owned by you.
waypoint_id | The waypoint to check. |
Definition at line 18 of file script_waypoint.cpp.
References ScriptObject::GetCompany(), and OWNER_DEITY.
Referenced by HasWaypointType().