summaryrefslogtreecommitdiff
path: root/technic/machines/supply_converter.lua
diff options
context:
space:
mode:
Diffstat (limited to 'technic/machines/supply_converter.lua')
-rw-r--r--technic/machines/supply_converter.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/technic/machines/supply_converter.lua b/technic/machines/supply_converter.lua
index 15c761d..a94b9e2 100644
--- a/technic/machines/supply_converter.lua
+++ b/technic/machines/supply_converter.lua
@@ -58,13 +58,18 @@ local mesecons = {
}
}
-local run = function(pos, node)
+local run = function(pos, node, run_stage)
+ -- run only in producer stage.
+ if run_stage == technic.receiver then
+ return
+ end
+
local remain = 0.9
-- Machine information
local machine_name = S("Supply Converter")
local meta = minetest.get_meta(pos)
local enabled = meta:get_int("enabled") ~= 0 and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0)
- local demand = enabled and meta:get_int("power") or 10000
+ local demand = enabled and meta:get_int("power") or 0
local pos_up = {x=pos.x, y=pos.y+1, z=pos.z}
local pos_down = {x=pos.x, y=pos.y-1, z=pos.z}