2018-06-19 11:32:28 +02:00
|
|
|
|
|
|
|
elefarm.formspec = {}
|
|
|
|
|
|
|
|
local function bar(x,y,metric)
|
|
|
|
return "image["..x..","..y..";0.25,2.8;elepower_gui_barbg.png"..
|
|
|
|
"^[lowpart:"..metric..":elefarming_gui_bar.png]"
|
|
|
|
end
|
|
|
|
|
|
|
|
function elefarm.formspec.planter_formspec(timer, power)
|
|
|
|
return "size[8,10]"..
|
|
|
|
default.gui_bg..
|
|
|
|
default.gui_bg_img..
|
|
|
|
default.gui_slots..
|
|
|
|
ele.formspec.power_meter(power)..
|
|
|
|
bar(1, 0, 100-timer)..
|
|
|
|
"list[context;layout;2.5,0;3,3;]"..
|
|
|
|
"list[context;src;0,3.5;8,2;]"..
|
|
|
|
"list[current_player;main;0,5.75;8,1;]"..
|
|
|
|
"list[current_player;main;0,7;8,3;8]"..
|
|
|
|
"listring[current_player;main]"..
|
|
|
|
"listring[context;src]"..
|
|
|
|
"listring[current_player;main]"..
|
|
|
|
default.get_hotbar_bg(0, 5.75)
|
|
|
|
end
|
|
|
|
|
2018-06-21 10:09:01 +02:00
|
|
|
function elefarm.formspec.harvester_formspec(timer, power, sludge)
|
2018-06-19 14:48:57 +02:00
|
|
|
return "size[8,8.5]"..
|
|
|
|
default.gui_bg..
|
|
|
|
default.gui_bg_img..
|
|
|
|
default.gui_slots..
|
|
|
|
ele.formspec.power_meter(power)..
|
2018-06-21 10:09:01 +02:00
|
|
|
ele.formspec.fluid_bar(7, 0, sludge)..
|
2018-06-19 14:48:57 +02:00
|
|
|
bar(1, 0, 100-timer)..
|
2018-06-21 10:09:01 +02:00
|
|
|
"list[context;dst;1.5,0;5,3;]"..
|
2018-06-19 14:48:57 +02:00
|
|
|
"list[current_player;main;0,4.25;8,1;]"..
|
|
|
|
"list[current_player;main;0,5.5;8,3;8]"..
|
|
|
|
"listring[context;dst]"..
|
|
|
|
"listring[current_player;main]"..
|
|
|
|
default.get_hotbar_bg(0, 4.25)
|
|
|
|
end
|
2018-06-20 13:53:07 +02:00
|
|
|
|
|
|
|
function elefarm.formspec.tree_processor(timer, power, fluid_buffer, water_buffer, output_buffer)
|
|
|
|
return "size[8,8.5]"..
|
|
|
|
default.gui_bg..
|
|
|
|
default.gui_bg_img..
|
|
|
|
default.gui_slots..
|
|
|
|
ele.formspec.power_meter(power)..
|
|
|
|
bar(1, 0, 100-timer)..
|
|
|
|
ele.formspec.fluid_bar(2, 0, fluid_buffer)..
|
|
|
|
ele.formspec.fluid_bar(3, 0, water_buffer)..
|
|
|
|
ele.formspec.fluid_bar(7, 0, output_buffer)..
|
|
|
|
"list[context;dst;5,1;1,1;]"..
|
|
|
|
"list[current_player;main;0,4.25;8,1;]"..
|
|
|
|
"list[current_player;main;0,5.5;8,3;8]"..
|
|
|
|
"listring[context;dst]"..
|
|
|
|
"listring[current_player;main]"..
|
|
|
|
default.get_hotbar_bg(0, 4.25)
|
|
|
|
end
|