Module CoreUnit

This is the heart of your construct.

It represents the construct and gives access to all construct-related information.

Element class:

  • CoreUnitDynamic
  • CoreUnitStatic
  • CoreUnitSpace

Extends: Element

Functions

getWidgetData () Get element data as JSON.
spawnNumberSticker (nb, x, y, z, orientation) Spawns a number sticker in the 3D world, with coordinates relative to the construct.
getElementIdList () Returns the list of all the local IDs of the elements of this construct.
getElementNameById (localId) Returns the name of the element, identified by its local ID.
getElementClassById (localId) Returns the class of the element, identified by its local ID.
getElementTypeById (uid) Deprecated: Type of the element, identified by its UID.
getElementDisplayNameById (localId) Returns the display name of the element, identified by its local ID.
getElementItemIdById (localId) Returns the item ID of the element, identified by its local ID.
getElementHitPointsById (localId) Returns the current level of hit points of the element, identified by its local ID.
getElementMaxHitPointsById (localId) Returns the maximum level of hit points of the element, identified by its local ID.
getElementMassById (localId) Returns the mass of the element, identified by its local ID.
getElementPositionById (localId) Returns the position of the element, identified by its local ID, in construct local coordinates.
getElementUpById (localId) Returns the up direction vector of the element, identified by its local ID, in construct local coordinates.
getElementRightById (localId) Returns the right direction vector of the element, identified by its local ID, in construct local coordinates.
getElementForwardById (localId) Returns the forward direction vector of the element, identified by its local ID, in construct local coordinates.
getElementIndustryStatusById (uid) Deprecated: Status of the industry unit element, identified by its UID.
getElementIndustryInfoById (localId) Returns the information of the industry unit element, identified by its local ID.
getElementTagsById (localId) Returns the list of tags associated to the element, identified by its local ID.
getAltitude () Returns the altitude above sea level, with respect to the closest planet (0 in space).
g () Deprecated: Local gravity intensity.
getGravityIntensity () Returns the local gravity intensity.
getWorldGravity () Returns the local gravity vector in world coordinates.
getWorldVertical () Returns the vertical unit vector along gravity, in world coordinates (0 in space).
getCurrentPlanetId () Returns the id of the current close stellar body.
getCoreStress () Returns the core's current stress, destroyed when reaching max stress.
getMaxCoreStress () Returns the maximal stress the core can bear before it gets destroyed.
getCoreStressRatio () Returns the core's current stress to max stress ratio.
spawnArrowSticker (x, y, z, orientation) Spawns an arrow sticker in the 3D world, with coordinates relative to the construct.
deleteSticker (index) Delete the referenced sticker.
moveSticker (index, x, y, z) Move the referenced sticker.
rotateSticker (index, angle_x, angle_y, angle_z) Rotate the referenced sticker.
getConstructName () Deprecated: Returns the name of the construct.
getConstructMass () Deprecated: Returns the mass of the construct.
getConstructIMass () Deprecated: Returns the inertial mass of the construct, calculated as 1/3 of the trace of the inertial tensor.
getConstructCrossSection () Deprecated: Returns the construct's cross sectional surface in the current direction of movement.
getMaxKinematicsParametersAlongAxis (taglist, CRefAxis) Deprecated: Returns the construct max kinematics parameters in both atmo and space range, in newtons.
getConstructWorldPos () Deprecated: Returns the world position of the construct.
getConstructId () Deprecated: Returns the construct unique ID.
getWorldAirFrictionAngularAcceleration () Deprecated: Returns the acceleration torque generated by air resistance.
getWorldAirFrictionAcceleration () Deprecated: Returns the acceleration generated by air resistance.
getSchematicInfo (schematicId) Deprecated: Retrieves schematic details for the id provided as json.
getAngularVelocity () Deprecated: The construct's angular velocity, in construct local coordinates.
getWorldAngularVelocity () Deprecated: The constructs angular velocity, in world coordinates.
getAngularAcceleration () Deprecated: The construct's angular acceleration, in construct local coordinates.
getWorldAngularAcceleration () Deprecated: The construct's angular acceleration, in world coordinates.
getVelocity () Deprecated: The construct's linear velocity, relative to its parent, in construct local coordinates.
getWorldVelocity () Deprecated: The construct's linear velocity, relative to its parent, in world coordinates.
getAbsoluteVelocity () Deprecated: The construct's absolute linear velocity, in construct local coordinates.
getWorldAbsoluteVelocity () Deprecated: The construct's absolute linear velocity, in world coordinates.
getWorldAcceleration () Deprecated: The construct's linear acceleration, in world coordinates.
getAcceleration () Deprecated: The construct's linear acceleration, in construct local coordinates.
getOrientationUnitId () Deprecated: Returns the uid of the current active orientation unit (core unit or gyro unit).
getConstructOrientationUp () Deprecated: Returns the up direction vector of the active orientation unit, in construct local coordinates.
getConstructOrientationRight () Deprecated: Returns the right direction vector of the active orientation unit, in construct local coordinates.
getConstructOrientationForward () Deprecated: Returns the forward direction vector of the active orientation unit, in construct local coordinates.
getConstructWorldOrientationUp () Deprecated: Returns the up direction vector of the active orientation unit, in world coordinates.
getConstructWorldOrientationRight () Deprecated: Returns the right direction vector of the active orientation unit, in world coordinates.
getConstructWorldOrientationForward () Deprecated: Returns the forward direction vector of the active orientation unit, in world coordinates.
getConstructWorldUp () Deprecated: Returns the up direction vector of the construct, in world coordinates.
getConstructWorldRight () Deprecated: Returns the right direction vector of the construct, in world coordinates.
getConstructWorldForward () Deprecated: Returns the Forward direction vector of the construct, in world coordinates.
getPvPTimer () Deprecated: The construct's current state of the PvP timer.
getPlayersOnBoard () Deprecated: Returns the list of player or surrogate ids on board the construct.
getPlayersOnBoardInVRStation () Deprecated: Returns the list of player ids on board the construct inside a VR Station.
getDockedConstructs () Deprecated: Returns the list of ids of constructs docked to the construct.
isPlayerBoarded (pid) Deprecated: Returns True if the given player or surrogate is boarded to the construct.
isPlayerBoardedInVRStation (pid) Deprecated: Returns True if the given player is boarded to the construct inside a VR Station.
isConstructDocked (cid) Deprecated: Returns True if the given construct is docked to the construct.
forceDeboard (pid) Deprecated: Sends a request to unboard a player or surrogate with the given id.
forceInterruptVRSession (pid) Deprecated: Sends a request to interrupt the surrogate session of a player with the given id.
forceUndock (cid) Deprecated: Sends a request to undock a construct with the given id.
getBoardedPlayerMass (pid) Deprecated: Returns the mass of the given player or surrogate if it is on board the construct.
getBoardedInVRStationAvatarMass (pid) Deprecated: Returns the mass of the given player if in VR station on board the construct.
getDockedConstructMass (cid) Deprecated: Returns the mass of the given construct if it is docked to the construct.
getParent () Deprecated: Returns the id of the parent construct of our active construct.
getCloseParents () Deprecated: Returns the list of ids of nearby constructs, on which the construct can dock.
getClosestParent () Deprecated: Returns the id of the nearest construct, on which the construct can dock.
dock (pid) Deprecated: Sends a request to dock to the given construct.
undock () Deprecated: Sends a request to undock the construct.
setDockingMode (mode) Deprecated: Sets the docking mode.
getDockingMode () Deprecated: Returns the current docking mode.
getParentPosition () Deprecated: Returns the position of the construct's parent when docked in local coordinates.
getParentWorldPosition () Deprecated: Returns the position of the construct's parent when docked in world coordinates.
getParentForward () Deprecated: Returns the construct's parent forward direction vector, in local coordinates.
getParentUp () Deprecated: Returns the construct's parent up direction vector, in local coordinates.
getParentRight () Deprecated: Returns the construct's parent right direction vector, in local coordinates.
getParentWorldForward () Deprecated: Returns the construct's parent forward direction vector, in world coordinates.
getParentWorldUp () Deprecated: Returns the construct's parent up direction vector, in world coordinates.
getParentWorldRight () Deprecated: Returns the construct's parent right direction vector, in world coordinates.
getMaxSpeed () Deprecated: Returns max speed along current moving direction.
getMaxAngularSpeed () Deprecated: Returns max angular speed.
getMaxSpeedPerAxis () Deprecated: Returns max speed per axis.
EVENT_onStressChanged (stress) Event: Emitted when core unit stress changed.
EVENT_pvpTimer (active) Deprecated: Event: Emitted when the PvP timer started or elapsed.
EVENT_playerBoarded (pid) Deprecated: Event: Emitted when a player boards the construct.
EVENT_constructDocked (cid) Deprecated: Event: Emitted when another construct docks this construct.
EVENT_docked (cid) Deprecated: Event: Emitted when the construct becomes docked.
EVENT_undocked (cid) Deprecated: Event: Emitted when the construct is undocked.
EVENT_stressChanged (stress) Deprecated: Event: Emitted when core unit stress changed.


