diff options
author | Alexander Weber <web.alexander@web.de> | 2017-06-18 23:15:58 +0200 |
---|---|---|
committer | Alexander Weber <web.alexander@web.de> | 2017-06-18 23:15:58 +0200 |
commit | 57b815f91ffd9bdd165c741350c6099f6b08685b (patch) | |
tree | 7070f5ff9fa564e68911defa017f328366f3d351 /unified_inventory_page.lua | |
parent | 920061c0f190d6e79bf6720c983bf1b24aba4bc7 (diff) |
changes needed for character_creator support
Diffstat (limited to 'unified_inventory_page.lua')
-rw-r--r-- | unified_inventory_page.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/unified_inventory_page.lua b/unified_inventory_page.lua index 1892263..0bbb854 100644 --- a/unified_inventory_page.lua +++ b/unified_inventory_page.lua @@ -12,15 +12,15 @@ unified_inventory.register_page("skins", { get_formspec = function(player) local name = player:get_player_name() local skin = skins.get_player_skin(player) - local formspec = ("background[0.06,0.99;7.92,7.52;ui_misc_form.png]" - .."image[0,.75;1,2;"..skin:get_preview().."]" - .."label[6,.5;"..S("Raw texture")..":]" - .."image[6,1;2,1;"..skin:get_texture().."]") - - + local texture = skin:get_texture() local m_name = skin:get_meta_string("name") local m_author = skin:get_meta_string("author") local m_license = skin:get_meta_string("license") + local formspec = "background[0.06,0.99;7.92,7.52;ui_misc_form.png]".."image[0,.75;1,2;"..skin:get_preview().."]" + if texture then + formspec=formspec.."label[6,.5;"..S("Raw texture")..":]" + .."image[6,1;2,1;"..texture.."]" + end if m_name ~= "" then formspec = formspec.."label[2,.5;"..S("Name")..": "..minetest.formspec_escape(m_name).."]" end |