forked from nalc/homedecor_modpack
commit
02a4d143f9
@ -8,38 +8,47 @@ end
|
||||
local background = default.gui_bg .. default.gui_bg_img .. default.gui_slots
|
||||
local default_inventory_formspecs = {
|
||||
["4"]="size[8,6]".. background ..
|
||||
"list[context;main;2,0;4,1;]"..
|
||||
"list[current_player;main;0,2;8,4;]",
|
||||
"list[context;main;2,0;4,1;]" ..
|
||||
"list[current_player;main;0,2;8,4;]" ..
|
||||
"listring[]",
|
||||
|
||||
["6"]="size[8,6]".. background ..
|
||||
"list[context;main;1,0;6,1;]"..
|
||||
"list[current_player;main;0,2;8,4;]",
|
||||
"list[current_player;main;0,2;8,4;]" ..
|
||||
"listring[]",
|
||||
|
||||
["8"]="size[8,6]".. background ..
|
||||
"list[context;main;0,0;8,1;]"..
|
||||
"list[current_player;main;0,2;8,4;]",
|
||||
"list[current_player;main;0,2;8,4;]" ..
|
||||
"listring[]",
|
||||
|
||||
["12"]="size[8,7]".. background ..
|
||||
"list[context;main;1,0;6,2;]"..
|
||||
"list[current_player;main;0,3;8,4;]",
|
||||
"list[current_player;main;0,3;8,4;]" ..
|
||||
"listring[]",
|
||||
|
||||
["16"]="size[8,7]".. background ..
|
||||
"list[context;main;0,0;8,2;]"..
|
||||
"list[current_player;main;0,3;8,4;]",
|
||||
"list[current_player;main;0,3;8,4;]" ..
|
||||
"listring[]",
|
||||
|
||||
["24"]="size[8,8]".. background ..
|
||||
"list[context;main;0,0;8,3;]"..
|
||||
"list[current_player;main;0,4;8,4;]",
|
||||
"list[current_player;main;0,4;8,4;]" ..
|
||||
"listring[]",
|
||||
|
||||
["32"]="size[8,9]".. background ..
|
||||
"list[context;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[context;main]" ..
|
||||
"listring[current_player;main]" ..
|
||||
default.get_hotbar_bg(0,4.85),
|
||||
|
||||
["50"]="size[10,10]".. background ..
|
||||
"list[context;main;0,0;10,5;]"..
|
||||
"list[current_player;main;1,6;8,4;]",
|
||||
"list[current_player;main;1,6;8,4;]" ..
|
||||
"listring[]",
|
||||
}
|
||||
|
||||
local function get_formspec_by_size(size)
|
||||
|
@ -36,7 +36,8 @@ homedecor.register("trash_can_green_open", {
|
||||
formspec = "size[8,9]" .. default.gui_bg .. default.gui_bg_img .. default.gui_slots ..
|
||||
"button[2.5,3.8;3,1;empty;Empty Trash]"..
|
||||
"list[context;main;2.5,0.5;3,3;]"..
|
||||
"list[current_player;main;0,5;8,4;]",
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]",
|
||||
},
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
if fields.empty then
|
||||
|
@ -39,7 +39,8 @@ homedecor.register("wardrobe", {
|
||||
clothes_strings..
|
||||
"vertlabel[0,5.2;STORAGE]"..
|
||||
"list[current_name;main;0.5,4.5;5,2;]"..
|
||||
"list[current_player;main;0.5,6.8;5,2;]")
|
||||
"list[current_player;main;0.5,6.8;5,2;]" ..
|
||||
"listring[]")
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
@ -64,7 +64,7 @@ minetest.register_node("inbox:empty", {
|
||||
local name = player and player:get_player_name()
|
||||
local owner = meta:get_string("owner")
|
||||
local inv = meta:get_inventory()
|
||||
return player == owner and inv:is_empty("main")
|
||||
return name == owner and inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
@ -95,7 +95,8 @@ function inbox.get_inbox_formspec(pos)
|
||||
local formspec =
|
||||
"size[8,9]"..
|
||||
"list[nodemeta:".. spos .. ";main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]"
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]"
|
||||
return formspec
|
||||
end
|
||||
|
||||
@ -104,6 +105,7 @@ function inbox.get_inbox_insert_formspec(pos)
|
||||
local formspec =
|
||||
"size[8,9]"..
|
||||
"list[nodemeta:".. spos .. ";drop;3.5,2;1,1;]"..
|
||||
"list[current_player;main;0,5;8,4;]"
|
||||
"list[current_player;main;0,5;8,4;]"..
|
||||
"listring[]"
|
||||
return formspec
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user