ItemDefinition & NodeDefinition: add luanti & smc groups annotations

This commit is contained in:
Van
2026-11-08 20:05:18 +03:00
parent 195185f1c2
commit a94b014166
5 changed files with 188 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
---Version: 5.18
---@meta
---@class ItemDefinition.Groups
---@field [string] integer?
local ItemDefinition = {}
--- Luanti groups ---
---Special group for inventory mods to indicate that the item should be hidden in item lists.
---@type integer?
ItemDefinition.not_in_creative_inventory = nil
---If set to 1 for a tool, it cannot be repaired using the `"toolrepair"` crafting recipe.
---@type integer?
ItemDefinition.disable_repair = nil
--- SMC groups ---

View File

@@ -34,7 +34,7 @@ Settings.short_description = nil
--- {bendy = 2, snappy = 1},
--- {hard = 1, metal = 1, spikes = 1}
---```
---@type table<string,integer>?
---@type ItemDefinition.Groups?
Settings.groups = nil
---Texture shown in the inventory GUI.