This commit is contained in:
Marcin
2015-06-27 12:07:31 +02:00
parent 825bd17e50
commit 795f029809
3 changed files with 60 additions and 44 deletions

View File

@ -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