Skip to content
Open
8 changes: 4 additions & 4 deletions api-mockup/adjustor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ function Adjustor()
function self.getMaxThrustBase() error("Adjustor.getMaxThrustBase() is deprecated, use Adjustor.getMaxThrust().") end

--- Returns the adjustor exhaust thrust direction in construct local coordinates
---@return table
---@return Vector3
function self.getThrustAxis() end

--- Returns the adjustor torque axis in construct local coordinates
---@return table
---@return Vector3
function self.getTorqueAxis() end

--- Returns the adjustor exhaust thrust direction in world coordinates
---@return table
---@return Vector3
function self.getWorldThrustAxis() end
---@deprecated Adjustor.thrustAxis() is deprecated, use Adjustor.getWorldThrustAxis().
function self.thrustAxis() error("Adjustor.thrustAxis() is deprecated, use Adjustor.getWorldThrustAxis().") end

--- Returns the adjustor torque axis in world coordinates
---@return table
---@return Vector3
function self.getWorldTorqueAxis() end
---@deprecated Adjustor.torqueAxis() is deprecated, use Adjustor.getWorldTorqueAxis().
function self.torqueAxis() error("Adjustor.torqueAxis() is deprecated, use Adjustor.getWorldTorqueAxis().") end
Expand Down
8 changes: 4 additions & 4 deletions api-mockup/airfoil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ function Airfoil()
function self.getMaxThrustEfficiency() error("Airfoil.getMaxThrustEfficiency() is deprecated, use Airfoil.getMaxLiftEfficiency().") end

--- Returns the airfoil lift direction in construct local coordinates
---@return table
---@return Vector3
function self.getLiftAxis() end

--- Returns the airfoil torque axis in construct local coordinates
---@return table
---@return Vector3
function self.getTorqueAxis() end

--- Returns the airfoil lift direction in world coordinates
---@return table
---@return Vector3
function self.getWorldLiftAxis() end
---@deprecated Airfoil.thrustAxis() is deprecated, use Airfoil.getWorldLiftAxis().
function self.thrustAxis() error("Airfoil.thrustAxis() is deprecated, use Airfoil.getWorldLiftAxis().") end

--- Returns the adjustor torque axis in world coordinates
---@return table
---@return Vector3
function self.getWorldTorqueAxis() end
---@deprecated Airfoil.torqueAxis() is deprecated, use Airfoil.getWorldTorqueAxis().
function self.torqueAxis() error("Airfoil.torqueAxis() is deprecated, use Airfoil.getWorldTorqueAxis().") end
Expand Down
6 changes: 3 additions & 3 deletions api-mockup/baseshieldgenerator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function BaseShieldGenerator()
function self.getMaxShieldHitpoints() end

--- Returns distribution of resistance pool over resistance types
---@return table resistances Resistance to damage type {antimatter, electromagnetic, kinetic, thermic}
---@return number[] resistances Resistance to damage type {antimatter, electromagnetic, kinetic, thermic}
function self.getResistances() end

--- Distribute the resistance pool according to damage type
Expand Down Expand Up @@ -102,11 +102,11 @@ function BaseShieldGenerator()
function self.getResistancesRemaining() end

--- Returns ratio per damage type of recent weapon impacts after applying resistance
---@return table stress Stress ratio due to damage type {antimatter, electromagnetic, kinetic, thermic}
---@return number[] stress Stress ratio due to damage type {antimatter, electromagnetic, kinetic, thermic}
function self.getStressRatio() end

--- Returns ratio per damage type of recent weapon impacts without resistance
---@return table stress Stress ratio due to damage type {antimatter, electromagnetic, kinetic, thermic}
---@return number[] stress Stress ratio due to damage type {antimatter, electromagnetic, kinetic, thermic}
function self.getStressRatioRaw() end

--- Returns stress, that is the total hit points of recent weapon impacts after applying resistance
Expand Down
4 changes: 2 additions & 2 deletions api-mockup/brakeengine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ function BrakeEngine()
function self.getMaxThrustEfficiency() end

--- Returns the brake thrust direction in construct local coordinates
---@return table
---@return Vector3
function self.getThrustAxis() end

--- Returns the brake thrust direction in world coordinates
---@return table
---@return Vector3
function self.getWorldThrustAxis() end
---@deprecated BrakeEngine.thrustAxis() is deprecated, use BrakeEngine.getWorldThrustAxis().
function self.thrustAxis() error("BrakeEngine.thrustAxis() is deprecated, use BrakeEngine.getWorldThrustAxis().") end
Expand Down
96 changes: 48 additions & 48 deletions api-mockup/construct.lua

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api-mockup/container.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Container()
function self.getMaxVolume() end

