Add listrings to a FEW formspecs

This commit is contained in:
Wuzzy 2020-03-31 01:08:35 +02:00
parent c99b080396
commit 9963261c76
3 changed files with 14 additions and 5 deletions

View File

@ -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[2.7,6.5;1.6,1;creative_next;>>]"..
"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
minetest.register_on_joinplayer(function(player)
-- If in creative mode, modify player's inventory forms

View File

@ -100,7 +100,8 @@ function realtest.register_tree(name, TreeDef)
meta:set_string("formspec",
"size[8,9]"..
"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")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
@ -400,7 +401,8 @@ function realtest.register_tree(name, TreeDef)
meta:set_string("formspec",
"size[8,9]"..
"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")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
@ -436,7 +438,8 @@ function realtest.register_tree(name, TreeDef)
meta:set_string("formspec",
"size[8,9]"..
"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")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
@ -499,7 +502,8 @@ function realtest.register_tree(name, TreeDef)
"trees:locked_chest",
"size[8,9]"..
"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,
})

View File

@ -28,6 +28,7 @@ if not minetest.settings:get_bool("creative_mode") then
player:set_inventory_formspec("size[8,7.5]"
.."list[current_player;main;0,3.5;8,4;]"
.."list[current_player;craft;3,0.5;2,2;]"
.."listring[]"
.."image[5,1;1,1;workbench_craftarrow.png]"
.."list[current_player;craftpreview;6,1;1,1;]")
end)
@ -45,6 +46,7 @@ end
local CRAFTING_FORMSPEC = "size[9,9]"..
"list[current_player;main;0,5;8,4;]"..
"list[current_name;craft;2,1;3,3;]"..
"listring[]"..
"image[5,2;1,1;workbench_craftarrow.png]"..
"list[current_name;craftpreview;6,2;1,1;]"