diff --git a/mods/craftingpack/crafting/formspecs.lua b/mods/craftingpack/crafting/formspecs.lua index 91af0bed5f..8d02112ba5 100644 --- a/mods/craftingpack/crafting/formspecs.lua +++ b/mods/craftingpack/crafting/formspecs.lua @@ -1,8 +1,7 @@ default.furnace_inactive_formspec = "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_furnace.png]".. - "bgcolor[#080808BB;true]".. - "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]".. + default.inventory_header.. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. "list[current_name;src;2.75,0.5;1,1;]".. @@ -14,8 +13,7 @@ function default.get_furnace_active_formspec(pos, percent) local formspec = "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_furnace.png]".. - "bgcolor[#080808BB;true]".. - "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]".. + default.inventory_header.. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. "list[current_name;src;2.75,0.5;1,1;]".. @@ -34,8 +32,7 @@ end default.chest_formspec = "size[9,9.75]".. "background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]".. - "bgcolor[#080808BB;true]".. - "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]".. + default.inventory_header.. "list[current_name;main;0,0.5;9,4;]".. "list[current_player;main;0,5.5;9,3;9]".. "list[current_player;main;0,8.74;9,1;]" @@ -55,8 +52,7 @@ function default.get_locked_chest_formspec(pos) local formspec = "size[9,9.75]".. "background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]".. - "bgcolor[#080808BB;true]".. - "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]".. + default.inventory_header.. "list[nodemeta:".. spos .. ";main;0,0.5;9,4;]".. "list[current_player;main;0,5.5;9,3;9]".. "list[current_player;main;0,8.74;9,1;]" diff --git a/mods/craftingpack/crafting/init.lua b/mods/craftingpack/crafting/init.lua index 03109d6825..969c170941 100644 --- a/mods/craftingpack/crafting/init.lua +++ b/mods/craftingpack/crafting/init.lua @@ -87,8 +87,7 @@ local function set_inventory(player) local form = "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory.png"..armor_img.."]".. - "bgcolor[#080808BB;true]".. - "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]".. + default.inventory_header.. img_element --armor if show_armor then @@ -124,8 +123,7 @@ local function set_workbench(player) local form = "size[9,8.75]".. "background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_workbench.png]".. - "bgcolor[#080808BB;true]".. - "listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]".. + default.inventory_header.. "list[current_player;main;0,4.5;9,3;9]".. "list[current_player;main;0,7.74;9,1;]".. "list[current_player;craft;1.75,0.5;3,3;]".. diff --git a/mods/default/init.lua b/mods/default/init.lua index 640422a05a..f826864d00 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -8,8 +8,10 @@ LAVA_VISC = 7 -- Definitions made by this mod that other mods can use too default = {} -default.gui_slots = "listcolors[#808080FF;#CFCFCFFF;#00000000;#000000FF;#FFFFFFFF]" -default.inventory_header = default.gui_slots +default.gui_slots = "listcolors[#9990;#FFF7;#FFF0;#000;#FFF]" +default.gui_bg = "bgcolor[#080808BB;true]" + +default.inventory_header = default.gui_slots .. default.gui_bg minetest.nodedef_default.stack_max = 64 minetest.craftitemdef_default.stack_max = 64