Check existence of material before registering stele

This commit is contained in:
Pierre-Yves Rollo 2015-12-03 15:43:39 +01:00
parent a7e80f4b98
commit dc7aea71ee

View File

@ -14,6 +14,8 @@ display_lib.register_display_entity("steles:text")
for _, material in ipairs(steles.materials) do
local ndef = minetest.registered_nodes[material]
if ndef then
local parts = material:split(":")
minetest.register_node("steles:"..parts[2].."_stele", {
@ -61,5 +63,6 @@ for _, material in ipairs(steles.materials) do
end
end,
})
end
end