Node: minor groups fix
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---@meta
|
---@meta
|
||||||
|
|
||||||
---@class Node.Settings : Item.Settings, NodeDefinition.Settings
|
---@class Node.Settings : NodeDefinition.Settings, Item.Settings
|
||||||
local Settings = {}
|
local Settings = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user