forked from Wuzzy/realtest_mt5
Add listrings to a FEW formspecs
This commit is contained in:
parent
c99b080396
commit
9963261c76
|
@ -78,7 +78,10 @@ creative_inventory.set_creative_formspec = function(player, start_i, pagenum)
|
||||||
"button[0.3,6.5;1.6,1;creative_prev;<<]"..
|
"button[0.3,6.5;1.6,1;creative_prev;<<]"..
|
||||||
"button[2.7,6.5;1.6,1;creative_next;>>]"..
|
"button[2.7,6.5;1.6,1;creative_next;>>]"..
|
||||||
"label[5,1.5;Trash:]"..
|
"label[5,1.5;Trash:]"..
|
||||||
"list[detached:creative_trash;main;5,2;1,1;]")
|
"list[detached:creative_trash;main;5,2;1,1;]"..
|
||||||
|
"listring[detached:creative;main]"..
|
||||||
|
"listring[current_player;main]"..
|
||||||
|
"listring[detached:creative_trash;main]")
|
||||||
end
|
end
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
-- If in creative mode, modify player's inventory forms
|
-- If in creative mode, modify player's inventory forms
|
||||||
|
|
|
@ -100,7 +100,8 @@ function realtest.register_tree(name, TreeDef)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
"list[current_name;main;0,0;8,4;]"..
|
"list[current_name;main;0,0;8,4;]"..
|
||||||
"list[current_player;main;0,5;8,4;]")
|
"list[current_player;main;0,5;8,4;]"..
|
||||||
|
"listring[]")
|
||||||
meta:set_string("infotext", tree.description.." Writing Table")
|
meta:set_string("infotext", tree.description.." Writing Table")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
|
@ -400,7 +401,8 @@ function realtest.register_tree(name, TreeDef)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
"list[current_name;main;0,0;8,4;]"..
|
"list[current_name;main;0,0;8,4;]"..
|
||||||
"list[current_player;main;0,5;8,4;]")
|
"list[current_player;main;0,5;8,4;]"..
|
||||||
|
"listring[]")
|
||||||
meta:set_string("infotext", tree.description.." Chest")
|
meta:set_string("infotext", tree.description.." Chest")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
|
@ -436,7 +438,8 @@ function realtest.register_tree(name, TreeDef)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
"list[current_name;main;0,0;8,4;]"..
|
"list[current_name;main;0,0;8,4;]"..
|
||||||
"list[current_player;main;0,5;8,4;]")
|
"list[current_player;main;0,5;8,4;]"..
|
||||||
|
"listring[]")
|
||||||
meta:set_string("infotext", tree.description.." Locked Chest")
|
meta:set_string("infotext", tree.description.." Locked Chest")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 8*4)
|
inv:set_size("main", 8*4)
|
||||||
|
@ -499,7 +502,8 @@ function realtest.register_tree(name, TreeDef)
|
||||||
"trees:locked_chest",
|
"trees:locked_chest",
|
||||||
"size[8,9]"..
|
"size[8,9]"..
|
||||||
"list[nodemeta:".. pos .. ";main;0,0;8,4;]"..
|
"list[nodemeta:".. pos .. ";main;0,0;8,4;]"..
|
||||||
"list[current_player;main;0,5;8,4;]")
|
"list[current_player;main;0,5;8,4;]"..
|
||||||
|
"listring[]")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -28,6 +28,7 @@ if not minetest.settings:get_bool("creative_mode") then
|
||||||
player:set_inventory_formspec("size[8,7.5]"
|
player:set_inventory_formspec("size[8,7.5]"
|
||||||
.."list[current_player;main;0,3.5;8,4;]"
|
.."list[current_player;main;0,3.5;8,4;]"
|
||||||
.."list[current_player;craft;3,0.5;2,2;]"
|
.."list[current_player;craft;3,0.5;2,2;]"
|
||||||
|
.."listring[]"
|
||||||
.."image[5,1;1,1;workbench_craftarrow.png]"
|
.."image[5,1;1,1;workbench_craftarrow.png]"
|
||||||
.."list[current_player;craftpreview;6,1;1,1;]")
|
.."list[current_player;craftpreview;6,1;1,1;]")
|
||||||
end)
|
end)
|
||||||
|
@ -45,6 +46,7 @@ end
|
||||||
local CRAFTING_FORMSPEC = "size[9,9]"..
|
local CRAFTING_FORMSPEC = "size[9,9]"..
|
||||||
"list[current_player;main;0,5;8,4;]"..
|
"list[current_player;main;0,5;8,4;]"..
|
||||||
"list[current_name;craft;2,1;3,3;]"..
|
"list[current_name;craft;2,1;3,3;]"..
|
||||||
|
"listring[]"..
|
||||||
"image[5,2;1,1;workbench_craftarrow.png]"..
|
"image[5,2;1,1;workbench_craftarrow.png]"..
|
||||||
"list[current_name;craftpreview;6,2;1,1;]"
|
"list[current_name;craftpreview;6,2;1,1;]"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue