mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-12-29 04:00:24 +01:00
Show real item name in craft guide
This commit is contained in:
parent
32769c9f34
commit
fe00059eea
@ -228,6 +228,8 @@ unified_inventory.register_page("craftguide", {
|
||||
formspec = formspec.."listcolors[#00000000;#00000000]"
|
||||
local item_name = unified_inventory.current_item[player_name]
|
||||
if not item_name then return {formspec=formspec} end
|
||||
local displayed_name = minetest.registered_items[item_name].description
|
||||
if not displayed_name then displayed_name = item_name end
|
||||
|
||||
local dir = unified_inventory.current_craft_direction[player_name]
|
||||
local rdir
|
||||
@ -243,7 +245,7 @@ unified_inventory.register_page("craftguide", {
|
||||
|
||||
formspec = formspec.."background[0.5,"..(formspecy + 0.2)..";8,3;ui_craftguide_form.png]"
|
||||
formspec = formspec.."textarea["..craftresultx..","..craftresulty
|
||||
..";10,1;;"..minetest.formspec_escape(F(role_text[dir])..": "..item_name)..";]"
|
||||
..";10,1;;"..minetest.formspec_escape(F(role_text[dir])..": "..displayed_name)..";]"
|
||||
formspec = formspec..stack_image_button(0, formspecy, 1.1, 1.1, "item_button_"
|
||||
.. rdir .. "_", ItemStack(item_name))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user