Functions

getWidgetData ()
Get element data as JSON.

Core units create a core widget, which is modified by the bold fields below when making custom use of the widget. The data also supports a core_stress widget, which is documented in system.

  • altitude (float) Altitude in meters.
  • gravity (float) Gravity in m/s2.
  • currentStress (float) Current core stress.
  • maxStress (float) Max core stress.
  • name (string) The name of the element.
  • helperId (string) core
  • type (string) core

Returns:

    string Data as JSON.
spawnNumberSticker (nb, x, y, z, orientation)
Spawns a number sticker in the 3D world, with coordinates relative to the construct.

Parameters:

  • nb int The number to display 0 to 9.
  • x float The x-coordinate in the construct in meters. 0 = center.
  • y float The y-coordinate in the construct in meters. 0 = center.
  • z float The z-coordinate in the construct in meters. 0 = center.
  • orientation string Orientation of the number. Possible values are "front", "side".

Returns:

    int An index that can be used later to delete or move the item. -1 if error or maxnumber (10) reached.
getElementIdList ()
Returns the list of all the local IDs of the elements of this construct.

Returns:

    list The list of element local IDs.
getElementNameById (localId)
Returns the name of the element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    string The name of the element.
getElementClassById (localId)
Returns the class of the element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    string The class of the element.
getElementTypeById (uid)
Deprecated: Type of the element, identified by its UID.

