Use `table.concat` for formspec generation
parent
c49f000894
commit
9cc63ed716
|
@ -1,4 +1,6 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
local F = minetest.formspec_escape
|
||||||
|
local C = minetest.colorize
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_hoppers", false)
|
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_hoppers", false)
|
||||||
local function mcl_log(message)
|
local function mcl_log(message)
|
||||||
|
@ -9,17 +11,19 @@ end
|
||||||
|
|
||||||
--[[ BEGIN OF NODE DEFINITIONS ]]
|
--[[ BEGIN OF NODE DEFINITIONS ]]
|
||||||
|
|
||||||
local mcl_hoppers_formspec = "size[9,7]" ..
|
local mcl_hoppers_formspec = table.concat({
|
||||||
"label[2,0;" .. minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))) .. "]" ..
|
"size[9,7]",
|
||||||
"list[context;main;2,0.5;5,1;]" ..
|
"label[2,0;" .. F(C("#313131", S("Hopper"))) .. "]",
|
||||||
mcl_formspec.get_itemslot_bg(2, 0.5, 5, 1) ..
|
"list[context;main;2,0.5;5,1;]",
|
||||||
"label[0,2;" .. minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))) .. "]" ..
|
mcl_formspec.get_itemslot_bg(2, 0.5, 5, 1),
|
||||||
"list[current_player;main;0,2.5;9,3;9]" ..
|
"label[0,2;" .. F(C("#313131", S("Inventory"))) .. "]",
|
||||||
mcl_formspec.get_itemslot_bg(0, 2.5, 9, 3) ..
|
"list[current_player;main;0,2.5;9,3;9]",
|
||||||
"list[current_player;main;0,5.74;9,1;]" ..
|
mcl_formspec.get_itemslot_bg(0, 2.5, 9, 3),
|
||||||
mcl_formspec.get_itemslot_bg(0, 5.74, 9, 1) ..
|
"list[current_player;main;0,5.74;9,1;]",
|
||||||
"listring[context;main]" ..
|
mcl_formspec.get_itemslot_bg(0, 5.74, 9, 1),
|
||||||
"listring[current_player;main]"
|
"listring[context;main]",
|
||||||
|
"listring[current_player;main]",
|
||||||
|
})
|
||||||
|
|
||||||
-- Downwards hopper (base definition)
|
-- Downwards hopper (base definition)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue