mirror of
https://github.com/minetest-mods/more_chests.git
synced 2025-01-09 08:50:18 +01:00
Update formspecs to lookmore like default chest
This commit is contained in:
parent
0ca4ace7d1
commit
c597779aca
11
cobble.lua
11
cobble.lua
@ -37,10 +37,15 @@ minetest.register_node("more_chests:cobble", {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
"list[current_name;main;0,0;8,4;]"..
|
default.gui_bg ..
|
||||||
"list[current_player;main;0,5;8,4;]"..
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
|
"list[current_name;main;0,0.3;8,4;]"..
|
||||||
|
"list[current_player;main;0,4.85;8,1;]" ..
|
||||||
|
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||||
"listring[current_name;main]"..
|
"listring[current_name;main]"..
|
||||||
"listring[current_player;main]")
|
"listring[current_player;main]" ..
|
||||||
|
default.get_hotbar_bg(0,4.85))
|
||||||
meta:set_string("owner", "")
|
meta:set_string("owner", "")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
|
11
dropbox.lua
11
dropbox.lua
@ -38,10 +38,15 @@ minetest.register_node("more_chests:dropbox", {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
"list[current_name;main;0,0;8,4;]"..
|
default.gui_bg ..
|
||||||
"list[current_player;main;0,5;8,4;]"..
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
|
"list[current_name;main;0,0.3;8,4;]"..
|
||||||
|
"list[current_player;main;0,4.85;8,1;]" ..
|
||||||
|
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||||
"listring[current_name;main]" ..
|
"listring[current_name;main]" ..
|
||||||
"listring[current_player;main]")
|
"listring[current_player;main]" ..
|
||||||
|
default.get_hotbar_bg(0,4.85))
|
||||||
meta:set_string("infotext", "Chest")
|
meta:set_string("infotext", "Chest")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
|
11
secret.lua
11
secret.lua
@ -6,11 +6,16 @@ local function has_locked_chest_privilege(meta, player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local open = "size[8,10]"..
|
local open = "size[8,10]"..
|
||||||
"list[current_name;main;0,0;8,4;]"..
|
default.gui_bg ..
|
||||||
"list[current_player;main;0,5;8,4;]"..
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
|
"list[current_name;main;0,0.3;8,4;]"..
|
||||||
|
"list[current_player;main;0,4.85;8,1;]" ..
|
||||||
|
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||||
"listring[current_name;main]" ..
|
"listring[current_name;main]" ..
|
||||||
"listring[current_player;main]" ..
|
"listring[current_player;main]" ..
|
||||||
"button[3,9;2,1;open;close]"
|
"button[3,9;2,1;open;close]" ..
|
||||||
|
default.get_hotbar_bg(0,4.85)
|
||||||
local closed = "size[2,1]"..
|
local closed = "size[2,1]"..
|
||||||
"button[0,0;2,1;open;open]"
|
"button[0,0;2,1;open;open]"
|
||||||
|
|
||||||
|
13
shared.lua
13
shared.lua
@ -13,12 +13,17 @@ end
|
|||||||
|
|
||||||
local function get_formspec(string)
|
local function get_formspec(string)
|
||||||
return "size[8,10]"..
|
return "size[8,10]"..
|
||||||
"list[current_name;main;0,0;8,4;]"..
|
default.gui_bg ..
|
||||||
"list[current_player;main;0,5;8,4;]"..
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
|
"list[current_name;main;0,0.3;8,4;]"..
|
||||||
|
"list[current_player;main;0,4.85;8,1;]" ..
|
||||||
|
"list[current_player;main;0,6;8,3;8]" ..
|
||||||
"field[.25,9.5;6,1;shared;Shared with (separate names with spaces):;"..string.."]"..
|
"field[.25,9.5;6,1;shared;Shared with (separate names with spaces):;"..string.."]"..
|
||||||
"button[6,9;2,1;submit;submit]" ..
|
"button[6,9.2;2,1;submit;submit]" ..
|
||||||
"listring[current_name;main]" ..
|
"listring[current_name;main]" ..
|
||||||
"listring[current_player;main]"
|
"listring[current_player;main]" ..
|
||||||
|
default.get_hotbar_bg(0,4.85)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("more_chests:shared", {
|
minetest.register_node("more_chests:shared", {
|
||||||
|
12
wifi.lua
12
wifi.lua
@ -10,10 +10,16 @@ minetest.register_node("more_chests:wifi", {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
"list[current_player;more_chests:wifi;0,0;8,4;]"..
|
default.gui_bg ..
|
||||||
"list[current_player;main;0,5;8,4;]" ..
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
|
"list[current_player;more_chests:wifi;0,0.3;8,4;]"..
|
||||||
|
"list[current_player;main;0,4.85;8,1;]" ..
|
||||||
|
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||||
"listring[current_player;more_chests:wifi]" ..
|
"listring[current_player;more_chests:wifi]" ..
|
||||||
"listring[current_player;main]")
|
"listring[current_player;main]" ..
|
||||||
|
default.get_hotbar_bg(0,4.85))
|
||||||
|
|
||||||
meta:set_string("infotext", "Wifi Chest")
|
meta:set_string("infotext", "Wifi Chest")
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||||
|
Loading…
Reference in New Issue
Block a user