This method is deprecated: getElementDisplayNameById should be used instead.

Parameters:

  • uid int The UID of the element.

Returns:

    string The type of the element.

See also:

getElementDisplayNameById (localId)
Returns the display name of the element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    string The display name of the element.
getElementItemIdById (localId)
Returns the item ID of the element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    int The item ID of the element.
getElementHitPointsById (localId)
Returns the current level of hit points of the element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    float Current level of hit points of the element.
getElementMaxHitPointsById (localId)
Returns the maximum level of hit points of the element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    float The max level of hit points of the element.
getElementMassById (localId)
Returns the mass of the element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    float The mass of the element in kilograms.
getElementPositionById (localId)
Returns the position of the element, identified by its local ID, in construct local coordinates.

Parameters:

  • localId int The local ID of the element.

Returns:

    vec3 The position of the element in construct local coordinates.
getElementUpById (localId)
Returns the up direction vector of the element, identified by its local ID, in construct local coordinates.

Parameters:

  • localId int The local ID of the element.

Returns:

    vec3 The up direction vector of the element identified by its local ID, in construct local coordinates.
getElementRightById (localId)
Returns the right direction vector of the element, identified by its local ID, in construct local coordinates.

Parameters:

  • localId int The local ID of the element.

Returns:

    vec3 The right direction vector of the element identified by its local ID, in construct local coordinates.
getElementForwardById (localId)
Returns the forward direction vector of the element, identified by its local ID, in construct local coordinates.

Parameters:

  • localId int The local ID of the element.

Returns:

    vec3 The forward direction vector of the element identified by its local ID, in construct local coordinates.
getElementIndustryStatusById (uid)
Deprecated: Status of the industry unit element, identified by its UID.

This method is deprecated: getElementIndustryInfoById should be used instead.

Parameters:

  • uid int The UID of the element.

Returns:

    json If the element is an industry unit, this returns a json (to be parsed with json.decode) with: state, schematicId, stopRequested, unitsProduced, remainingTime, batchesRequested, batchesRemaining, maintainProductAmount, currentProductAmount.

See also:

getElementIndustryInfoById (localId)
Returns the information of the industry unit element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    table If the element is an industry unit, a table with fields {[integer] state, [bool] stopRequested, [integer] schematicsRemaining, [integer] unitsProduced, [integer] remainingTime, [integer] batchesRequested, [integer] batchesRemaining, [number] maintainProductAmount, [integer] currentProductAmount, [table] currentProducts:{{[integer] id, [number] quantity},...}}
getElementTagsById (localId)
Returns the list of tags associated to the element, identified by its local ID.

