digibuilder/formspec.lua

28 lines
704 B
Lua
Raw Normal View History

2020-06-14 20:14:52 +02:00
function digibuilder.update_formspec(meta)
2020-06-14 20:54:31 +02:00
local message = meta:get_string("message")
2020-06-14 20:14:52 +02:00
local formspec =
2020-06-14 20:54:31 +02:00
"size[8,9.2;]" ..
2020-06-14 20:14:52 +02:00
-- main inventory
2020-06-14 20:54:31 +02:00
"list[context;main;0,0.25;8,4;]" ..
2020-06-14 20:14:52 +02:00
-- player inventory
"list[current_player;main;0,4.5;8,4;]" ..
2020-06-14 20:54:31 +02:00
-- message
"label[0,8.7;" .. message .. "]" ..
2020-06-14 20:14:52 +02:00
-- digiline channel
"field[4.3,9;3.2,1;digiline_channel;Digiline channel;" .. (meta:get_string("channel") or "") .. "]" ..
"button_exit[7,8.7;1,1;set_digiline_channel;Set]" ..
-- listring stuff
"listring[context;main]" ..
"listring[current_player;main]"
meta:set_string("formspec", formspec)
2020-06-14 20:54:31 +02:00
meta:set_string("infotext", "Digibuilder: " .. message)
2020-06-14 20:14:52 +02:00
end