Updated formspecs (hopefully)

This commit is contained in:
ThePython 2023-03-25 16:03:03 -07:00
parent 64695ca4a1
commit dd933c7e46
3 changed files with 77 additions and 23 deletions

View File

@ -1,17 +1,48 @@
function get_element_constructor_formspec()
local formspec = {
"size[8,9]",
"label[2,1;Orb]",
"list[context;fuel;2,2;1,1;]",
"label[3,1;Source]",
"list[context;src;3,2;1,1;]",
"label[5,1;Output]",
"list[context;dst;5,2;1,1;]",
"list[current_player;main;0,5;8,4;]",
}
return table.concat(formspec, "")
if not exchangeclone.mineclone then
local formspec = {
"size[8,9]",
"label[2,1;Orb]",
"list[context;fuel;2,2;1,1;]",
"label[3,1;Source]",
"list[context;src;3,2;1,1;]",
"label[5,1;Output]",
"list[context;dst;5,2;1,1;]",
"list[current_player;main;0,5;8,4;]",
"listring[context;fuel]",
"listring[current_player;main]",
"listring[context;src]",
"listring[current_player;main]",
"listring[context;dst]",
"listring[current_player;main]"
}
return table.concat(formspec, "")
else
local formspec = {
"size[9,9]",
"label[2,1;Orb]",
"list[context;fuel;2,2;1,1;]",
mcl_formspec.get_itemslot_bg(2,2,1,1),
"label[3,1;Source]",
"list[context;src;3,2;1,1;]",
mcl_formspec.get_itemslot_bg(3,2,1,1),
"label[5,1;Output]",
"list[context;dst;5,2;1,1;]",
mcl_formspec.get_itemslot_bg(5,2,1,1),
"list[current_player;main;0,5;9,3;9]",
mcl_formspec.get_itemslot_bg(0,5,9,3),
"list[current_player;main;0,6;9,1;]",
mcl_formspec.get_itemslot_bg(0,6,9,1),
"listring[context;fuel]",
"listring[current_player;main]",
"listring[context;src]",
"listring[current_player;main]",
"listring[context;dst]",
"listring[current_player;main]"
}
end
end
local function can_dig(pos, player)

View File

@ -1,5 +1,4 @@
function get_element_deconstructor_formspec()
minetest.log(tostring(exchangeclone.mineclone))
if not exchangeclone.mineclone then
local formspec = {
"size[8,9]",
@ -8,22 +7,29 @@ function get_element_deconstructor_formspec()
"label[5,1;Orb]",
"list[context;dst;5,2;1,1;]",
"list[current_player;main;0,5;8,4;]",
"listring[context;fuel]",
"listring[current_player;main]",
"listring[context;dst]",
"listring[current_player;main]"
}
return table.concat(formspec, "")
else
local formspec = {
"size[10,10]",
"size[9,9]",
"label[2,1;Fuel]",
"list[context;fuel;2,2;1,1;]",
mcl_formspec.get_itemslot_bg(2,2,1,1),
"label[5,1;Orb]",
"list[context;dst;5,2;1,1;]",
mcl_formspec.get_itemslot_bg(5,2,1,1),
"list[current_player;main;0,5;9,4;]",
mcl_formspec.get_itemslot_bg(0,5,9,4),
"list[current_player;main;0,5;9,3;9]",
mcl_formspec.get_itemslot_bg(0,5,9,3),
"list[current_player;main;0,6;9,1;]",
mcl_formspec.get_itemslot_bg(0,6,9,1),
"listring[context;fuel]",
"listring[current_player;main]",
"listring[context;dst]"
"listring[context;dst]",
"listring[current_player;main]"
}
return table.concat(formspec, "")
end

View File

@ -1,11 +1,28 @@
function get_energy_collector_formspec()
local formspec = {
"size[8,9]",
"label[3,2;Orb]",
"list[context;dst;4,2;1,1;]",
"list[current_player;main;0,5;8,4;]",
}
return table.concat(formspec, "")
if not exchangeclone.mineclone then
local formspec = {
"size[8,9]",
"label[3,2;Orb]",
"list[context;dst;4,2;1,1;]",
"list[current_player;main;0,5;8,4;]",
"listring[current_player;main]",
"listring[context;dst]"
}
return table.concat(formspec, "")
else
local formspec = {
"size[8,9]",
"label[3,2;Orb]",
"list[context;dist;4,2;1,1;]",
mcl_formspec.get_itemslot_bg(4,2,1,1),
"list[current_player;main;0,5;9,3;9]",
mcl_formspec.get_itemslot_bg(0,5,9,3),
"list[current_player;main;0,6;9,1;]",
mcl_formspec.get_itemslot_bg(0,6,9,1),
"listring[current_player;main]",
"listring[context;dst]"
}
end
end
local function can_dig(pos, player)