Parameters:

  • localId int The local ID of the element.

Returns:

    string The tags as JSON list.
getAltitude ()
Returns the altitude above sea level, with respect to the closest planet (0 in space).

Returns:

    float The sea level altitude in meters.
g ()
Deprecated: Local gravity intensity.

This method is deprecated: getGravityIntensity should be used instead.

Returns:

    m/s2 The gravitation acceleration where the construct is located.

See also:

getGravityIntensity ()
Returns the local gravity intensity.

Returns:

    float The gravitation acceleration where the construct is located in meters / second square.
getWorldGravity ()
Returns the local gravity vector in world coordinates.

Returns:

    vec3 The local gravity field vector in world coordinates in m/s2.
getWorldVertical ()
Returns the vertical unit vector along gravity, in world coordinates (0 in space).

Returns:

    vec3 The local vertical vector in world coordinates in meters.
getCurrentPlanetId ()
Returns the id of the current close stellar body.

Returns:

    int The id of the current close stellar body.
getCoreStress ()
Returns the core's current stress, destroyed when reaching max stress.

Returns:

    float The stress the core absorbed.
getMaxCoreStress ()
Returns the maximal stress the core can bear before it gets destroyed.

Returns:

    float The maximal stress before destruction.
getCoreStressRatio ()
Returns the core's current stress to max stress ratio.

Returns:

    float The stress ratio, between 0 for no stress and 1 for destruction.
spawnArrowSticker (x, y, z, orientation)
Spawns an arrow sticker in the 3D world, with coordinates relative to the construct.

Parameters:

  • x float The x-coordinate in the construct in meters. 0 = center.
  • y float The y-coordinate in the construct in meters. 0 = center.
  • z float The z-coordinate in the construct in meters. 0 = center.
  • orientation string Orientation of the number. Possible values are "up" (+z), "down" (-z), "north" (-x), "south" (+x), "east" (+y), "west" (-y).

Returns:

    int An index that can be used later to delete or move the item. -1 if error or maxnumber (10) reached.
deleteSticker (index)
Delete the referenced sticker.

Parameters:

  • index int Index of the sticker to delete.

Returns:

    int 0 in case of success, -1 otherwise.
moveSticker (index, x, y, z)
Move the referenced sticker.

Parameters:

  • index int Index of the sticker to move.
  • x float The x-coordinate in the construct in meters. 0 = center.
  • y float The y-coordinate in the construct in meters. 0 = center.
  • z float The z-coordinate in the construct in meters. 0 = center.

Returns:

    int 0 in case of success, -1 otherwise.
rotateSticker (index, angle_x, angle_y, angle_z)
Rotate the referenced sticker.

Parameters:

  • index int Index of the sticker to move.
  • angle_x float Rotation along the x-axis in degrees.
  • angle_y float Rotation along the y-axis in degrees.
  • angle_z float Rotation along the z-axis in degrees.

Returns:

    int 1 in case of success, 0 otherwise
getConstructName ()
Deprecated: Returns the name of the construct.

This method is deprecated: construct.getName should be used instead.

Returns:

    string The name of the construct.

See also:

getConstructMass ()
Deprecated: Returns the mass of the construct.

Note: Only defined for dynamic cores.

This method is deprecated: construct.getMass should be used instead.

Returns:

    kg The mass of the construct.

See also:

getConstructIMass ()
Deprecated: Returns the inertial mass of the construct, calculated as 1/3 of the trace of the inertial tensor.

Note: Only defined for dynamic cores.

This method is deprecated: construct.getInertialMass should be used instead.

Returns:

    kg*m2 The inertial mass of the construct.

See also:

getConstructCrossSection ()
Deprecated: Returns the construct's cross sectional surface in the current direction of movement.

Note: Only defined for dynamic cores.

This method is deprecated: construct.getCrossSection should be used instead.

Returns:

    m2 The construct's surface exposed in the current direction of movement.

See also:

