Add @meta for all files. Mark couple params as optional.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- `AreaStore` is a data structure to calculate intersections of 3D cuboid volumes and points.
|
--- `AreaStore` is a data structure to calculate intersections of 3D cuboid volumes and points.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class HTTPRequestHandle
|
--- @class HTTPRequestHandle
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class InvRef
|
--- @class InvRef
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ function ItemStack:peek_item(count) end
|
|||||||
function ItemStack:replace(item) end
|
function ItemStack:replace(item) end
|
||||||
|
|
||||||
--- Take (and remove) up to n items from this stack; returns taken ItemStack; if n is omitted, n=1 is used
|
--- Take (and remove) up to n items from this stack; returns taken ItemStack; if n is omitted, n=1 is used
|
||||||
--- @param count number
|
--- @param count? number
|
||||||
--- @return ItemStack
|
--- @return ItemStack
|
||||||
function ItemStack:take_item(count) end
|
function ItemStack:take_item(count) end
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class LuaEntity
|
--- @class LuaEntity
|
||||||
--- @field name string
|
--- @field name string
|
||||||
--- @field object Entity
|
--- @field object Entity
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Base class used by [`StorageRef`], [`NodeMetaRef`], [`ItemStackMetaRef`],
|
--- Base class used by [`StorageRef`], [`NodeMetaRef`], [`ItemStackMetaRef`],
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
--- ItemStack metadata: reference extra data and functionality stored in a stack.
|
--- ItemStack metadata: reference extra data and functionality stored in a stack.
|
||||||
--- Can be obtained via `item:get_meta()`.
|
--- Can be obtained via `item:get_meta()`.
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Node metadata: reference extra data and functionality stored in a node.
|
--- Node metadata: reference extra data and functionality stored in a node.
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Player metadata.
|
--- Player metadata.
|
||||||
--- Uses the same method of storage as the deprecated player attribute API, so
|
--- Uses the same method of storage as the deprecated player attribute API, so
|
||||||
--- data there will also be in player meta.
|
--- data there will also be in player meta.
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Mod metadata: per mod metadata, saved automatically.
|
--- Mod metadata: per mod metadata, saved automatically.
|
||||||
--- Can be obtained via `core.get_mod_storage()` during load time.
|
--- Can be obtained via `core.get_mod_storage()` during load time.
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Node Timers: a high resolution persistent per-node timer.
|
--- Node Timers: a high resolution persistent per-node timer.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class ObjectRef
|
--- @class ObjectRef
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- A value noise generator. It can be created via ValueNoise() or core.get_value_noise().
|
--- A value noise generator. It can be created via ValueNoise() or core.get_value_noise().
|
||||||
--- For core.get_value_noise(), the actual seed used is the noiseparams seed plus the world
|
--- For core.get_value_noise(), the actual seed used is the noiseparams seed plus the world
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- A fast, bulk noise generator.
|
--- A fast, bulk noise generator.
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class VoxelArea
|
--- @class VoxelArea
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class VoxelManip
|
--- @class VoxelManip
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class vector: Position
|
--- @class vector: Position
|
||||||
--- @operator eq : boolean
|
--- @operator eq : boolean
|
||||||
|
|||||||
@@ -1606,7 +1606,7 @@ function core.item_place_object(itemstack, placer, pointed_thing) end
|
|||||||
--- @param itemstack ItemStack
|
--- @param itemstack ItemStack
|
||||||
--- @param placer Player|ObjectRef|nil
|
--- @param placer Player|ObjectRef|nil
|
||||||
--- @param pointed_thing pointed_thing
|
--- @param pointed_thing pointed_thing
|
||||||
--- @param param2 number
|
--- @param param2? number
|
||||||
--- @return ItemStack, vector|nil
|
--- @return ItemStack, vector|nil
|
||||||
function core.item_place(itemstack, placer, pointed_thing, param2) end
|
function core.item_place(itemstack, placer, pointed_thing, param2) end
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Equivalent to `core.log(table.concat({...}, "\t"))`
|
--- Equivalent to `core.log(table.concat({...}, "\t"))`
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
--- @meta
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Registers a crafting recipe.
|
--- Registers a crafting recipe.
|
||||||
--- * Check recipe table syntax for different types below.
|
--- * Check recipe table syntax for different types below.
|
||||||
--- [TODO]: Link to recipe table syntax documentation.
|
--- [TODO]: Link to recipe table syntax documentation.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Returns the currently loading mod's name, when loading a mod.
|
--- Returns the currently loading mod's name, when loading a mod.
|
||||||
--- - Returns nil if not loading a mod.
|
--- - Returns nil if not loading a mod.
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class ABMDefinition
|
--- @class ABMDefinition
|
||||||
local ABMDefinition = {
|
local ABMDefinition = {
|
||||||
--- Descriptive label for profiling purposes (optional).
|
--- Descriptive label for profiling purposes (optional).
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
---@class AuthenticationHandlerGetAuth
|
---@class AuthenticationHandlerGetAuth
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class BiomeDefinition
|
--- @class BiomeDefinition
|
||||||
--- Definition of a biome for use with `core.register_biome`.
|
--- Definition of a biome for use with `core.register_biome`.
|
||||||
local BiomeDefinition = {
|
local BiomeDefinition = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Used by `core.register_chatcommand`.
|
--- Used by `core.register_chatcommand`.
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class DetachedInventoryCallbacksDef
|
--- @class DetachedInventoryCallbacksDef
|
||||||
local DetachedInventoryCallbacksDef = {
|
local DetachedInventoryCallbacksDef = {
|
||||||
--- Called when a player wants to move items inside the inventory.
|
--- Called when a player wants to move items inside the inventory.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Used by `core.register_entity`.
|
--- Used by `core.register_entity`.
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Used by `HTTPApiTable.fetch` and `HTTPApiTable.fetch_async`.
|
--- Used by `HTTPApiTable.fetch` and `HTTPApiTable.fetch_async`.
|
||||||
---@class HTTPRequest: table
|
---@class HTTPRequest: table
|
||||||
local HTTPRequest = {
|
local HTTPRequest = {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Passed to `HTTPApiTable.fetch` callback. Returned by `HTTPApiTable.fetch_async_get`.
|
--- Passed to `HTTPApiTable.fetch` callback. Returned by `HTTPApiTable.fetch_async_get`.
|
||||||
---@class HTTPRequestResult: table
|
---@class HTTPRequestResult: table
|
||||||
local HTTPRequestResult = {
|
local HTTPRequestResult = {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class HudDefinition
|
--- @class HudDefinition
|
||||||
local HudDefinition = {
|
local HudDefinition = {
|
||||||
--- Name of the HUD element.
|
--- Name of the HUD element.
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class ItemDefinition: table
|
--- @class ItemDefinition: table
|
||||||
local ItemDefinition = {
|
local ItemDefinition = {
|
||||||
--- Can contain new lines. "\n" has to be used as new line character.
|
--- Can contain new lines. "\n" has to be used as new line character.
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class LBMDefinition
|
--- @class LBMDefinition
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class LSystemTreeDefinition
|
--- @class LSystemTreeDefinition
|
||||||
--- @field axiom string initial tree axiom
|
--- @field axiom string initial tree axiom
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class NodeDefinition: ItemDefinition
|
--- @class NodeDefinition: ItemDefinition
|
||||||
local NodeDefinition = {
|
local NodeDefinition = {
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- For 2D or 3D value noise or value noise maps:
|
--- For 2D or 3D value noise or value noise maps:
|
||||||
---
|
---
|
||||||
--- ```lua
|
--- ```lua
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class ObjectProperties
|
--- @class ObjectProperties
|
||||||
local ObjectProperties = {
|
local ObjectProperties = {
|
||||||
--- Defines the maximum and default HP of the entity
|
--- Defines the maximum and default HP of the entity
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class OreDefinition
|
--- @class OreDefinition
|
||||||
--- Defines an ore to be registered with `core.register_ore`.
|
--- Defines an ore to be registered with `core.register_ore`.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Used by `core.register_privilege`.
|
--- Used by `core.register_privilege`.
|
||||||
--- @class PrivilegeDefinition
|
--- @class PrivilegeDefinition
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class TileAnimationDefinition: table
|
--- @class TileAnimationDefinition: table
|
||||||
local TileAnimationDefinition = {
|
local TileAnimationDefinition = {
|
||||||
--- @type string one of {"vertical_frames"|"sheet_2d"}
|
--- @type string one of {"vertical_frames"|"sheet_2d"}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class TileDefinition
|
--- @class TileDefinition
|
||||||
local TileDefinition = {
|
local TileDefinition = {
|
||||||
--- @type string
|
--- @type string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Get the hypotenuse of a triangle with legs x and y. Useful for distance calculation.
|
--- Get the hypotenuse of a triangle with legs x and y. Useful for distance calculation.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- e.g. `"a,b":split(",")` returns `{"a","b"}`
|
--- e.g. `"a,b":split(",")` returns `{"a","b"}`
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @diagnostic disable: missing-return
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- Returns a deep copy of `table`
|
--- Returns a deep copy of `table`
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- A ColorString is a string that represents a color. It can be one of the following:
|
--- A ColorString is a string that represents a color. It can be one of the following:
|
||||||
--- * a named color, e.g. `"red"`, `"blue"`, `"green"`, etc.
|
--- * a named color, e.g. `"red"`, `"blue"`, `"green"`, etc.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--- @mete
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- A schematic specifier identifies a schematic by either a filename to a Luanti Schematic file (.mts) or through raw data supplied through Lua, in the form of a table.
|
--- A schematic specifier identifies a schematic by either a filename to a Luanti Schematic file (.mts) or through raw data supplied through Lua, in the form of a table.
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- @class SimpleSoundSpec
|
--- @class SimpleSoundSpec
|
||||||
local SimpleSoundSpec = {
|
local SimpleSoundSpec = {
|
||||||
--- Scales the gain specified in `SimpleSoundSpec`.
|
--- Scales the gain specified in `SimpleSoundSpec`.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--- @meta
|
||||||
|
|
||||||
|
|
||||||
--- **Texture overlaying:** `^`.
|
--- **Texture overlaying:** `^`.
|
||||||
--- **Texture grouping:** `(` and `)`.
|
--- **Texture grouping:** `(` and `)`.
|
||||||
|
|||||||
Reference in New Issue
Block a user