Item_names: Fix backwards compability

This commit is contained in:
SmallJoker 2017-05-09 20:45:15 +02:00
parent 3a5dc12adf
commit 945ab7f55b
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ minetest.register_globalstep(function(dtime)
data.index = index
data.dtime = 0
local desc = stack:get_meta():get_string("description")
local desc = stack.get_meta
and stack:get_meta():get_string("description")
if not desc or desc == "" then
-- Try to use default description when none is set in the meta
local def = minetest.registered_items[itemname]