getMaxKinematicsParametersAlongAxis (taglist, CRefAxis)
Deprecated: Returns the construct max kinematics parameters in both atmo and space range, in newtons. Kinematics parameters designate here the maximal positive and negative base force the construct is capable of producing along the chosen Axisvector, as defined by the core unit or the gyro unit, if active. In practice, this gives you an estimate of the maximum thrust your ship is capable of producing in space or in atmosphere, as well as the max reverse thrust. These are theoretical estimates and correspond with the addition of the maxThrustBase along the corresponding axis. It might not reflect the accurate current max thrust capacity of your ship, which depends on various local conditions (atmospheric density, orientation, obstruction, engine damage, etc). This is typically used in conjunction with the control unit throttle to setup the desired forward acceleration.

Note: Only defined for dynamic cores.

This method is deprecated: construct.getMaxThrustAlongAxis should be used instead.

Parameters:

  • taglist csv Comma (for union) or space (for intersection) separated list of tags. You can set tags directly on the engines in the right-click menu.
  • CRefAxis vec3 Axis along which to compute the max force (in construct reference).

Returns:

    vec4,Newton The kinematics parameters in the order: atmoRange.FMaxPlus, atmoRange.FMaxMinus, spaceRange.FMaxPlus, spaceRange.FMaxMinus

See also:

getConstructWorldPos ()
Deprecated: Returns the world position of the construct.

This method is deprecated: construct.getWorldPosition should be used instead.

Returns:

    vec3 The xyz world coordinates of the construct center position.

See also:

getConstructId ()
Deprecated: Returns the construct unique ID.

This method is deprecated: construct.getId should be used instead.

Returns:

    int The unique ID. Can be used with database.getConstruct to retrieve info about the construct.

See also:

getWorldAirFrictionAngularAcceleration ()
Deprecated: Returns the acceleration torque generated by air resistance.

This method is deprecated: construct.getWorldAirFrictionAngularAcceleration should be used instead.

Returns:

    vec3 The xyz world acceleration torque generated by air resistance.

See also:

getWorldAirFrictionAcceleration ()
Deprecated: Returns the acceleration generated by air resistance.

This method is deprecated: construct.getWorldAirFrictionAcceleration should be used instead.

Returns:

    vec3 The xyz world acceleration generated by air resistance.

See also:

getSchematicInfo (schematicId)
Deprecated: Retrieves schematic details for the id provided as json.

This method is deprecated: system.getSchematic should be used instead.

Parameters:

  • schematicId int The id of the schematic to query, example: 1199082577 for Pure Aluminium refining.

Returns:

    jsonstr The schematic defails as a json object with fields: id, time, level, ingredients, products; where ingredients and products are lists of json objects with fields: name, quantity, type

See also:

getAngularVelocity ()
Deprecated: The construct's angular velocity, in construct local coordinates.

This method is deprecated: construct.getAngularVelocity should be used instead.

Returns:

    rad/s Angular velocity vector, in construct local coordinates.

See also:

getWorldAngularVelocity ()
Deprecated: The constructs angular velocity, in world coordinates.

This method is deprecated: construct.getWorldAngularVelocity should be used instead.

Returns:

    rad/s Angular velocity vector, in world coordinates.

See also:

getAngularAcceleration ()
Deprecated: The construct's angular acceleration, in construct local coordinates.

This method is deprecated: construct.getAngularAcceleration should be used instead.

Returns:

    rad/s2 Angular acceleration vector, in construct local coordinates.

See also:

getWorldAngularAcceleration ()
Deprecated: The construct's angular acceleration, in world coordinates.

This method is deprecated: construct.getWorldAngularAcceleration should be used instead.

Returns:

    rad/s2 Angular acceleration vector, in world coordinates.

See also:

getVelocity ()
Deprecated: The construct's linear velocity, relative to its parent, in construct local coordinates.

This method is deprecated: construct.getVelocity should be used instead.

Returns:

    m/s Relative linear velocity vector, in construct local coordinates.

See also:

getWorldVelocity ()
Deprecated: The construct's linear velocity, relative to its parent, in world coordinates.

This method is deprecated: construct.getWorldVelocity should be used instead.

Returns:

    m/s Relative linear velocity vector, in world coordinates.

See also:

getAbsoluteVelocity ()
Deprecated: The construct's absolute linear velocity, in construct local coordinates.

This method is deprecated: construct.getAbsoluteVelocity should be used instead.

Returns:

    m/s Absolute linear velocity vector, in construct local coordinates.

See also:

getWorldAbsoluteVelocity ()
Deprecated: The construct's absolute linear velocity, in world coordinates.

This method is deprecated: construct.getWorldAbsoluteVelocity should be used instead.

