mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-04 23:31:05 +01:00
Hooper formspec
This commit is contained in:
parent
452cd26558
commit
1065eb4d8c
2 changed files with 43 additions and 38 deletions
|
@ -366,8 +366,6 @@ local function set_inventory(player, armor_change_only)
|
|||
return
|
||||
end
|
||||
|
||||
|
||||
|
||||
player:set_inventory_formspec(mcl_inventory.build_survival_formspec(player))
|
||||
end
|
||||
|
||||
|
@ -436,7 +434,7 @@ function mcl_inventory.update_inventory(player, armor_change_only)
|
|||
local player_gamemode = mcl_gamemode.get_gamemode(player)
|
||||
if player_gamemode == "creative" then
|
||||
if armor_change_only then
|
||||
-- Stay on survival inventory plage if only the armor has been changed
|
||||
-- Stay on survival inventory page if only the armor has been changed
|
||||
mcl_inventory.set_creative_formspec(player, 0, 0, nil, nil, "inv")
|
||||
else
|
||||
mcl_inventory.set_creative_formspec(player, 0, 1)
|
||||
|
|
|
@ -12,17 +12,24 @@ end
|
|||
--[[ BEGIN OF NODE DEFINITIONS ]]
|
||||
|
||||
local mcl_hoppers_formspec = table.concat({
|
||||
"size[9,7]",
|
||||
"label[2,0;"..F(C(mcl_formspec.label_color, S("Hopper"))).."]",
|
||||
"list[context;main;2,0.5;5,1;]",
|
||||
mcl_formspec.get_itemslot_bg(2,0.5,5,1),
|
||||
"label[0,2;"..F(C(mcl_formspec.label_color, S("Inventory"))).."]",
|
||||
"list[current_player;main;0,2.5;9,3;9]",
|
||||
mcl_formspec.get_itemslot_bg(0,2.5,9,3),
|
||||
"list[current_player;main;0,5.74;9,1;]",
|
||||
mcl_formspec.get_itemslot_bg(0,5.74,9,1),
|
||||
"formspec_version[4]",
|
||||
"size[11.75,8.175]",
|
||||
|
||||
"label[0.375,0.375;" .. F(C(mcl_formspec.label_color, S("Hopper"))) .. "]",
|
||||
|
||||
mcl_formspec.get_itemslot_bg_v4(2.875, 0.75, 5, 1),
|
||||
"list[context;main;2.875,0.75;5,1;]",
|
||||
|
||||
"label[0.375,2.45;" .. F(C(mcl_formspec.label_color, S("Inventory"))) .. "]",
|
||||
|
||||
mcl_formspec.get_itemslot_bg_v4(0.375, 2.85, 9, 3),
|
||||
"list[current_player;main;0.375,2.85;9,3;9]",
|
||||
|
||||
mcl_formspec.get_itemslot_bg_v4(0.375, 6.8, 9, 1),
|
||||
"list[current_player;main;0.375,6.8;9,1;]",
|
||||
|
||||
"listring[context;main]",
|
||||
"listring[current_player;main]"
|
||||
"listring[current_player;main]",
|
||||
})
|
||||
|
||||
-- Downwards hopper (base definition)
|
||||
|
|
Loading…
Reference in a new issue