fix protected chest formspec for mcl
This commit is contained in:
parent
7864957cdd
commit
9b6f8420a2
|
@ -634,7 +634,7 @@ minetest.register_node("protector:chest", {
|
|||
end
|
||||
|
||||
local spos = pos.x .. "," .. pos.y .. "," ..pos.z
|
||||
local formspec = "size[8,9]"
|
||||
local formspec_default = "size[8,9]"
|
||||
.. "list[nodemeta:".. spos .. ";main;0,0.3;8,4;]"
|
||||
|
||||
.. "image_button[-0.01,4.26;1.05,0.8;protector_up_icon.png;protect_up;]"
|
||||
|
@ -651,10 +651,28 @@ minetest.register_node("protector:chest", {
|
|||
.. "listring[nodemeta:" .. spos .. ";main]"
|
||||
.. "listring[current_player;main]"
|
||||
|
||||
local formspec_mcl = "size[9,8.75]"..
|
||||
"label[0,0;"..minetest.formspec_escape(minetest.colorize("#313131", "Protected Chest")).."]"..
|
||||
"list[nodemeta:".. spos ..";main;0,0.5;9,3;]"..
|
||||
mcl_formspec.get_itemslot_bg(0,0.5,9,3)..
|
||||
"image_button[3.0,3.5;1.05,0.8;protector_up_icon.png;protect_up;]"..
|
||||
"image_button[4.0,3.5;1.05,0.8;protector_down_icon.png;protect_down;]"..
|
||||
"label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", "Inventory")).."]"..
|
||||
"list[current_player;main;0,4.5;9,3;9]"..
|
||||
mcl_formspec.get_itemslot_bg(0,4.5,9,3)..
|
||||
"list[current_player;main;0,7.74;9,1;]"..
|
||||
mcl_formspec.get_itemslot_bg(0,7.74,9,1)..
|
||||
"listring[nodemeta:" .. spos .. ";main]"..
|
||||
"listring[current_player;main]"
|
||||
|
||||
local formspec=formspec_default
|
||||
if minetest.get_modpath("mcl_core") then formspec=formspec_mcl end
|
||||
|
||||
minetest.show_formspec(
|
||||
clicker:get_player_name(),
|
||||
"protector:chest_" .. minetest.pos_to_string(pos),
|
||||
formspec)
|
||||
|
||||
end,
|
||||
|
||||
on_blast = function() end,
|
||||
|
|
Loading…
Reference in New Issue