Returns:

    m/s Absolute linear velocity vector, in world coordinates.

See also:

getWorldAcceleration ()
Deprecated: The construct's linear acceleration, in world coordinates.

This method is deprecated: construct.getWorldAcceleration should be used instead.

Returns:

    m/s2 Linear acceleration vector, in world coordinates.

See also:

getAcceleration ()
Deprecated: The construct's linear acceleration, in construct local coordinates.

This method is deprecated: construct.getAcceleration should be used instead.

Returns:

    m/s2 Linear acceleration vector, in construct local coordinates.

See also:

getOrientationUnitId ()
Deprecated: Returns the uid of the current active orientation unit (core unit or gyro unit).

This method is deprecated: construct.getOrientationUnitId should be used instead.

Returns:

    int Uid of the current active orientation unit (core unit or gyro unit).

See also:

getConstructOrientationUp ()
Deprecated: Returns the up direction vector of the active orientation unit, in construct local coordinates.

This method is deprecated: construct.getOrientationUp should be used instead.

Returns:

    vec3 Up direction vector of the active orientation unit, in construct local coordinates.

See also:

getConstructOrientationRight ()
Deprecated: Returns the right direction vector of the active orientation unit, in construct local coordinates.

This method is deprecated: construct.getOrientationRight should be used instead.

Returns:

    vec3 Right direction vector of the active orientation unit, in construct local coordinates.

See also:

getConstructOrientationForward ()
Deprecated: Returns the forward direction vector of the active orientation unit, in construct local coordinates.

This method is deprecated: construct.getOrientationForward should be used instead.

Returns:

    vec3 Forward direction vector of the active orientation unit, in construct local coordinates.

See also:

getConstructWorldOrientationUp ()
Deprecated: Returns the up direction vector of the active orientation unit, in world coordinates.

This method is deprecated: construct.getWorldOrientationUp should be used instead.

Returns:

    vec3 Up direction vector of the active orientation unit, in world coordinates.

See also:

getConstructWorldOrientationRight ()
Deprecated: Returns the right direction vector of the active orientation unit, in world coordinates.

This method is deprecated: construct.getWorldOrientationRight should be used instead.

Returns:

    vec3 Right direction vector of the active orientation unit, in world coordinates.

See also:

getConstructWorldOrientationForward ()
Deprecated: Returns the forward direction vector of the active orientation unit, in world coordinates.

This method is deprecated: construct.getWorldOrientationForward should be used instead.

Returns:

    vec3 Forward direction vector of the active orientation unit, in world coordinates.

See also:

getConstructWorldUp ()
Deprecated: Returns the up direction vector of the construct, in world coordinates.

This method is deprecated: construct.getWorldUp should be used instead.

Returns:

    vec3 Up direction vector of the construct, in world coordinates.

See also:

getConstructWorldRight ()
Deprecated: Returns the right direction vector of the construct, in world coordinates.

This method is deprecated: construct.getWorldRight should be used instead.

Returns:

    vec3 Right direction vector of the construct, in world coordinates.

See also:

getConstructWorldForward ()
Deprecated: Returns the Forward direction vector of the construct, in world coordinates.

This method is deprecated: construct.getWorldForward should be used instead.

Returns:

    vec3 Forward direction vector of the construct, in world coordinates.

See also:

getPvPTimer ()
Deprecated: The construct's current state of the PvP timer.

This method is deprecated: construct.getPvPTimer should be used instead.

Returns:

    float Positive remaining time of the PvP timer, or 0.0 if elapsed.

See also:

getPlayersOnBoard ()
Deprecated: Returns the list of player or surrogate ids on board the construct.

This method is deprecated: construct.getPlayersOnBoard should be used instead.

Returns:

    list List of Players IDs.

See also:

getPlayersOnBoardInVRStation ()
Deprecated: Returns the list of player ids on board the construct inside a VR Station.

This method is deprecated: construct.getPlayersOnBoardInVRStation should be used instead.

Returns:

    list List of Players IDs.

See also:

getDockedConstructs ()
Deprecated: Returns the list of ids of constructs docked to the construct.

This method is deprecated: construct.getDockedConstructs should be used instead.

Returns:

    list List of Construct IDs.

See also:

isPlayerBoarded (pid)
Deprecated: Returns True if the given player or surrogate is boarded to the construct.

