mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-12-27 19:20:27 +01:00
Revert "Remove mod name from tooltips"
This reverts commit 64b0248c77
.
The mod name may differ from the item name, in which cases it is
helpful to have this information contained in the tooltip.
No information is shown in case the mod name is missing.
This commit is contained in:
parent
dbe06be68b
commit
19efce45ed
@ -256,8 +256,14 @@ local function formspec_add_item_browser(player, formspec, ui_peruser)
|
||||
ui_peruser.btn_size, ui_peruser.btn_size,
|
||||
name, button_name
|
||||
)
|
||||
local tooltip = item.description
|
||||
if item.mod_origin then
|
||||
-- "mod_origin" may not be specified for items that were
|
||||
-- registered in a callback (during or before ServerEnv init)
|
||||
tooltip = tooltip .. " [" .. item.mod_origin .. "]"
|
||||
end
|
||||
formspec[n + 1] = ("tooltip[%s;%s]"):format(
|
||||
button_name, minetest.formspec_escape(item.description)
|
||||
button_name, minetest.formspec_escape(tooltip)
|
||||
)
|
||||
n = n + 2
|
||||
list_index = list_index + 1
|
||||
|
Loading…
Reference in New Issue
Block a user