diff --git a/elepower_machines/machines/pcb_plant.lua b/elepower_machines/machines/pcb_plant.lua index 2702fb9..de78149 100644 --- a/elepower_machines/machines/pcb_plant.lua +++ b/elepower_machines/machines/pcb_plant.lua @@ -6,6 +6,10 @@ local function get_formspec(power, input, state, active, percent) t = "image[3.5,1.75;1,1;elepower_uv_bulb_lit.png]" end + if not percent then + percent = 0 + end + return "size[8,8.5]".. default.gui_bg.. default.gui_bg_img.. diff --git a/elepower_machines/machines/pump.lua b/elepower_machines/machines/pump.lua index cfb5ce9..6fca8d4 100644 --- a/elepower_machines/machines/pump.lua +++ b/elepower_machines/machines/pump.lua @@ -2,6 +2,7 @@ local c_air = minetest.get_content_id("air") local function get_formspec(power, fluid, state, level) + if not level then level = 0 end return "size[8,8.5]".. default.gui_bg.. default.gui_bg_img.. @@ -232,7 +233,7 @@ ele.register_machine("elepower_machines:pump", { on_timer = timer, on_construct = function (pos) local meta = minetest.get_meta(pos) - meta:set_string("formspec", nil, nil, 0, -1) + meta:set_string("formspec", get_formspec(nil, nil, 0, -1)) end, -- Upgradable ele_upgrades = { diff --git a/screenshot.png b/screenshot.png index 0ad7963..adbe497 100644 Binary files a/screenshot.png and b/screenshot.png differ