Module AdjustorUnit

Adjustors are specific motors that expel gas to generate torque on your construct.

Element class: Adjustor

Extends: Element > Engine

Functions

activate () Start the adjustor at full power (works only when run inside a cockpit or under remote control).
deactivate () Stops the adjustor (works only when run inside a cockpit or under remote control).
isActive () Checks if the adjustor is active.
getState () Deprecated: Returns the activation state of the engine.
toggle () Toggle the state of the adjustor.
setThrust (thrust) Set the exhaust thrust of the adjustor.
getThrust () Returns the current exhaust thrust of the adjustor.
getMaxThrust () Returns the maximal exhaust thrust the adjustor can deliver.
getThrustAxis () Returns the adjustor exhaust thrust direction in construct local coordinates.
getTorqueAxis () Returns the adjustor torque axis in construct local coordinates.
getWorldThrustAxis () Returns the adjustor exhaust thrust direction in world coordinates.
getWorldTorqueAxis () Returns the adjustor torque axis in world coordinates.
setSignalIn (plug, state) Set the value of a signal in the specified IN plug of the element.
getSignalIn (plug) Return the value of a signal in the specified IN plug of the element.
mockGetClosure () Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":".


Functions

activate ()
Start the adjustor at full power (works only when run inside a cockpit or under remote control).
deactivate ()
Stops the adjustor (works only when run inside a cockpit or under remote control).
isActive ()
Checks if the adjustor is active.

Returns:

    0/1 1 when the adjustor is on.
getState ()
Deprecated: Returns the activation state of the engine.

This method is deprecated: isActive should be used instead

Returns:

    0/1 1 when the engine is on, 0 otherwise.

See also:

toggle ()
Toggle the state of the adjustor.
setThrust (thrust)
Set the exhaust thrust of the adjustor.

Parameters:

  • thrust float The adjustor thrust in newtons (limited by the maximum thrust).
getThrust ()
Returns the current exhaust thrust of the adjustor.

Returns:

    float The current exhaust thrust of the adjustor in newtons.
getMaxThrust ()
Returns the maximal exhaust thrust the adjustor can deliver.

Returns:

    float The maximum exhaust thrust of the adjustor in newtons.
getThrustAxis ()
Returns the adjustor exhaust thrust direction in construct local coordinates.

Returns:

    vec3 The adjustor exhaust thrust direction vector in construct local coordinates.
getTorqueAxis ()
Returns the adjustor torque axis in construct local coordinates.

Returns:

    vec3 The torque axis vector in construct local coordinates.
getWorldThrustAxis ()
Returns the adjustor exhaust thrust direction in world coordinates.

Returns:

    vec3 The adjustor exhaust thrust direction vector in world coordinates.
getWorldTorqueAxis ()
Returns the adjustor torque axis in world coordinates.

Returns:

    vec3 The torque axis vector in world coordinates.
setSignalIn (plug, state)
Set the value of a signal in the specified IN plug of the element.

Valid plug names are:

  • "in" for the in signal (seems to have no actual effect when modified this way).

Parameters:

  • plug string A valid plug name to set.
  • state 0/1 The plug signal state
getSignalIn (plug)
Return the value of a signal in the specified IN plug of the element.

Valid plug names are:

  • "in" for the in signal.

Parameters:

  • plug string A valid plug name to query.

Returns:

    0/1 The plug signal state
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