This method is deprecated: construct.isPlayerBoarded should be used instead.

Parameters:

  • pid int The player id.

Returns:

    0/1 1 if the given player is boarded to the construct, 0 otherwise.

See also:

isPlayerBoardedInVRStation (pid)
Deprecated: Returns True if the given player is boarded to the construct inside a VR Station.

This method is deprecated: construct.isPlayerBoardedInVRStation should be used instead.

Parameters:

  • pid int The player id.

Returns:

    0/1 1 if the given player is boarded to the construct, 0 otherwise.

See also:

isConstructDocked (cid)
Deprecated: Returns True if the given construct is docked to the construct.

This method is deprecated: construct.isConstructDocked should be used instead.

Parameters:

  • cid int The construct id.

Returns:

    0/1 1 if the given construct is docked to the construct, 0 otherwise.

See also:

forceDeboard (pid)
Deprecated: Sends a request to unboard a player or surrogate with the given id.

This method is deprecated: construct.forceDeboard should be used instead.

Parameters:

  • pid int The player id.

Returns:

    0/1 1 if the operation is a success, 0 otherwise.

See also:

forceInterruptVRSession (pid)
Deprecated: Sends a request to interrupt the surrogate session of a player with the given id.

This method is deprecated: construct.forceInterruptVRSession should be used instead.

Parameters:

  • pid int The player id.

Returns:

    0/1 1 if the operation is a success, 0 otherwise.

See also:

forceUndock (cid)
Deprecated: Sends a request to undock a construct with the given id.

This method is deprecated: construct.forceUndock should be used instead.

Parameters:

  • cid int The construct id.

Returns:

    0/1 1 if the operation is a success, 0 otherwise.

See also:

getBoardedPlayerMass (pid)
Deprecated: Returns the mass of the given player or surrogate if it is on board the construct.

This method is deprecated: construct.getBoardedPlayerMass should be used instead.

Parameters:

  • pid int The player id.

Returns:

    float The mass of the player.

See also:

getBoardedInVRStationAvatarMass (pid)
Deprecated: Returns the mass of the given player if in VR station on board the construct.

This method is deprecated: construct.getBoardedInVRStationAvatarMass should be used instead.

Parameters:

  • pid int The player id.

Returns:

    float The mass of the player.

See also:

getDockedConstructMass (cid)
Deprecated: Returns the mass of the given construct if it is docked to the construct.

This method is deprecated: construct.getDockedConstructMass should be used instead.

Parameters:

  • cid int The construct id.

Returns:

    The mass of the construct.

See also:

getParent ()
Deprecated: Returns the id of the parent construct of our active construct.

This method is deprecated: construct.getParent should be used instead.

Returns:

    int The parent id.

See also:

getCloseParents ()
Deprecated: Returns the list of ids of nearby constructs, on which the construct can dock.

This method is deprecated: construct.getCloseParents should be used instead.

Returns:

    list List of ids of nearby constructs.

See also:

getClosestParent ()
Deprecated: Returns the id of the nearest construct, on which the construct can dock.

This method is deprecated: construct.getClosestParent should be used instead.

Returns:

    int The id of the nearest construct.

See also:

dock (pid)
Deprecated: Sends a request to dock to the given construct. Limited to piloting controllers.

This method is deprecated: construct.dock should be used instead.

Parameters:

  • pid int The parent id.

Returns:

    0/1 1 if the operation is a success, 0 otherwise.

See also:

undock ()
Deprecated: Sends a request to undock the construct. Limited to piloting controllers.

This method is deprecated: construct.undock should be used instead.

Returns:

    0/1 1 if the operation is a success, 0 otherwise.

See also:

setDockingMode (mode)
Deprecated: Sets the docking mode.

This method is deprecated: construct.setDockingMode should be used instead.

Parameters:

  • mode int 0: Manual, 1: Automatic, 2: Semi-automatic

Returns:

    0/1 1 if the operation is a success, 0 otherwise.

See also:

getDockingMode ()
Deprecated: Returns the current docking mode.

This method is deprecated: construct.getDockingMode should be used instead.

Returns:

    int 0: Manual, 1: Automatic, 2: Semi-automatic

See also:

getParentPosition ()
Deprecated: Returns the position of the construct's parent when docked in local coordinates.

This method is deprecated: construct.getParentPosition should be used instead.

Returns:

    vec3 The position of the construct's parent in local coordinates.

