Add @meta for all files. Mark couple params as optional.

This commit is contained in:
Alexander Chibrikin
2026-01-26 16:46:40 +03:00
parent a8a2da4059
commit 966a08b597
47 changed files with 90 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- `AreaStore` is a data structure to calculate intersections of 3D cuboid volumes and points.

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- @class HTTPRequestHandle

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- @class InvRef

View File

@@ -100,7 +100,7 @@ function ItemStack:peek_item(count) 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
--- @param count number
--- @param count? number
--- @return ItemStack
function ItemStack:take_item(count) end

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class LuaEntity
--- @field name string
--- @field object Entity

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- Base class used by [`StorageRef`], [`NodeMetaRef`], [`ItemStackMetaRef`],

View File

@@ -1,3 +1,5 @@
--- @meta
--- ItemStack metadata: reference extra data and functionality stored in a stack.
--- Can be obtained via `item:get_meta()`.
---

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- Node metadata: reference extra data and functionality stored in a node.

View File

@@ -1,3 +1,6 @@
--- @meta
--- Player metadata.
--- Uses the same method of storage as the deprecated player attribute API, so
--- data there will also be in player meta.

View File

@@ -1,3 +1,6 @@
--- @meta
--- Mod metadata: per mod metadata, saved automatically.
--- Can be obtained via `core.get_mod_storage()` during load time.
---

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- Node Timers: a high resolution persistent per-node timer.

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- @class ObjectRef

View File

@@ -1,4 +1,5 @@
--- @diagnostic disable: missing-return
--- @meta
--- 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

View File

@@ -1,4 +1,5 @@
--- @diagnostic disable: missing-return
--- @meta
--- A fast, bulk noise generator.
---

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- @class VoxelArea

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- @class VoxelManip

View File

@@ -1,4 +1,5 @@
--- @diagnostic disable: missing-return
--- @meta
--- @class vector: Position
--- @operator eq : boolean

View File

@@ -1606,7 +1606,7 @@ function core.item_place_object(itemstack, placer, pointed_thing) end
--- @param itemstack ItemStack
--- @param placer Player|ObjectRef|nil
--- @param pointed_thing pointed_thing
--- @param param2 number
--- @param param2? number
--- @return ItemStack, vector|nil
function core.item_place(itemstack, placer, pointed_thing, param2) end

View File

@@ -1,3 +1,5 @@
--- @meta
--- Equivalent to `core.log(table.concat({...}, "\t"))`
---

View File

@@ -1,5 +1,6 @@
--- @meta
--- Registers a crafting recipe.
--- * Check recipe table syntax for different types below.
--- [TODO]: Link to recipe table syntax documentation.

View File

@@ -1,4 +1,5 @@
--- @diagnostic disable: missing-return
--- @meta
--- Returns the currently loading mod's name, when loading a mod.
--- - Returns nil if not loading a mod.

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class ABMDefinition
local ABMDefinition = {
--- Descriptive label for profiling purposes (optional).

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
---@class AuthenticationHandlerGetAuth

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class BiomeDefinition
--- Definition of a biome for use with `core.register_biome`.
local BiomeDefinition = {

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- Used by `core.register_chatcommand`.

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class DetachedInventoryCallbacksDef
local DetachedInventoryCallbacksDef = {
--- Called when a player wants to move items inside the inventory.

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- Used by `core.register_entity`.

View File

@@ -1,3 +1,6 @@
--- @meta
--- Used by `HTTPApiTable.fetch` and `HTTPApiTable.fetch_async`.
---@class HTTPRequest: table
local HTTPRequest = {

View File

@@ -1,3 +1,6 @@
--- @meta
--- Passed to `HTTPApiTable.fetch` callback. Returned by `HTTPApiTable.fetch_async_get`.
---@class HTTPRequestResult: table
local HTTPRequestResult = {

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class HudDefinition
local HudDefinition = {
--- Name of the HUD element.

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class ItemDefinition: table
local ItemDefinition = {
--- Can contain new lines. "\n" has to be used as new line character.

View File

@@ -1,3 +1,4 @@
--- @meta
--- @class LBMDefinition

View File

@@ -1,3 +1,5 @@
--- @meta
--- @class LSystemTreeDefinition
--- @field axiom string initial tree axiom

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class NodeDefinition: ItemDefinition
local NodeDefinition = {

View File

@@ -1,3 +1,6 @@
--- @meta
--- For 2D or 3D value noise or value noise maps:
---
--- ```lua

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class ObjectProperties
local ObjectProperties = {
--- Defines the maximum and default HP of the entity

View File

@@ -1,3 +1,5 @@
--- @meta
--- @class OreDefinition
--- Defines an ore to be registered with `core.register_ore`.

View File

@@ -1,4 +1,5 @@
--- @diagnostic disable: missing-return
--- @meta
--- Used by `core.register_privilege`.
--- @class PrivilegeDefinition

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class TileAnimationDefinition: table
local TileAnimationDefinition = {
--- @type string one of {"vertical_frames"|"sheet_2d"}

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class TileDefinition
local TileDefinition = {
--- @type string

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- Get the hypotenuse of a triangle with legs x and y. Useful for distance calculation.

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- e.g. `"a,b":split(",")` returns `{"a","b"}`

View File

@@ -1,4 +1,4 @@
--- @diagnostic disable: missing-return
--- @meta
--- Returns a deep copy of `table`

View File

@@ -1,3 +1,5 @@
--- @meta
--- 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.

View File

@@ -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.

View File

@@ -1,3 +1,6 @@
--- @meta
--- @class SimpleSoundSpec
local SimpleSoundSpec = {
--- Scales the gain specified in `SimpleSoundSpec`.

View File

@@ -1,3 +1,5 @@
--- @meta
--- **Texture overlaying:** `^`.
--- **Texture grouping:** `(` and `)`.