elepower/elepower_farming/formspec.lua

26 lines
679 B
Lua
Raw Normal View History

2018-06-19 09:32:28 +00: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