Waypoints¶
- class SpaceCenter.WaypointManager¶
Waypoints are the location markers you can see on the map view showing you where contracts are targeted for. With this structure, you can obtain coordinate data for the locations of these waypoints. Obtained by calling
SpaceCenter.waypoint_manager
.- waypoints: List¶
A list of all existing waypoints.
- Attribute:
Read-only, cannot be set
- Return type:
List
- add_waypoint(latitude, longitude, body, name)¶
Creates a waypoint at the given position at ground level, and returns a
SpaceCenter.Waypoint
object that can be used to modify it.- Parameters:
latitude (
number
) – Latitude of the waypoint.longitude (
number
) – Longitude of the waypoint.body (
SpaceCenter.CelestialBody
) – Celestial body the waypoint is attached to.name (
string
) – Name of the waypoint.
- Return type:
- add_waypoint_at_altitude(latitude, longitude, altitude, body, name)¶
Creates a waypoint at the given position and altitude, and returns a
SpaceCenter.Waypoint
object that can be used to modify it.- Parameters:
latitude (
number
) – Latitude of the waypoint.longitude (
number
) – Longitude of the waypoint.altitude (
number
) – Altitude (above sea level) of the waypoint.body (
SpaceCenter.CelestialBody
) – Celestial body the waypoint is attached to.name (
string
) – Name of the waypoint.
- Return type:
- colors: Map¶
An example map of known color - seed pairs. Any other integers may be used as seed.
- Attribute:
Read-only, cannot be set
- Return type:
Map
- icons: List¶
Returns all available icons (from “GameData/Squad/Contracts/Icons/”).
- Attribute:
Read-only, cannot be set
- Return type:
List
- class SpaceCenter.Waypoint¶
Represents a waypoint. Can be created using
SpaceCenter.WaypointManager.add_waypoint()
.- body: SpaceCenter.CelestialBody¶
The celestial body the waypoint is attached to.
- Attribute:
Can be read or written
- Return type:
- name: string¶
The name of the waypoint as it appears on the map and the contract.
- Attribute:
Can be read or written
- Return type:
string
- color: number¶
The seed of the icon color. See
SpaceCenter.WaypointManager.colors
for example colors.- Attribute:
Can be read or written
- Return type:
number
- icon: string¶
The icon of the waypoint.
- Attribute:
Can be read or written
- Return type:
string
- latitude: number¶
The latitude of the waypoint.
- Attribute:
Can be read or written
- Return type:
number
- longitude: number¶
The longitude of the waypoint.
- Attribute:
Can be read or written
- Return type:
number
- mean_altitude: number¶
The altitude of the waypoint above sea level, in meters.
- Attribute:
Can be read or written
- Return type:
number
- surface_altitude: number¶
The altitude of the waypoint above the surface of the body or sea level, whichever is closer, in meters.
- Attribute:
Can be read or written
- Return type:
number
- bedrock_altitude: number¶
The altitude of the waypoint above the surface of the body, in meters. When over water, this is the altitude above the sea floor.
- Attribute:
Can be read or written
- Return type:
number
- near_surface: boolean¶
True
if the waypoint is near to the surface of a body.- Attribute:
Read-only, cannot be set
- Return type:
boolean
- grounded: boolean¶
True
if the waypoint is attached to the ground.- Attribute:
Read-only, cannot be set
- Return type:
boolean
- index: number¶
The integer index of this waypoint within its cluster of sibling waypoints. In other words, when you have a cluster of waypoints called “Somewhere Alpha”, “Somewhere Beta” and “Somewhere Gamma”, the alpha site has index 0, the beta site has index 1 and the gamma site has index 2. When
SpaceCenter.Waypoint.clustered
isFalse
, this is zero.- Attribute:
Read-only, cannot be set
- Return type:
number
- clustered: boolean¶
True
if this waypoint is part of a set of clustered waypoints with greek letter names appended (Alpha, Beta, Gamma, etc). IfTrue
, there is a one-to-one correspondence with the greek letter name and theSpaceCenter.Waypoint.index
.- Attribute:
Read-only, cannot be set
- Return type:
boolean
- has_contract: boolean¶
Whether the waypoint belongs to a contract.
- Attribute:
Read-only, cannot be set
- Return type:
boolean
- contract: SpaceCenter.Contract¶
The associated contract.
- Attribute:
Read-only, cannot be set
- Return type:
- remove()¶
Removes the waypoint.