mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-05 09:30:36 +02:00
Comments
This commit is contained in:
@ -36,18 +36,25 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
||||
for _, name in pairs(default_nodes) do
|
||||
local nodename = "default:" .. name
|
||||
local ndef = minetest.registered_nodes[nodename]
|
||||
|
||||
if ndef then
|
||||
local groups = {}
|
||||
for k, v in pairs(ndef.groups)
|
||||
|
||||
for k, v in pairs(ndef.groups) do
|
||||
-- Ignore wood and stone groups to not make them usable in crafting:
|
||||
do if k ~= "wood" and k ~= "stone" then
|
||||
if k ~= "wood" and k ~= "stone" then
|
||||
groups[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
local drop
|
||||
|
||||
-- Take string part after "default:" since we want to register
|
||||
-- things in microblocks namespace instead of default
|
||||
if type(ndef.drop) == "string" then
|
||||
drop = ndef.drop:sub(9)
|
||||
end
|
||||
|
||||
stairsplus:register_all("moreblocks", name, nodename, {
|
||||
description = ndef.description,
|
||||
drop = drop,
|
||||
@ -58,4 +65,3 @@ for _, name in pairs(default_nodes) do
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user