Resize player inventory, part1

This commit is contained in:
Mikko Tuumanen 2020-06-03 22:01:25 +03:00 committed by Mikko Tuumanen
parent df3ff16d10
commit b4b889cf63

View File

@ -280,11 +280,11 @@ minetest.register_node("deck:chestpile", {
on_construct = function(pos) on_construct = function(pos)
pile_inv_setup(pos) pile_inv_setup(pos)
local meta=minetest.get_meta(pos) local meta=minetest.get_meta(pos)
meta:set_string("formspec", "size[13,10]".. meta:set_string("formspec", "size[13,11]"..
"list[context;main;0,0;13,4;]".. "list[context;main;0,0;13,4;]"..
"button[0,4;2,1;draw;Draw]".. "button[0,4;2,1;draw;Draw]"..
"button[2,4;2,1;drawall;Draw all]".. "button[2,4;2,1;drawall;Draw all]"..
"list[current_player;main;0,6;8,4;]") "list[current_player;main;0,6;13,5;]")
end, end,
on_dig = on_dig_pile_getpile, on_dig = on_dig_pile_getpile,
stack_max = 1, stack_max = 1,
@ -428,3 +428,7 @@ end)
minetest.register_craft_predict(function(itemstack,player,old_craft_grid,craft_inv) minetest.register_craft_predict(function(itemstack,player,old_craft_grid,craft_inv)
return craft_pile(itemstack,player,old_craft_grid,craft_inv,false) return craft_pile(itemstack,player,old_craft_grid,craft_inv,false)
end) end)
minetest.register_on_joinplayer(function(player)
player:get_inventory():set_size("main", 60)
end)