diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-15 19:06:40 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-15 19:06:40 -0400 |
commit | 0d97fe1a8c344ab2060200fd3b2e3f4731b0a486 (patch) | |
tree | 7b918c6ecf6f4067090670ef3af2dc02d3671cb7 | |
parent | 9b99c1ebdd19041f3b6998462fe243087bb15a2d (diff) | |
download | dreambuilder_modpack-0d97fe1a8c344ab2060200fd3b2e3f4731b0a486.tar dreambuilder_modpack-0d97fe1a8c344ab2060200fd3b2e3f4731b0a486.tar.gz dreambuilder_modpack-0d97fe1a8c344ab2060200fd3b2e3f4731b0a486.tar.bz2 dreambuilder_modpack-0d97fe1a8c344ab2060200fd3b2e3f4731b0a486.tar.xz dreambuilder_modpack-0d97fe1a8c344ab2060200fd3b2e3f4731b0a486.zip |
update technic
-rw-r--r-- | technic/machines/supply_converter.lua | 9 | ||||
-rw-r--r-- | technic/machines/switching_station.lua | 10 |
2 files changed, 12 insertions, 7 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} diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua index f925817..8ace874 100644 --- a/technic/machines/switching_station.lua +++ b/technic/machines/switching_station.lua @@ -218,7 +218,7 @@ minetest.register_abm({ end -- Run all the nodes - local function run_nodes(list) + local function run_nodes(list, run_stage) for _, pos2 in ipairs(list) do technic.get_or_load_node(pos2) local node2 = minetest.get_node(pos2) @@ -227,14 +227,14 @@ minetest.register_abm({ nodedef = minetest.registered_nodes[node2.name] end if nodedef and nodedef.technic_run then - nodedef.technic_run(pos2, node2) + nodedef.technic_run(pos2, node2, run_stage) end end end - run_nodes(PR_nodes) - run_nodes(RE_nodes) - run_nodes(BA_nodes) + run_nodes(PR_nodes, technic.producer) + run_nodes(RE_nodes, technic.receiver) + run_nodes(BA_nodes, technic.battery) -- Strings for the meta data local eu_demand_str = tier.."_EU_demand" |