Check for ndef before registering Stairs+ nodes.

This commit is contained in:
Calinou 2015-02-11 17:59:28 +01:00
parent 5e0201968e
commit aef4413eb9

View File

@ -35,6 +35,7 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
for _, name in pairs(default_nodes) do for _, name in pairs(default_nodes) do
local nodename = "default:" .. name local nodename = "default:" .. name
local ndef = minetest.registered_nodes[nodename] local ndef = minetest.registered_nodes[nodename]
if ndef then
local groups = {} local groups = {}
for k, v in pairs(ndef.groups) for k, v in pairs(ndef.groups)
-- Ignore wood and stone groups to not make them usable in crafting: -- Ignore wood and stone groups to not make them usable in crafting:
@ -54,5 +55,6 @@ for _, name in pairs(default_nodes) do
tiles = ndef.tiles, tiles = ndef.tiles,
sunlight_propagates = true, sunlight_propagates = true,
}) })
end
end end