make bookshelfs nameable

This commit is contained in:
kaadmy 2015-10-23 10:38:24 -07:00
parent 88f2351ab6
commit 2f39603ec8

View File

@ -674,6 +674,15 @@ minetest.register_node(
local inv = meta:get_inventory()
return inv:is_empty("main")
end,
write_name = function(pos, text)
local meta = minetest.get_meta(pos)
if text ~= "" then
meta:set_string("infotext", text)
else
meta:set_string("infotext", "Bookshelf")
end
end,
})
minetest.register_node(