Make stairplus:register_* functions work without using register_all.

This commit is contained in:
Pierre-Yves Rollo
2015-11-01 17:54:29 +01:00
parent f02a871c30
commit 54a7102291
8 changed files with 57 additions and 38 deletions

View File

@ -40,13 +40,6 @@ 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)
-- Ignore wood and stone groups to not make them usable in crafting:
do if k ~= "wood" and k ~= "stone" then
groups[k] = v
end
end
local drop
if type(ndef.drop) == "string" then
drop = ndef.drop:sub(9)
@ -54,7 +47,7 @@ for _, name in pairs(default_nodes) do
stairsplus:register_all("moreblocks", name, nodename, {
description = ndef.description,
drop = drop,
groups = groups,
groups = ndef.groups,
sounds = ndef.sounds,
tiles = ndef.tiles,
sunlight_propagates = true,