Node: minor groups fix

This commit is contained in:
Van
2026-11-08 20:50:13 +03:00
parent 56a9388676
commit ced1397c76
2 changed files with 6 additions and 6 deletions

View File

@@ -22,8 +22,8 @@ local function registerSlab(nodeDef)
settings.drawtype = 'nodebox' settings.drawtype = 'nodebox'
settings.paramtype = 'light' settings.paramtype = 'light'
settings.paramtype2 = 'facedir' settings.paramtype2 = 'facedir'
settings.groups['segments'] = nil settings.groups.segments = nil
settings.groups['slabs'] = 1 settings.groups.slabs = 1
if nodeDef.callbacks ~= nil then if nodeDef.callbacks ~= nil then
nodeDef.callbacks.on_place = core.rotate_and_place nodeDef.callbacks.on_place = core.rotate_and_place
else else
@@ -52,8 +52,8 @@ local function registerStair(nodeDef)
settings.drawtype = 'nodebox' settings.drawtype = 'nodebox'
settings.paramtype = 'light' settings.paramtype = 'light'
settings.paramtype2 = 'facedir' settings.paramtype2 = 'facedir'
settings.groups['segments'] = nil settings.groups.segments = nil
settings.groups['slabs'] = 1 settings.groups.stairs = 1
if nodeDef.callbacks ~= nil then if nodeDef.callbacks ~= nil then
nodeDef.callbacks.on_place = core.rotate_and_place nodeDef.callbacks.on_place = core.rotate_and_place
else else
@@ -77,7 +77,7 @@ function Node:new(nodeDef)
-- Registration of segmented blocks. -- Registration of segmented blocks.
-- If you specify a specific group with a specific index for a node, -- If you specify a specific group with a specific index for a node,
-- the slabs and stairs will be registered automatically. -- the slabs and stairs will be registered automatically.
local segmentsIndex = settings.groups and settings.groups['segments'] local segmentsIndex = settings.groups and settings.groups.segments
if segmentsIndex == 1 then if segmentsIndex == 1 then
-- Only slabs -- Only slabs
registerSlab(nodeDef) registerSlab(nodeDef)

View File

@@ -1,4 +1,4 @@
---@meta ---@meta
---@class Node.Settings : Item.Settings, NodeDefinition.Settings ---@class Node.Settings : NodeDefinition.Settings, Item.Settings
local Settings = {} local Settings = {}