Generate item slot images on the fly

This commit is contained in:
Wuzzy 2020-03-24 18:48:14 +01:00
parent 3cf32c38c5
commit 7243a25fe6
31 changed files with 76 additions and 11 deletions

View file

@ -96,6 +96,10 @@ local function set_inventory(player, armor_change_only)
"list[detached:"..player_name.."_armor;armor;0,1;1,1;2]"..
"list[detached:"..player_name.."_armor;armor;0,2;1,1;3]"..
"list[detached:"..player_name.."_armor;armor;0,3;1,1;4]"..
mcl_formspec.get_itemslot_bg(0,0,1,1)..
mcl_formspec.get_itemslot_bg(0,1,1,1)..
mcl_formspec.get_itemslot_bg(0,2,1,1)..
mcl_formspec.get_itemslot_bg(0,3,1,1)..
armor_slot_imgs..
-- craft and inventory
"label[0,4;"..F(minetest.colorize("#313131", S("Inventory"))).."]"..
@ -104,6 +108,10 @@ local function set_inventory(player, armor_change_only)
"label[4,0.5;"..F(minetest.colorize("#313131", S("Crafting"))).."]"..
"list[current_player;craft;4,1;2,2]"..
"list[current_player;craftpreview;7,1.5;1,1;]"..
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
mcl_formspec.get_itemslot_bg(0,7.74,9,1)..
mcl_formspec.get_itemslot_bg(4,1,2,2)..
mcl_formspec.get_itemslot_bg(7,1.5,1,1)..
-- crafting guide button
"image_button[4.5,3;1,1;craftguide_book.png;__mcl_craftguide;]"..
"tooltip[__mcl_craftguide;"..F(S("Recipe book")).."]"..