From d1f9449b8412c1cd47bb0d01373c1bee24ae3f18 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Mon, 17 Dec 2018 18:18:18 +0200 Subject: [PATCH] fixes --- elepower_machines/machines/bases/fluid_generator.lua | 1 - elepower_machines/machines/pump.lua | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/elepower_machines/machines/bases/fluid_generator.lua b/elepower_machines/machines/bases/fluid_generator.lua index 4816a6c..108a713 100644 --- a/elepower_machines/machines/bases/fluid_generator.lua +++ b/elepower_machines/machines/bases/fluid_generator.lua @@ -44,7 +44,6 @@ function ele.register_fluid_generator(nodename, nodedef) on_timer = function (pos, elapsed) local refresh = false local meta = minetest.get_meta(pos) - local nodename = minetest.get_node(pos).name local burn_time = meta:get_int("burn_time") local burn_totaltime = meta:get_int("burn_totaltime") diff --git a/elepower_machines/machines/pump.lua b/elepower_machines/machines/pump.lua index 1a39e37..19eed09 100644 --- a/elepower_machines/machines/pump.lua +++ b/elepower_machines/machines/pump.lua @@ -91,7 +91,7 @@ local function timer(pos, elapsed) if fl_buffer.fluid == "" then local node = minetest.get_node_or_nil(ppos) - if not node or node.name == "air" then + if not node or node.name == "air" or (bucket.liquids[node.name] and bucket.liquids[node.name].flowing == node.name) then plevel = plevel - 1 status = "Seeking" refresh = true @@ -102,7 +102,7 @@ local function timer(pos, elapsed) end -- Valid liquid, proceed pumping - if bucket.liquids[node.name] then + if bucket.liquids[node.name] and bucket.liquids[node.name].source == node.name then fl_buffer.fluid = node.name refresh = true else