Wooden blocks: Refactoring lottplants: add planks API. Closes lord-server/lord#1236

This commit is contained in:
alek13
2024-02-26 02:26:26 +03:00
parent 2b3791de71
commit 146305cabe
3 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
--- @class ItemDefinition
ItemDefinition = {
local ItemDefinition = {
description = "",
-- Can contain new lines. "\n" has to be used as new line character.
-- See also: `get_description` in [`ItemStack`]

View File

@@ -1,5 +1,5 @@
--- @class NodeDefinition: ItemDefinition
NodeDefinition = {
local NodeDefinition = {
drawtype = "normal", -- See "Node drawtypes"

View File

@@ -344,6 +344,8 @@ function minetest.log(level, text) end
-- Environment:
--- @param name string technical node name ("<mod>:<node>").
--- @param node_definition NodeDefinition table with node definition properties.
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4471-L4471)
function minetest.register_node(name, node_definition) end
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4472-L4472)
@@ -2286,12 +2288,12 @@ minetest.env = {}
--- * Map of registered items, indexed by name
---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L5838-L5839)
--- @type table
--- @type table|ItemDefinition[]
minetest.registered_items = {}
--- * Map of registered node definitions, indexed by name
---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L5840-L5841)
--- @type table
--- @type table<string,NodeDefinition>|NodeDefinition[]
minetest.registered_nodes = {}
--- * Map of registered craft item definitions, indexed by name
---