make bookshelfs nameable
This commit is contained in:
parent
88f2351ab6
commit
2f39603ec8
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user