See also:

getParentWorldPosition ()
Deprecated: Returns the position of the construct's parent when docked in world coordinates.

This method is deprecated: construct.getParentWorldPosition should be used instead.

Returns:

    vec3 The position of the construct's parent in world coordinates.

See also:

getParentForward ()
Deprecated: Returns the construct's parent forward direction vector, in local coordinates.

This method is deprecated: construct.getParentForward should be used instead.

Returns:

    vec3 The construct's parent forward direction vector, in local coordinates.

See also:

getParentUp ()
Deprecated: Returns the construct's parent up direction vector, in local coordinates.

This method is deprecated: construct.getParentUp should be used instead.

Returns:

    vec3 The construct's parent up direction vector, in local coordinates.

See also:

getParentRight ()
Deprecated: Returns the construct's parent right direction vector, in local coordinates.

This method is deprecated: construct.getParentRight should be used instead.

Returns:

    vec3 The construct's parent right direction vector, in local coordinates.

See also:

getParentWorldForward ()
Deprecated: Returns the construct's parent forward direction vector, in world coordinates.

This method is deprecated: construct.getParentWorldForward should be used instead.

Returns:

    vec3 The construct's parent forward direction vector, in world coordinates.

See also:

getParentWorldUp ()
Deprecated: Returns the construct's parent up direction vector, in world coordinates.

This method is deprecated: construct.getParentWorldUp should be used instead.

Returns:

    vec3 The construct's parent up direction vector, in world coordinates.

See also:

getParentWorldRight ()
Deprecated: Returns the construct's parent right direction vector, in world coordinates.

This method is deprecated: construct.getParentWorldRight should be used instead.

Returns:

    vec3 The construct's parent right direction vector, in world coordinates.

See also:

getMaxSpeed ()
Deprecated: Returns max speed along current moving direction.

This method is deprecated: construct.getMaxSpeed should be used instead.

Returns:

    float Max speed along current moving direction.

See also:

getMaxAngularSpeed ()
Deprecated: Returns max angular speed.

This method is deprecated: construct.getMaxAngularSpeed should be used instead.

Returns:

    float Max angular speed.

See also:

getMaxSpeedPerAxis ()
Deprecated: Returns max speed per axis.

This method is deprecated: construct.getMaxSpeedPerAxis should be used instead.

Returns:

    table Max speed along axes {x, -x, y, -y, z, -z}.

See also:

EVENT_onStressChanged (stress)
Event: Emitted when core unit stress changed.

Note: This is documentation on an event handler, not a callable method.

Parameters:

  • stress float Difference to previous stress value.
EVENT_pvpTimer (active)
Deprecated: Event: Emitted when the PvP timer started or elapsed.

Note: This is documentation on an event handler, not a callable method.

This event is deprecated: construct.EVENT_onPvPTimer should be used instead.

Parameters:

  • active boolean True if the timer started.

See also:

EVENT_playerBoarded (pid)
Deprecated: Event: Emitted when a player boards the construct.

Note: This is documentation on an event handler, not a callable method.

This event is deprecated: construct.EVENT_onPlayerBoarded should be used instead.

Parameters:

  • pid int The id of the boarding player.

See also:

EVENT_constructDocked (cid)
Deprecated: Event: Emitted when another construct docks this construct.

Note: This is documentation on an event handler, not a callable method.

This event is deprecated: construct.EVENT_onConstructDocked should be used instead.

Parameters:

  • cid int The id of the docking construct.

See also:

EVENT_docked (cid)
Deprecated: Event: Emitted when the construct becomes docked.

Note: This is documentation on an event handler, not a callable method.

This event is deprecated: construct.EVENT_onDocked should be used instead.

Parameters:

  • cid int The parent id.

See also:

EVENT_undocked (cid)
Deprecated: Event: Emitted when the construct is undocked.

Note: This is documentation on an event handler, not a callable method.

This event is deprecated: construct.EVENT_onUndocked should be used instead.

Parameters:

  • cid int The old parent id.

See also:

EVENT_stressChanged (stress)
Deprecated: Event: Emitted when core unit stress changed.

Note: This is documentation on an event handler, not a callable method.

This event is deprecated: EVENT_onStressChanged should be used instead.

Parameters:

  • stress float Difference to previous stress value.

See also:

generated by LDoc 1.5.0 Last updated 2023-09-04 19:09:50