From fcfdd129ae453e07cd2ed0da4f9435b5ddf3e21a Mon Sep 17 00:00:00 2001 From: alek13 Date: Sat, 3 May 2025 05:18:45 +0300 Subject: [PATCH] `ide-helper`: rename class `Node` -> `NodeTable`. --- definitions/NodeDefinition.lua | 6 +++--- minetest_ns.lua | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/definitions/NodeDefinition.lua b/definitions/NodeDefinition.lua index 0f08753..14e8588 100644 --- a/definitions/NodeDefinition.lua +++ b/definitions/NodeDefinition.lua @@ -447,7 +447,7 @@ local NodeDefinition = { --- default: minetest.node_punch --- Called when puncher (an ObjectRef) punches the node at pos. --- By default calls minetest.register_on_punchnode callbacks. - --- @type fun(pos:Position, node:Node, puncher:Player|ObjectRef|nil, pointed_thing:pointed_thing) + --- @type fun(pos:Position, node:NodeTable, puncher:Player|ObjectRef|nil, pointed_thing:pointed_thing) on_punch = nil, --- default: nil @@ -459,14 +459,14 @@ local NodeDefinition = { --- Note: pointed_thing can be nil, if a mod calls this function. --- This function does not get triggered by clients <=0.4.16 if the --- "formspec" node metadata field is set. - --- @type fun(pos:Position, node:Node, clicker:Player|ObjectRef|nil, itemstack:ItemStack, pointed_thing:pointed_thing|nil) + --- @type fun(pos:Position, node:NodeTable, clicker:Player|ObjectRef|nil, itemstack:ItemStack, pointed_thing:pointed_thing|nil) on_rightclick = nil, --- default: minetest.node_dig --- By default checks privileges, wears out item (if tool) and removes node. --- return true if the node was dug successfully, false otherwise. --- Deprecated: returning nil is the same as returning true. - --- @type fun(pos:Position, node:Node, digger:Player): boolean + --- @type fun(pos:Position, node:NodeTable, digger:Player): boolean on_dig = nil, --- default: nil diff --git a/minetest_ns.lua b/minetest_ns.lua index 860bdb7..859a6f3 100644 --- a/minetest_ns.lua +++ b/minetest_ns.lua @@ -11,7 +11,7 @@ -- --- See ./classes/AreaStore.lua ----@class Node +---@class NodeTable ---@field name string ---@field param1 number ---@field param2 number @@ -889,7 +889,7 @@ function minetest.remove_node(pos) end --- --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4860-L4863) ---@param pos Position ----@return Node +---@return NodeTable function minetest.get_node(pos) end --- * Same as `get_node` but returns `nil` for unloaded areas. ---