--- Returns a table describing the contents of the container, as a pair itemId and quantity per slot.
---@return table content The content of the container as a table with fields {[int] id, [float] quantity} per slot
---@return ItemQuantity[] content The content of the container as a table with fields {[int] id, [float] quantity} per slot
function self.getContent() end
---@deprecated Container.getItemsList() is deprecated, use Container.getContent() instead.
function self.getItemsList() error("Container.getItemsList() is deprecated, use Container.getContent() instead.") end
Expand Down
10 changes: 5 additions & 5 deletions api-mockup/controlunit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ function ControlUnit()
--- to approximate it
--- This function must be used on a piloting controller in onFlush event
---@param taglist string Comma (for union) or space (for intersection) separated list of tags. You can set tags directly on the engines in the right-click menu
---@param acceleration table The desired acceleration expressed in world coordinates in m/s2
---@param angularAcceleration table The desired angular acceleration expressed in world coordinates in rad/s2
---@param acceleration Vector3 The desired acceleration expressed in world coordinates in m/s2
---@param angularAcceleration Vector3 The desired angular acceleration expressed in world coordinates in rad/s2
---@param keepForceCollinearity boolean Forces the resulting acceleration vector to be collinear to the acceleration parameter
---@param keepTorqueCollinearity boolean Forces the resulting angular acceleration vector to be collinear to the angular acceleration parameter
---@param priority1SubTags string Comma (for union) or space (for intersection) separated list of tags of included engines to use as priority 1
Expand All @@ -112,7 +112,7 @@ function ControlUnit()
--- Returns the total thrust values of all engines in the tag list
--- This function must be used on a piloting controller
---@param taglist string Comma separated list of tags. You can set tags directly on the engines in the right-click menu
---@return table The total thrust in newtons
---@return Vector3 The total thrust in newtons
function self.getEngineThrust(taglist) end

--- Set the value of throttle in the cockpit, which will be displayed in the cockpit widget when flying
Expand All @@ -132,7 +132,7 @@ function ControlUnit()
--- These properties will be used to display the command in UI
---@param axis integer Longitudinal = 0, lateral = 1, vertical = 2
---@param commandType integer By throttle = 0, by target speed = 1, hidden = 2
---@param targetSpeedRanges table This is to specify the cruise control target speed ranges (for now, only for the longitudinal axis) in m/s
---@param targetSpeedRanges number[] This is to specify the cruise control target speed ranges (for now, only for the longitudinal axis) in m/s
function self.setupAxisCommandProperties(axis, commandType, targetSpeedRanges) end

--- Returns the current control mode. The mode is set by clicking the UI button or using the associated keybinding
Expand Down Expand Up @@ -180,7 +180,7 @@ function ControlUnit()

--- Returns ground engine stabilization altitude capabilities (lower and upper ranges)
--- This function must be used on a piloting controller
---@return table range Stabilization altitude capabilities for the least powerful engine and the most powerful engine
---@return number[] range Stabilization altitude capabilities for the least powerful engine and the most powerful engine
function self.computeGroundEngineAltitudeStabilizationCapabilities() end

--- Return the current throttle value
Expand Down
16 changes: 8 additions & 8 deletions api-mockup/coreunit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function CoreUnit()


--- Returns the list of all the local IDs of the Elements of this construct
---@return table
---@return integer[]
function self.getElementIdList() end

--- Returns the name of the Element, identified by its local ID
Expand Down Expand Up @@ -204,27 +204,27 @@ function CoreUnit()

--- Returns the position of the Element, identified by its local ID, in construct local coordinates.
---@param localId integer The local ID of the Element
---@return table
---@return Vector3
function self.getElementPositionById(localId) end

--- Returns the up direction vector of the Element, identified by its local ID, in construct local coordinates
---@param localId integer The local ID of the Element
---@return table
---@return Vector3
function self.getElementUpById(localId) end

--- Returns the right direction vector of the Element, identified by its local ID, in construct local coordinates
---@param localId integer The local ID of the Element
---@return table
---@return Vector3
function self.getElementRightById(localId) end

--- Returns the forward direction vector of the Element, identified by its local ID, in construct local coordinates
---@param localId integer The local ID of the Element
---@return table
---@return Vector3
function self.getElementForwardById(localId) end

