Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 2.48 KB

Globals.md

File metadata and controls

37 lines (32 loc) · 2.48 KB

Globals

Global variables, objects and functions common to all scripting languages.

Types:

  • autorun: AutoRun - An api for setting which scripts will be ran when an engine is reset.
  • munos: OperatingSystem - Operating System - interface to MunOS.
  • os: OperatingSystem - Operating System - interface to MunOS.
  • ui: UI - User Interface.
  • ksp: KSP - [Unsafe] Shortcuts to KSP API + some tools.
  • unity: Unity - [Unsafe] Shortcuts to Unity API.
  • types: Types - Types to be used with ROS: is operator; Lua: isa function.
  • stage: Stage - Staging logic.
  • time: Time - Current time and related functions.
  • node: Node - Maneuver node.
  • player: Player - [WIP] User/player controls.
  • user: Player - [WIP] User/player controls.
  • science: Science - [WIP] Science tools.
  • PID: PID - PID regulator (alias to system.pid in ROS).
  • app: App - [WIP] Safe API for KSP Application Launcher (toolbar/buttons). WIP

Static Fields:

  • native: NamespaceInstance - [Unsafe] Namespace Mappings (import of native types by namespace). More info here
  • assembly: GetMappings - [Unsafe] Assembly Mappings (import of native types by assembly). More info here

Static Properties:

  • vector(): Vector - Function for creating 3D vector / coordinate.
  • ship: Ship - Active vessel (in flight only, null otherwise).
  • autopilot: Autopilot - Autopilot for active vessel. (null if no ship)
  • bodies: Bodies - A collection of space/celestial bodies. (Safe API)
  • target: Object - [WIP] Target of active ship. Null if none.
  • altitude: double - Alias to ship.altitude. (NaN if no ship.)
  • apoapsis: double - Alias to ship.apoapsis. (NaN if no ship.)
  • periapsis: double - Alias to ship.periapsis. (NaN if no ship.)
  • body: SpaceBody - Orbited body (redirects to ship.body, null if no ship).
  • atmosphere: SpaceBody.Atmosphere - Atmosphere parameters of orbited body (redirects to ship.body.atmosphere, atmosphere.none if no ship).