Fix tooltip display

Tooltip was displaying "Unknown item" on empty slots when using a
replacement in craft.
This commit is contained in:
Louis Royer 2020-07-12 17:05:56 +02:00
parent 24115a0d84
commit 04ed8b2cb7
1 changed files with 3 additions and 0 deletions

View File

@ -790,6 +790,9 @@ local function str_newline(str)
end
local function get_desc(item, lang_code)
if item == "" then
return ""
end
if sub(item, 1, 1) == "_" then
item = sub(item, 2)
end