fixed bookshelf formspecs
This commit is contained in:
parent
56904b5f03
commit
a7a92b2663
@ -285,6 +285,17 @@ form_crafting = form_crafting .. default.ui.get_itemslot_bg(2.25, 0.75, 3, 3)
|
|||||||
form_crafting = form_crafting .. default.ui.get_itemslot_bg(6.25, 1.75, 1, 1)
|
form_crafting = form_crafting .. default.ui.get_itemslot_bg(6.25, 1.75, 1, 1)
|
||||||
default.ui.register_page("core_crafting", form_crafting)
|
default.ui.register_page("core_crafting", form_crafting)
|
||||||
|
|
||||||
|
local form_bookshelf = default.ui.get_page("core_2part")
|
||||||
|
form_bookshelf = form_bookshelf .. "list[current_player;main;0.25,4.75;8,4;]"
|
||||||
|
form_bookshelf = form_bookshelf .. "listring[current_player;main]"
|
||||||
|
form_bookshelf = form_bookshelf .. default.ui.get_hotbar_itemslot_bg(0.25, 4.75, 8, 1)
|
||||||
|
form_bookshelf = form_bookshelf .. default.ui.get_itemslot_bg(0.25, 5.75, 8, 3)
|
||||||
|
|
||||||
|
form_bookshelf = form_bookshelf .. "list[current_name;main;2.25,1.25;4,2;]"
|
||||||
|
form_bookshelf = form_bookshelf .. "listring[current_name;main]"
|
||||||
|
form_bookshelf = form_bookshelf .. default.ui.get_itemslot_bg(2.25, 1.25, 4, 2)
|
||||||
|
default.ui.register_page("core_bookshelf", form_bookshelf)
|
||||||
|
|
||||||
function default.ui.receive_fields(player, form_name, fields)
|
function default.ui.receive_fields(player, form_name, fields)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
|
||||||
|
@ -442,12 +442,10 @@ minetest.register_node(
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", default.base_formspec..
|
meta:set_string("formspec", default.ui.get_page("core_bookshelf"))
|
||||||
"list[current_name;main;0,1.25;8,2;]"..
|
|
||||||
default.get_slot_bg(0,1.25,8,2))
|
|
||||||
meta:set_string("infotext", "Bookshelf")
|
meta:set_string("infotext", "Bookshelf")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*2)
|
inv:set_size("main", 4*2)
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos,player)
|
can_dig = function(pos,player)
|
||||||
local meta = minetest.get_meta(pos);
|
local meta = minetest.get_meta(pos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user