--- Returns the status of the Industry Unit Element, identified by its local ID
---@param localId integer The local ID of the Element
---@return table info If the Element is an Industry Unit, a table with fields {[int] state, [bool] stopRequested, [int] schematicId (deprecated = 0), [int] schematicsRemaining, [int] unitsProduced, [int] remainingTime, [int] batchesRequested, [int] batchesRemaining, [float] maintainProductAmount, [int] currentProductAmount, [table] currentProducts:{{[int] id, [double] quantity},...}}
---@return IndustryInfo info If the Element is an Industry Unit, a table with fields {[int] state, [bool] stopRequested, [int] schematicId (deprecated = 0), [int] schematicsRemaining, [int] unitsProduced, [int] remainingTime, [int] batchesRequested, [int] batchesRemaining, [float] maintainProductAmount, [int] currentProductAmount, [table] currentProducts:{{[int] id, [double] quantity},...}}
function self.getElementIndustryInfoById(localId) end
---@deprecated CoreUnit.getElementIndustryStatusById(localId) is deprecated, use CoreUnit.getElementIndustryInfoById(localId) instead.
function self.getElementIndustryStatusById(localId) error("CoreUnit.getElementIndustryStatusById(localId) is deprecated, use CoreUnit.getElementIndustryInfoById(localId) instead.") end
Expand All @@ -246,11 +246,11 @@ function CoreUnit()
function self.g() error("CoreUnit.g() is deprecated, use CoreUnit.getGravityIntensity() instead.") end

--- Returns the local gravity vector in world coordinates
---@return table
---@return Vector3
function self.getWorldGravity() end

--- Returns the vertical unit vector along gravity, in world coordinates (0 in space)
---@return table
---@return Vector3
function self.getWorldVertical() end

--- Returns the id of the current close stellar body
Expand Down
2 changes: 1 addition & 1 deletion api-mockup/databank.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Databank()
function self.getNbKeys() end

--- Returns all the keys in the Databank
---@return table value The key list, as a list of string
---@return string[] value The key list, as a list of string
function self.getKeyList() end
---@deprecated Databank.getKeys() is deprecated, use Databank.getKeyList().
function self.getKeys() error("Databank.getKeys() is deprecated, use Databank.getKeyList().") end
Expand Down
2 changes: 1 addition & 1 deletion api-mockup/detectionzone.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function DetectionZone()
function self.getRadius() end

--- Returns the list of ids of the players in the detection zone
---@return table
---@return integer[]
function self.getPlayers() end

--- Emitted when a player enters in the detection zone
Expand Down
18 changes: 9 additions & 9 deletions api-mockup/element.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,39 +87,39 @@ function Element()
function self.getMaxRestorations() end

--- Returns the position of the Element in construct local coordinates.
---@return table
---@return Vector3
function self.getPosition() end

--- Returns the bounding box dimensions of the element.
---@return table
---@return Vector3
function self.getBoundingBoxSize() end

--- Returns the position of the center of bounding box of the element in local construct coordinates.
---@return table
---@return Vector3
function self.getBoundingBoxCenter() end

--- Returns the up direction vector of the Element in construct local coordinates
---@return table
---@return Vector3
function self.getUp() end

--- Returns the right direction vector of the Element in construct local coordinates
---@return table
---@return Vector3
function self.getRight() end

--- Returns the forward direction vector of the Element in construct local coordinates
---@return table
---@return Vector3
function self.getForward() end

--- Returns the up direction vector of the Element in world coordinates
---@return table
---@return Vector3
function self.getWorldUp() end

--- Returns the right direction vector of the Element in world coordinates
---@return table
---@return Vector3
function self.getWorldRight() end

--- Returns the forward direction vector of the Element in world coordinates
---@return table
---@return Vector3
function self.getWorldForward() end

--- Set the value of a signal in the specified IN plug of the Element.
Expand Down
8 changes: 4 additions & 4 deletions api-mockup/fueledengine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ function FueledEngine()


--- Returns the engine thrust direction in construct local coordinates
---@return table
---@return Vector3
function self.getThrustAxis() end

--- Returns the engine torque axis in construct local coordinates
---@return table
---@return Vector3
function self.getTorqueAxis() end

--- Returns the engine exhaust thrust direction in world coordinates
---@return table
---@return Vector3
function self.getWorldThrustAxis() end
---@deprecated FueledEngine.thrustAxis() is deprecated, use FueledEngine.getWorldThrustAxis().
function self.thrustAxis() error("FueledEngine.thrustAxis() is deprecated, use FueledEngine.getWorldThrustAxis().") end

--- Returns the engine torque axis in world coordinates
---@return table
---@return Vector3
function self.getWorldTorqueAxis() end
---@deprecated FueledEngine.torqueAxis() is deprecated, use FueledEngine.getWorldTorqueAxis().
function self.torqueAxis() error("FueledEngine.torqueAxis() is deprecated, use FueledEngine.getWorldTorqueAxis().") end
Expand Down
8 changes: 4 additions & 4 deletions api-mockup/industry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function Industry()
function self.getStatus() error("Industry.getStatus() is deprecated, use Industry.getState() instead.") end

