Migrate to modern plugins: fix errors in util/mt-ide-helper & add changes that fixes most errors in code. LG-1978
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- @class AreaStore
|
||||
--- `AreaStore` is a data structure to calculate intersections of 3D cuboid volumes and points.
|
||||
--- Despite its name, mods must take care of persisting AreaStore data. They may use the provided load and write functions for this.
|
||||
--- @class AreaStore
|
||||
--- @field data string may be used to store and retrieve any mod-relevant information to the specified area.
|
||||
AreaStore = {}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- @class HTTPRequestHandle
|
||||
|
||||
--- @class HTTPApiTable
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- @class InvRef
|
||||
InvRef = {}
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
---@class ItemStack
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- @class ItemStack
|
||||
ItemStack = {}
|
||||
|
||||
--- @class ItemStackTable: table
|
||||
--- @field name string
|
||||
--- @field count number
|
||||
--- @field wear number
|
||||
--- @field metadata string|
|
||||
--- @field metadata string
|
||||
|
||||
--- @alias ItemStackString string
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- Base class used by [`StorageRef`], [`NodeMetaRef`], [`ItemStackMetaRef`],
|
||||
--- and [`PlayerMetaRef`].
|
||||
---
|
||||
@@ -62,6 +65,6 @@ function MetaDataRef:to_table() end
|
||||
function MetaDataRef:from_table(value) end
|
||||
|
||||
--- * returns `true` if this metadata has the same key-value pairs as `other`
|
||||
--- @param other
|
||||
--- @param other any
|
||||
--- @return boolean
|
||||
function MetaDataRef:equals(other) end
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- Node metadata: reference extra data and functionality stored in a node.
|
||||
--- Can be obtained via `minetest.get_meta(pos)`.
|
||||
---
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- Node Timers: a high resolution persistent per-node timer.
|
||||
--- Can be gotten via `core.get_node_timer(pos)`.
|
||||
--- @class NodeTimerRef
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- @class ObjectRef
|
||||
ObjectRef = {}
|
||||
|
||||
@@ -29,9 +32,10 @@ function ObjectRef:add_velocity(vel) end
|
||||
--- @param pos Position
|
||||
--- @param continuous boolean
|
||||
function ObjectRef:move_to(pos, continuous) end
|
||||
--- @param puncher ObjectRef another `ObjectRef`,
|
||||
--- Arguments `time_from_last_punch`, `tool_capabilities`, and `direction` will be replaced with a default value when the caller sets them to nil.
|
||||
--- @param puncher ObjectRef|Entity|Player another `ObjectRef`
|
||||
--- @param time_from_last_punch number? time since last punch action of the puncher
|
||||
--- @param direction`: can be `nil`
|
||||
--- @param direction Position the direction from which the punch came, normalized vector
|
||||
function ObjectRef:punch(puncher, time_from_last_punch, tool_capabilities, direction) end
|
||||
--- @param clicker ObjectRef
|
||||
function ObjectRef:right_click(clicker) end
|
||||
@@ -69,17 +73,20 @@ function ObjectRef:set_animation(frame_range, frame_speed, frame_blend, frame_lo
|
||||
function ObjectRef:get_animation() end
|
||||
--- @param frame_speed number default: `15.0`
|
||||
function ObjectRef:set_animation_frame_speed(frame_speed) end
|
||||
|
||||
--- Attaches object to `parent`.
|
||||
--- See 'Attachments' section for details.
|
||||
--- This command may fail silently (do nothing) when it would result in circular attachments.
|
||||
--- @overload fun(parent:ObjectRef)
|
||||
--- @param parent ObjectRef to attach to
|
||||
--- @param bone string default `""` (the root bone)
|
||||
--- @param position Position relative position, default `{x=0, y=0, z=0}`
|
||||
--- @param rotation Position|vector relative rotation in degrees, default `{x=0, y=0, z=0}`
|
||||
--- @param forced_visible boolean to control whether the attached entity should appear in first person, default `false`.
|
||||
--- * Please also read the [Attachments] section above.
|
||||
--- * This command may fail silently (do nothing) when it would result
|
||||
--- in circular attachments.
|
||||
function ObjectRef:set_attach(parent, bone, position, rotation, forced_visible) end
|
||||
--- @return ObjectRef,string,Position,Position,boolean parent, bone, position, rotation, forced_visible, or nil if it isn't attached.
|
||||
--- Returns current attachment parameters or nil if it isn't attached.
|
||||
--- If attached, returns `parent`, `bone`, `position`, `rotation`, `forced_visible`.
|
||||
--- @return ObjectRef,string,Position,Position,boolean|nil
|
||||
function ObjectRef:get_attach() end
|
||||
--- @return ObjectRef[]|table<number,ObjectRef> a list of ObjectRefs that are attached to the object.
|
||||
function ObjectRef:get_children() end
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
---@class Entity: ObjectRef
|
||||
Entity = {}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- @class Player: ObjectRef
|
||||
Player = {}
|
||||
|
||||
--- @return string
|
||||
function Player:get_player_name() end
|
||||
--- @return InvRef
|
||||
function Player:get_inventory() end
|
||||
|
||||
--TODO:
|
||||
--- returns `""` if is not a player
|
||||
--- @return string
|
||||
function Player:get_player_name() end
|
||||
@@ -120,6 +120,8 @@ function Player:get_player_control() end
|
||||
--- * 8 - place
|
||||
--- * 9 - zoom
|
||||
--- * Returns `0` (no bits set) if the object is not a player.
|
||||
--- @return number
|
||||
function Player:get_player_control_bits() end
|
||||
|
||||
--- @class physics_override_table
|
||||
--- @field speed number multiplier to default walking speed value (default: `1`)
|
||||
@@ -129,8 +131,7 @@ function Player:get_player_control() end
|
||||
--- @field sneak_glitch number whether player can use the new move code replications of the old sneak side-effects: sneak ladders and 2 node sneak jump (default: `false`)
|
||||
--- @field new_move number use new move/sneak code. When `false` the exact old code is used for the specific old sneak behavior (default: `true`)
|
||||
|
||||
--- @return physics_override_table
|
||||
function Player:get_player_control_bits() end
|
||||
--- set physics override for player
|
||||
--- * `override_table` is a table with the following fields:
|
||||
--- * `speed`: multiplier to default walking speed value (default: `1`)
|
||||
--- * `jump`: multiplier to default jump value (default: `1`)
|
||||
@@ -144,6 +145,7 @@ function Player:get_player_control_bits() end
|
||||
--- @param override_table physics_override_table
|
||||
function Player:set_physics_override(override_table) end
|
||||
--- returns the table given to `set_physics_override`
|
||||
--- @return physics_override_table
|
||||
function Player:get_physics_override() end
|
||||
--- add a HUD element described by HUD def, returns ID
|
||||
--- number on success
|
||||
@@ -214,8 +216,11 @@ function Player:set_minimap_modes(modes_list, selected_mode) end
|
||||
--- whether `set_sky` accepts this format. Check the legacy format otherwise.
|
||||
--- * Passing no arguments resets the sky to its default values.
|
||||
--- * `sky_parameters` is a table with the following optional fields:
|
||||
--- * `base_color`: ColorSpec, changes fog in "skybox" and "plain".
|
||||
--- (default: `#ffffff`)
|
||||
--- * `base_color`: ColorSpec, changes fog in "skybox" and "plain". (default: `#ffffff`)
|
||||
--- * `body_orbit_tilt`: Float, rotation angle of sun/moon orbit in degrees.
|
||||
--- By default, orbit is controlled by a client-side setting, and this field is not set.
|
||||
--- After a value is assigned, it can only be changed to another float value.
|
||||
--- Valid range [-60.0,60.0] (default: not set)
|
||||
--- * `type`: Available types:
|
||||
--- * `"regular"`: Uses 0 textures, `base_color` ignored
|
||||
--- * `"skybox"`: Uses 6 textures, `base_color` used as fog.
|
||||
@@ -256,6 +261,18 @@ function Player:set_minimap_modes(modes_list, selected_mode) end
|
||||
--- abides by, `"custom"` uses `sun_tint` and `moon_tint`, while
|
||||
--- `"default"` uses the classic Minetest sun and moon tinting.
|
||||
--- Will use tonemaps, if set to `"default"`. (default: `"default"`)
|
||||
--- * `fog`: A table containing the following values:
|
||||
--- * `fog_distance`: integer, set an upper bound for the client's viewing_range.
|
||||
--- Any value >= 0 sets the desired upper bound for viewing_range, disables range_all and prevents disabling fog (F3 key by default).
|
||||
--- Any value < 0 resets the behavior to being client-controlled. (default: -1)
|
||||
--- * `fog_start`: float, override the client's fog_start.
|
||||
--- Fraction of the visible distance at which fog starts to be rendered.
|
||||
--- Any value between [0.0, 0.99] set the fog_start as a fraction of the viewing_range.
|
||||
--- Any value < 0, resets the behavior to being client-controlled. (default: -1)
|
||||
--- * `fog_color`: ColorSpec, override the color of the fog.
|
||||
--- Unlike `base_color` above this will apply regardless of the skybox type.
|
||||
--- (default: `"#00000000"`, which means no override)
|
||||
--- @param sky_parameters table
|
||||
function Player:set_sky(sky_parameters) end
|
||||
--- * Deprecated. Use `set_sky(sky_parameters)`
|
||||
--- * `base_color`: ColorSpec, defaults to white
|
||||
@@ -274,6 +291,7 @@ function Player:set_sky(base_color, type, texture_names, clouds) end
|
||||
function Player:get_sky(as_table) end
|
||||
--- * Deprecated: Use `get_sky(as_table)` instead.
|
||||
--- * returns a table with the `sky_color` parameters as in `set_sky`.
|
||||
--- @deprecated
|
||||
function Player:get_sky_color() end
|
||||
--- * Passing no arguments resets the sun to its default values.
|
||||
--- * `sun_parameters` is a table with the following optional fields:
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- An interface to read config files in the format of `minetest.conf`.
|
||||
---
|
||||
--- `minetest.settings` is a `Settings` instance that can be used to access the
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- @class VoxelArea
|
||||
--- A helper class for voxel areas.
|
||||
--- It can be created via `VoxelArea(pmin, pmax)` or
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
--- @diagnostic disable: missing-return
|
||||
|
||||
|
||||
--- @class VoxelManip
|
||||
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.7.0/doc/lua_api.txt#L4244)
|
||||
|
||||
Reference in New Issue
Block a user