Node: minor groups fix
This commit is contained in:
@@ -22,8 +22,8 @@ local function registerSlab(nodeDef)
|
||||
settings.drawtype = 'nodebox'
|
||||
settings.paramtype = 'light'
|
||||
settings.paramtype2 = 'facedir'
|
||||
settings.groups['segments'] = nil
|
||||
settings.groups['slabs'] = 1
|
||||
settings.groups.segments = nil
|
||||
settings.groups.slabs = 1
|
||||
if nodeDef.callbacks ~= nil then
|
||||
nodeDef.callbacks.on_place = core.rotate_and_place
|
||||
else
|
||||
@@ -52,8 +52,8 @@ local function registerStair(nodeDef)
|
||||
settings.drawtype = 'nodebox'
|
||||
settings.paramtype = 'light'
|
||||
settings.paramtype2 = 'facedir'
|
||||
settings.groups['segments'] = nil
|
||||
settings.groups['slabs'] = 1
|
||||
settings.groups.segments = nil
|
||||
settings.groups.stairs = 1
|
||||
if nodeDef.callbacks ~= nil then
|
||||
nodeDef.callbacks.on_place = core.rotate_and_place
|
||||
else
|
||||
@@ -77,7 +77,7 @@ function Node:new(nodeDef)
|
||||
-- Registration of segmented blocks.
|
||||
-- If you specify a specific group with a specific index for a node,
|
||||
-- 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
|
||||
-- Only slabs
|
||||
registerSlab(nodeDef)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---@meta
|
||||
|
||||
---@class Node.Settings : Item.Settings, NodeDefinition.Settings
|
||||
---@class Node.Settings : NodeDefinition.Settings, Item.Settings
|
||||
local Settings = {}
|
||||
|
||||
Reference in New Issue
Block a user