Skip to content

Commit

Permalink
Fix inventory preview with mcl2 (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklp09 committed Jul 25, 2023
1 parent 4fdba85 commit d410239
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

--
Expand Down
3 changes: 1 addition & 2 deletions lua/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion lua/controller.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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;]"..
Expand Down

0 comments on commit d410239

Please sign in to comment.