--- Returns the complete information of the industry
---@return integer value The complete state of the industry, a table with fields {[int] state, [bool] stopRequested, [int] schematicId (deprecated = 0), [int] schematicsRemaining, [int] unitsProduced, [int] remainingTime, [int] batchesRequested, [int] batchesRemaining, [float] maintainProductAmount, [int] currentProductAmount, [table] currentProducts:{{[int] id, [double] quantity},...}}
---@return IndustryInfo value The complete state of the industry, a table with fields {[int] state, [bool] stopRequested, [int] schematicId (deprecated = 0), [int] schematicsRemaining, [int] unitsProduced, [int] remainingTime, [int] batchesRequested, [int] batchesRemaining, [float] maintainProductAmount, [int] currentProductAmount, [table] currentProducts:{{[int] id, [double] quantity},...}}
function self.getInfo() end

--- Get the count of completed cycles since the player started the unit
Expand All @@ -68,11 +68,11 @@ function Industry()


--- Returns the list of items required to run the selected output product.
---@return table outputs Returns the list of products
---@return ItemQuantity[] outputs Returns the list of products
function self.getInputs() end

--- Returns the list of id of the items currently produced.
---@return table outputs The first entry in the table is always the main product produced
---@return ItemQuantity[] outputs The first entry in the table is always the main product produced
function self.getOutputs() end
---@deprecated Industry.getCurrentSchematic() is deprecated.
function self.getCurrentSchematic() error("Industry.getCurrentSchematic() is deprecated.") end
Expand All @@ -90,7 +90,7 @@ function Industry()
function self.updateBank() end

--- Returns a table describing the contents of the schematic bank, as a pair itemId and quantity per slot
---@return table content The content of the schematic bank as a table with fields {[int] id, [float] quantity} per slot
---@return ItemQuantity[] content The content of the schematic bank as a table with fields {[int] id, [float] quantity} per slot
function self.getBank() end


Expand Down
22 changes: 11 additions & 11 deletions api-mockup/library.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ function Library()


--- Solve the 3D linear system M*x=c0 where M is defined by its column vectors c1,c2,c3
---@param c1 table The first column of the matrix M
---@param c2 table The second column of the matrix M
---@param c3 table The third column of the matrix M
---@param c0 table The target column vector of the system
---@return table value The vec3 solution of the above system
---@param c1 Vector3 The first column of the matrix M
---@param c2 Vector3 The second column of the matrix M
---@param c3 Vector3 The third column of the matrix M
---@param c0 Vector3 The target column vector of the system
---@return Vector3 value The vec3 solution of the above system
function self.systemResolution3(c1,c2,c3,c0) end

--- Solve the 2D linear system M*x=c0 where M is defined by its column vectors c1,c2
---@param c1 table The first column of the matrix M
---@param c2 table The second column of the matrix M
---@param c0 table The target column vector of the system
---@return table value The vec2 solution of the above system
---@param c1 Vector3 The first column of the matrix M
---@param c2 Vector3 The second column of the matrix M
---@param c0 Vector3 The target column vector of the system
---@return vector2 value The vec2 solution of the above system
function self.systemResolution2(c1,c2,c0) end

--- Returns the position of the given point in world coordinates system, on the game screen
---@param worldPos table: The world position of the point
---@return table value The position in percentage (between 0 and 1) of the screen resolution as vec3 with {x, y, depth}
---@param worldPos Vector3: The world position of the point
---@return Vector3 value The position in percentage (between 0 and 1) of the screen resolution as vec3 with {x, y, depth}
function self.getPointOnScreen(worldPos) end


Expand Down
2 changes: 1 addition & 1 deletion api-mockup/light.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function Light()
function self.setRGBColor(r,g,b) error("Light.setRGBColor(r,g,b) is deprecated, use Light.setColor(r,g,b) instead.") end

--- Returns the light color in RGB
---@return table color A vec3 for the red, blue and green components of the light, with values between 0.0 and 1.0, up to 5.0.
---@return number[] color A vec3 for the red, blue and green components of the light, with values between 0.0 and 1.0, up to 5.0.
function self.getColor() end
---@deprecated Light.getRGBColor() is deprecated, use Light.getColor() instead.
function self.getRGBColor() error("Light.getRGBColor() is deprecated, use Light.getColor() instead.") end
Expand Down
Loading