summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2014-05-18 19:53:43 +0100
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-05-24 00:24:30 +0200
commit623fcae4a4ad3ec12cc242b29b0d781357cff3f7 (patch)
treeaa2e2d9823a3a179079d660b643fa3aee3c392ee
parent29429f636eea272aaddc13be54b9fd41f1b0c8e9 (diff)
Fix supply converter
Its registration as a battery (BA) node didn't work. It needs to be registered as both a producer (PR) and a receiver (RE).
-rw-r--r--technic/machines/supply_converter.lua2
-rw-r--r--technic/machines/switching_station.lua3
-rw-r--r--technic/register.lua1
3 files changed, 5 insertions, 1 deletions
diff --git a/technic/machines/supply_converter.lua b/technic/machines/supply_converter.lua
index d94027b..4340f22 100644
--- a/technic/machines/supply_converter.lua
+++ b/technic/machines/supply_converter.lua
@@ -76,6 +76,6 @@ minetest.register_abm({
})
for tier, machines in pairs(technic.machines) do
- technic.register_machine(tier, "technic:supply_converter", technic.battery)
+ technic.register_machine(tier, "technic:supply_converter", technic.producer_receiver)
end
diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua
index a6c0c99..88d1890 100644
--- a/technic/machines/switching_station.lua
+++ b/technic/machines/switching_station.lua
@@ -106,6 +106,9 @@ local check_node_subp = function(PR_nodes, RE_nodes, BA_nodes, all_nodes, pos, m
add_new_cable_node(PR_nodes, pos)
elseif machines[name] == technic.receiver then
add_new_cable_node(RE_nodes, pos)
+ elseif machines[name] == technic.producer_receiver then
+ add_new_cable_node(PR_nodes, pos)
+ add_new_cable_node(RE_nodes, pos)
elseif machines[name] == technic.battery then
add_new_cable_node(BA_nodes, pos)
end
diff --git a/technic/register.lua b/technic/register.lua
index 09721ff..6a237f9 100644
--- a/technic/register.lua
+++ b/technic/register.lua
@@ -3,6 +3,7 @@
technic.receiver = "RE"
technic.producer = "PR"
+technic.producer_receiver = "PR_RE"
technic.battery = "BA"
technic.machines = {}