Skip to content

Commit

Permalink
User inventory size set to 8x4 when not mineclone
Browse files Browse the repository at this point in the history
  • Loading branch information
mazes-80 committed Feb 18, 2023
1 parent 3f0cd89 commit ef16d4c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lua/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,20 @@ drawers.node_box_simple = {
{-0.4375, -0.5, -0.5, 0.4375, -0.4375, -0.4375},
}

-- Set specific list size for MCL
local formspec_size, x_offset
if drawers.mcl_loaded then
formspec_size = "9,4"
x_offset = 0
else
formspec_size = "8,4"
x_offset = 0.5
end

drawers.drawer_formspec = "size[9,7]" ..
"list[context;upgrades;2,0.5;5,1;]" ..
"list[current_player;main;0,3;9,4;]" ..
"list[current_player;main;" .. x_offset ..
",3;" .. formspec_size .. ";]" ..
"listring[context;upgrades]" ..
"listring[current_player;main]" ..
drawers.gui_bg ..
Expand Down

0 comments on commit ef16d4c

Please sign in to comment.