Module WarpDriveUnit

Based on the principle of the Alcubierre drive, this unit creates a powerful negative energy-density field capable to distort space-time and transport your ship at hyper speeds through space.

Note: This is generated from patch notes and in-game codex and has not yet been tested against the actual element. Accuracy not guaranteed.

Element class: WarpDriveUnit

Extends: Element

Functions

getWidgetData () Get element data as JSON.
initiate () Initiate the warp jump process.
getStatus () Returns the current status of the warp drive.
getDistance () Returns the distance to the current warp destination.
getDestination () Returns the construct ID of the current warp destination.
getDestinationName () Returns the name of the current warp destination construct.
getContainerId () Returns the local ID of the container linked to the warp drive.
getAvailableWarpCells () Returns the quantity of warp cells available in the linked container.
getRequiredWarpCells () Returns the quantity of warp cells required to warp to the warp destination set.
mockGetClosure () Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":".


Functions

getWidgetData ()
Get element data as JSON.

Warp drives have a warpdrive widget, which contains the following fields (bold fields are visible when making custom use of the widget):

  • statusText (string) The status message to display.
  • showError (boolean) True if the status banner should be red, false otherwise.
  • destination (string) The name of the current warp destination.
  • distance (float) The distance (in meters) to the current warp target.
  • cellCount (string) The number of warp cells available over the number that will be consumed during travel to the current destination.
  • buttonText (string) The button message to display, defaults to "Activate Warp".
  • enableButton (boolean) True if the button should be enabled, false otherwise.
  • name (string) The name of the element.
  • elementId (int) The (globally unique?) id of the warp drive element, may be related to linking the commands to the element.
  • helperId (string) warpdrive
  • type (string) warpdrive

Returns:

    string Data as JSON.
initiate ()
Initiate the warp jump process.
getStatus ()
Returns the current status of the warp drive.

Possible states:

  • 1: NoWarpDrive
  • 2: Broken
  • 3: Warping
  • 4: ParentWarping
  • 5: NotAnchored
  • 6: WarpCooldown
  • 7: PvPCooldown
  • 8: MovingChild
  • 9: NoContainer
  • 10: PlanetTooClose
  • 11: DestinationNotSet
  • 12: DestinationTooClose
  • 13: DestinationTooFar
  • 14: NotEnoughWarpCells
  • 15: Ready

Returns:

    int The current status of the warp drive.
getDistance ()
Returns the distance to the current warp destination.

Returns:

    float The distance to the current warp destination.
getDestination ()
Returns the construct ID of the current warp destination.

Returns:

    int The construct ID of the warp destination.
getDestinationName ()
Returns the name of the current warp destination construct.

Returns:

    string The warp destination name.
getContainerId ()
Returns the local ID of the container linked to the warp drive.

Returns:

    int The local ID of the container.
getAvailableWarpCells ()
Returns the quantity of warp cells available in the linked container.

Returns:

    int The quantity of warp cells.
getRequiredWarpCells ()
Returns the quantity of warp cells required to warp to the warp destination set.

Returns:

    int The quantity of warp cells.
mockGetClosure ()
Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":".

Returns:

    table A table encompasing the api calls of object.

See also:

generated by LDoc 1.4.6 Last updated 2022-12-01 00:35:59