Fix inventory preview with mcl2 (#84)

This commit is contained in:
Niklp 2023-07-25 21:37:34 +02:00 committed by GitHub
parent 4fdba85eb1
commit d410239bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 7 deletions

@ -21,7 +21,7 @@ drawer upgrades to your drawer! They are available in different sizes and are
crafted by steel, gold, obsidian, diamonds or mithril.
## Notes
This mod requires Minetest 0.4.14 or later. The `default` mod from MTG or the
This mod requires Minetest 5.0 or later. The `default` mod from MTG or the
MineClone 2 mods are only optional dependencies for crafting recipes.
## To-Do

@ -58,10 +58,9 @@ drawers.CONTROLLER_RANGE = 14
drawers.gui_bg = "bgcolor[#080808BB;true]"
drawers.gui_slots = "listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
drawers.inventory_list = "list[current_player;main;0.5,2.5;8,4;]"
if (core.get_modpath("mcl_core")) and mcl_core then -- MCL2
drawers.gui_bg_img = "background[5,5;1,1;crafting_creative_bg.png;true]"
else
drawers.gui_bg_img = "background[5,5;1,1;gui_formbg.png;true]"
drawers.inventory_list = "list[current_player;main;0,2.5;9,4;]"
end
--

@ -37,11 +37,10 @@ drawers.node_box_simple = {
drawers.drawer_formspec = "size[9,6.7]" ..
"list[context;upgrades;2,0.5;5,1;]" ..
"list[current_player;main;0.5,2.5;8,4;]" ..
drawers.inventory_list ..
"listring[context;upgrades]" ..
"listring[current_player;main]" ..
drawers.gui_bg ..
drawers.gui_bg_img ..
drawers.gui_slots ..
drawers.get_upgrade_slots_bg(2, 0.5)

@ -51,7 +51,6 @@ local function controller_formspec(pos)
local formspec =
"size[8,8.5]"..
drawers.gui_bg..
drawers.gui_bg_img..
drawers.gui_slots..
"label[0,0;" .. S("Drawer Controller") .. "]" ..
"list[current_name;src;3.5,1.75;1,1;]"..