mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
Item name HUD: Show itemstring as fallback
This commit is contained in:
parent
4afb2d4066
commit
d497205c98
1 changed files with 5 additions and 1 deletions
|
@ -40,7 +40,11 @@ minetest.register_globalstep(function(dtime)
|
|||
dtimes[player_name] = 0
|
||||
if huds[player_name] then
|
||||
local def = minetest.registered_items[wstack]
|
||||
local desc = def and def.description or ""
|
||||
local desc = def and def.description
|
||||
if not desc or desc == "" then
|
||||
-- Use itemstring as fallback
|
||||
desc = wstack
|
||||
end
|
||||
-- Cut off item description after first newline
|
||||
local firstnewline = string.find(desc, "\n")
|
||||
if firstnewline then
|
||||
|
|
Loading…
Reference in a new issue