diff --git a/mods/HUD/mcl_formspec/init.lua b/mods/HUD/mcl_formspec/init.lua new file mode 100644 index 0000000000..7013fc0ee8 --- /dev/null +++ b/mods/HUD/mcl_formspec/init.lua @@ -0,0 +1,11 @@ +mcl_formspec = {} + +function mcl_formspec.get_itemslot_bg(x, y, w, h) + local out = "" + for i = 0, w - 1, 1 do + for j = 0, h - 1, 1 do + out = out .."image["..x+i..","..y+j..";1,1;mcl_formspec_itemslot.png]" + end + end + return out +end diff --git a/mods/HUD/mcl_formspec/mod.conf b/mods/HUD/mcl_formspec/mod.conf new file mode 100644 index 0000000000..9d614403fe --- /dev/null +++ b/mods/HUD/mcl_formspec/mod.conf @@ -0,0 +1 @@ +description = Helper mod to simplify creation of formspecs a little bit diff --git a/mods/HUD/mcl_formspec/textures/mcl_formspec_itemslot.png b/mods/HUD/mcl_formspec/textures/mcl_formspec_itemslot.png new file mode 100644 index 0000000000..84958ecd42 Binary files /dev/null and b/mods/HUD/mcl_formspec/textures/mcl_formspec_itemslot.png differ diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index d5b5e474bf..0b5f52b6b2 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -325,11 +325,16 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz -- Survival inventory slots main_list = "list[current_player;main;0,3.75;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,3.75,9,3).. -- armor "list[detached:"..playername.."_armor;armor;2.5,1.3;1,1;1]".. "list[detached:"..playername.."_armor;armor;2.5,2.75;1,1;2]".. "list[detached:"..playername.."_armor;armor;5.5,1.3;1,1;3]".. "list[detached:"..playername.."_armor;armor;5.5,2.75;1,1;4]".. + mcl_formspec.get_itemslot_bg(2.5,1.3,1,1).. + mcl_formspec.get_itemslot_bg(2.5,2.75,1,1).. + mcl_formspec.get_itemslot_bg(5.5,1.3,1,1).. + mcl_formspec.get_itemslot_bg(5.5,2.75,1,1).. armor_slot_imgs.. -- player preview player_preview.. @@ -354,6 +359,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz else -- Creative inventory slots main_list = "list[detached:creative_"..playername..";main;0,1.75;9,5;"..tostring(start_i).."]".. + mcl_formspec.get_itemslot_bg(0,1.75,9,5).. -- Page buttons "label[9.0,5.5;"..F(S("@1/@2", pagenum, pagemax)).."]".. "image_button[9.0,6.0;0.7,0.7;crafting_creative_prev.png;creative_prev;]".. @@ -412,6 +418,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz "tooltip[nix;"..F(filtername["nix"]).."]".. caption.. "list[current_player;main;0,7;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7,9,1).. main_list.. tab(name, "food") .. "tooltip[food;"..F(filtername["food"]).."]".. @@ -429,6 +436,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz tab(name, "inv") .. "tooltip[inv;"..F(filtername["inv"]).."]".. "list[detached:trash;main;9,7;1,1;]".. + mcl_formspec.get_itemslot_bg(9,7,1,1).. "image[9,7;1,1;crafting_creative_trash.png]".. listrings diff --git a/mods/HUD/mcl_inventory/depends.txt b/mods/HUD/mcl_inventory/depends.txt index 056b070d37..fb454b7d11 100644 --- a/mods/HUD/mcl_inventory/depends.txt +++ b/mods/HUD/mcl_inventory/depends.txt @@ -1,4 +1,5 @@ mcl_init +mcl_formspec mcl_player? _mcl_autogroup? mcl_armor? diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index 994f11e490..e6a1f14603 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -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")).."]".. diff --git a/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png index 146c1422c8..5fd888decb 100644 Binary files a/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png and b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg.png differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png b/mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png deleted file mode 100644 index 4c5113d737..0000000000 Binary files a/mods/HUD/mcl_inventory/textures/crafting_formspec_bg2.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png deleted file mode 100644 index 4540f5086b..0000000000 Binary files a/mods/HUD/mcl_inventory/textures/crafting_inventory_9_slots.png and /dev/null differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_inventory_creative.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_creative.png index 918d670eb9..b0348629e9 100644 Binary files a/mods/HUD/mcl_inventory/textures/crafting_inventory_creative.png and b/mods/HUD/mcl_inventory/textures/crafting_inventory_creative.png differ diff --git a/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_survival.png b/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_survival.png index 50b27a64ab..828404ea2f 100644 Binary files a/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_survival.png and b/mods/HUD/mcl_inventory/textures/crafting_inventory_creative_survival.png differ diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt b/mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt index ad7c191c27..7b51f67cc6 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/depends.txt @@ -1,4 +1,5 @@ mcl_init +mcl_formspec mesecons mcl_sounds mcl_tnt diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index 6e9add612e..a88b66f592 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -13,7 +13,6 @@ local S = minetest.get_translator("mcl_dispensers") local setup_dispenser = function(pos) -- Set formspec and inventory local form = "size[9,8.75]".. - "background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]".. "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/depends.txt b/mods/ITEMS/REDSTONE/mcl_droppers/depends.txt index d8d7ca50fb..cfd9772fe8 100644 --- a/mods/ITEMS/REDSTONE/mcl_droppers/depends.txt +++ b/mods/ITEMS/REDSTONE/mcl_droppers/depends.txt @@ -1,4 +1,5 @@ mcl_init +mcl_formspec mesecons mcl_util doc? diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua index ed026e5f8c..1fa40eeb63 100644 --- a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua @@ -14,7 +14,6 @@ local S = minetest.get_translator("mcl_droppers") local setup_dropper = function(pos) -- Set formspec and inventory local form = "size[9,8.75]".. - "background[-0.19,-0.25;9.41,9.49;crafting_inventory_9_slots.png]".. "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. diff --git a/mods/ITEMS/mcl_anvils/depends.txt b/mods/ITEMS/mcl_anvils/depends.txt index 021df7cb09..98a3e017eb 100644 --- a/mods/ITEMS/mcl_anvils/depends.txt +++ b/mods/ITEMS/mcl_anvils/depends.txt @@ -1,4 +1,5 @@ mcl_init +mcl_formspec mcl_sounds mcl_core? screwdriver? diff --git a/mods/ITEMS/mcl_anvils/init.lua b/mods/ITEMS/mcl_anvils/init.lua index d686a5835f..994a7029e1 100644 --- a/mods/ITEMS/mcl_anvils/init.lua +++ b/mods/ITEMS/mcl_anvils/init.lua @@ -19,10 +19,15 @@ local function get_anvil_formspec(set_name) "background[-0.19,-0.25;9.41,9.49;mcl_anvils_inventory.png]".. "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. "list[current_player;main;0,7.74;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.74,9,1).. "list[context;input;1,2.5;1,1;]".. + mcl_formspec.get_itemslot_bg(1,2.5,1,1).. "list[context;input;4,2.5;1,1;1]".. + mcl_formspec.get_itemslot_bg(4,2.5,1,1).. "list[context;output;8,2.5;1,1;]".. + mcl_formspec.get_itemslot_bg(8,2.5,1,1).. "label[3,0.1;"..minetest.formspec_escape(minetest.colorize("#313131", S("Repair and Name"))).."]".. "field[3.25,1;4,1;name;;"..minetest.formspec_escape(set_name).."]".. "field_close_on_enter[name;false]".. diff --git a/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png b/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png index d0ab108c61..fdbb706d10 100644 Binary files a/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png and b/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png differ diff --git a/mods/ITEMS/mcl_chests/depends.txt b/mods/ITEMS/mcl_chests/depends.txt index cd00aa229c..af11d5f6c9 100644 --- a/mods/ITEMS/mcl_chests/depends.txt +++ b/mods/ITEMS/mcl_chests/depends.txt @@ -1,4 +1,5 @@ mcl_init +mcl_formspec mcl_core mcl_sounds mcl_end diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index cbff97b590..669cb159e1 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -183,12 +183,14 @@ minetest.register_node("mcl_chests:"..basename, { minetest.show_formspec(clicker:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, "size[9,8.75]".. - "background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]".. "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Chest"))).."]".. "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]".. + mcl_formspec.get_itemslot_bg(0,0.5,9,3).. "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. "list[current_player;main;0,7.74;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.74,9,1).. "listring[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main]".. "listring[current_player;main]") @@ -317,13 +319,16 @@ minetest.register_node("mcl_chests:"..basename.."_left", { minetest.show_formspec(clicker:get_player_name(), "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, "size[9,11.5]".. - "background[-0.19,-0.25;9.41,12.5;mcl_chests_inventory_chest_large.png]".. "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Large Chest"))).."]".. "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]".. + mcl_formspec.get_itemslot_bg(0,0.5,9,3).. "list[nodemeta:"..pos_other.x..","..pos_other.y..","..pos_other.z..";main;0,3.5;9,3;]".. + mcl_formspec.get_itemslot_bg(0,3.5,9,3).. "label[0,7;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,7.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,7.5,9,3).. "list[current_player;main;0,10.75;9,1;]".. + mcl_formspec.get_itemslot_bg(0,10.75,9,1).. -- BEGIN OF LISTRING WORKAROUND "listring[current_player;main]".. "listring[nodemeta:"..pos.x..","..pos.y..","..pos.z..";input]".. @@ -452,13 +457,16 @@ minetest.register_node("mcl_chests:"..basename.."_right", { "mcl_chests:"..canonical_basename.."_"..pos.x.."_"..pos.y.."_"..pos.z, "size[9,11.5]".. - "background[-0.19,-0.25;9.41,12.5;mcl_chests_inventory_chest_large.png]".. "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Large Chest"))).."]".. "list[nodemeta:"..pos_other.x..","..pos_other.y..","..pos_other.z..";main;0,0.5;9,3;]".. + mcl_formspec.get_itemslot_bg(0,0.5,9,3).. "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,3.5;9,3;]".. + mcl_formspec.get_itemslot_bg(0,3.5,9,3).. "label[0,7;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,7.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,7.5,9,3).. "list[current_player;main;0,10.75;9,1;]".. + mcl_formspec.get_itemslot_bg(0,10.75,9,1).. -- BEGIN OF LISTRING WORKAROUND "listring[current_player;main]".. "listring[nodemeta:"..pos.x..","..pos.y..","..pos.z..";input]".. @@ -662,12 +670,14 @@ minetest.register_node("mcl_chests:ender_chest", { local meta = minetest.get_meta(pos) meta:set_string("formspec", "size[9,8.75]".. - "background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]".. "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Ender Chest"))).."]".. "list[current_player;enderchest;0,0.5;9,3;]".. + mcl_formspec.get_itemslot_bg(0,0.5,9,3).. "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. "list[current_player;main;0,7.74;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.74,9,1).. "listring[current_player;enderchest]".. "listring[current_player;main]") end, @@ -783,12 +793,14 @@ for color, desc in pairs(boxtypes) do local meta = minetest.get_meta(pos) meta:set_string("formspec", "size[9,8.75]".. - "background[-0.19,-0.25;9.41,10.48;mcl_chests_inventory_chest.png]".. "label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Shulker Box"))).."]".. "list[current_name;main;0,0.5;9,3;]".. + mcl_formspec.get_itemslot_bg(0,0.5,9,3).. "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. "list[current_player;main;0,7.74;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.74,9,1).. "listring[current_name;main]".. "listring[current_player;main]") local inv = meta:get_inventory() diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest.png deleted file mode 100644 index 074790cfce..0000000000 Binary files a/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest.png and /dev/null differ diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest_large.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest_large.png deleted file mode 100644 index 98f738faaa..0000000000 Binary files a/mods/ITEMS/mcl_chests/textures/mcl_chests_inventory_chest_large.png and /dev/null differ diff --git a/mods/ITEMS/mcl_crafting_table/depends.txt b/mods/ITEMS/mcl_crafting_table/depends.txt index e3b8528c2d..97aafc582b 100644 --- a/mods/ITEMS/mcl_crafting_table/depends.txt +++ b/mods/ITEMS/mcl_crafting_table/depends.txt @@ -1,2 +1,3 @@ mcl_init +mcl_formspec mcl_sounds diff --git a/mods/ITEMS/mcl_crafting_table/init.lua b/mods/ITEMS/mcl_crafting_table/init.lua index 9d6979a4e8..bcc8fc43b8 100644 --- a/mods/ITEMS/mcl_crafting_table/init.lua +++ b/mods/ITEMS/mcl_crafting_table/init.lua @@ -16,13 +16,17 @@ minetest.register_node("mcl_crafting_table:crafting_table", { player:get_inventory():set_size("craft", 9) local form = "size[9,8.75]".. - "background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg2.png^crafting_inventory_workbench.png]".. + "background[-0.19,-0.25;9.41,9.49;crafting_inventory_workbench.png]".. "label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. "list[current_player;main;0,7.74;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.74,9,1).. "label[1.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Crafting"))).."]".. "list[current_player;craft;1.75,0.5;3,3;]".. + mcl_formspec.get_itemslot_bg(1.75,0.5,3,3).. "list[current_player;craftpreview;6.1,1.5;1,1;]".. + mcl_formspec.get_itemslot_bg(6.1,1.5,1,1).. "image_button[0.75,1.5;1,1;craftguide_book.png;__mcl_craftguide;]".. "tooltip[__mcl_craftguide;"..minetest.formspec_escape(S("Recipe book")).."]".. "listring[current_player;main]".. diff --git a/mods/ITEMS/mcl_crafting_table/textures/crafting_inventory_workbench.png b/mods/ITEMS/mcl_crafting_table/textures/crafting_inventory_workbench.png index 46ce1092ee..807b25f02f 100644 Binary files a/mods/ITEMS/mcl_crafting_table/textures/crafting_inventory_workbench.png and b/mods/ITEMS/mcl_crafting_table/textures/crafting_inventory_workbench.png differ diff --git a/mods/ITEMS/mcl_furnaces/depends.txt b/mods/ITEMS/mcl_furnaces/depends.txt index 441fdfde68..365076c1f6 100644 --- a/mods/ITEMS/mcl_furnaces/depends.txt +++ b/mods/ITEMS/mcl_furnaces/depends.txt @@ -1,4 +1,5 @@ mcl_init +mcl_formspec mcl_core mcl_sounds mcl_craftguide diff --git a/mods/ITEMS/mcl_furnaces/init.lua b/mods/ITEMS/mcl_furnaces/init.lua index c17b29b786..871e38ab04 100644 --- a/mods/ITEMS/mcl_furnaces/init.lua +++ b/mods/ITEMS/mcl_furnaces/init.lua @@ -7,14 +7,18 @@ local S = minetest.get_translator("mcl_furnaces") local function active_formspec(fuel_percent, item_percent) return "size[9,8.75]".. - "background[-0.19,-0.25;9.41,9.49;crafting_inventory_furnace.png]".. "label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. "list[current_player;main;0,7.74;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.74,9,1).. "label[2.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Furnace"))).."]".. "list[current_name;src;2.75,0.5;1,1;]".. + mcl_formspec.get_itemslot_bg(2.75,0.5,1,1).. "list[current_name;fuel;2.75,2.5;1,1;]".. + mcl_formspec.get_itemslot_bg(2.75,2.5,1,1).. "list[current_name;dst;5.75,1.5;1,1;]".. + mcl_formspec.get_itemslot_bg(5.75,2.5,1,1).. "image[2.75,1.5;1,1;default_furnace_fire_bg.png^[lowpart:".. (100-fuel_percent)..":default_furnace_fire_fg.png]".. "image[4.1,1.5;1.5,1;gui_furnace_arrow_bg.png^[lowpart:".. @@ -30,14 +34,18 @@ local function active_formspec(fuel_percent, item_percent) end local inactive_formspec = "size[9,8.75]".. - "background[-0.19,-0.25;9.41,9.49;crafting_inventory_furnace.png]".. "label[0,4;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. "list[current_player;main;0,7.74;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.74,9,1).. "label[2.75,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Furnace"))).."]".. "list[current_name;src;2.75,0.5;1,1;]".. + mcl_formspec.get_itemslot_bg(2.75,0.5,1,1).. "list[current_name;fuel;2.75,2.5;1,1;]".. + mcl_formspec.get_itemslot_bg(2.75,2.5,1,1).. "list[current_name;dst;5.75,1.5;1,1;]".. + mcl_formspec.get_itemslot_bg(5.75,1.5,1,1).. "image[2.75,1.5;1,1;default_furnace_fire_bg.png]".. "image[4.1,1.5;1.5,1;gui_furnace_arrow_bg.png^[transformR270]".. "image_button[8,0;1,1;craftguide_book.png;craftguide;]".. diff --git a/mods/ITEMS/mcl_furnaces/textures/crafting_inventory_furnace.png b/mods/ITEMS/mcl_furnaces/textures/crafting_inventory_furnace.png deleted file mode 100644 index 344c624786..0000000000 Binary files a/mods/ITEMS/mcl_furnaces/textures/crafting_inventory_furnace.png and /dev/null differ diff --git a/mods/ITEMS/mcl_hoppers/depends.txt b/mods/ITEMS/mcl_hoppers/depends.txt index dbefba4386..67a60d4dff 100644 --- a/mods/ITEMS/mcl_hoppers/depends.txt +++ b/mods/ITEMS/mcl_hoppers/depends.txt @@ -1,4 +1,5 @@ mcl_core +mcl_formspec mcl_sounds mcl_util doc? diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index d67793e202..668d6db4c8 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -4,12 +4,14 @@ local S = minetest.get_translator("mcl_hoppers") local mcl_hoppers_formspec = "size[9,7]".. - "background[-0.19,-0.25;9.41,10.48;mcl_hoppers_inventory.png]".. "label[2,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))).."]".. "list[current_name;main;2,0.5;5,1;]".. + mcl_formspec.get_itemslot_bg(2,0.5,5,1).. "label[0,2;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,2.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,2.5,9,3).. "list[current_player;main;0,5.74;9,1;]".. + mcl_formspec.get_itemslot_bg(0,5.74,9,1).. "listring[current_name;main]".. "listring[current_player;main]" diff --git a/mods/ITEMS/mcl_hoppers/textures/mcl_hoppers_inventory.png b/mods/ITEMS/mcl_hoppers/textures/mcl_hoppers_inventory.png deleted file mode 100644 index 4ad34eedfa..0000000000 Binary files a/mods/ITEMS/mcl_hoppers/textures/mcl_hoppers_inventory.png and /dev/null differ