Fix supply converter
authorZefram <zefram@fysh.org>
Sun, 18 May 2014 18:53:43 +0000 (19:53 +0100)
committerRealBadAngel <maciej.kasatkin@o2.pl>
Fri, 23 May 2014 22:24:30 +0000 (00:24 +0200)
Its registration as a battery (BA) node didn't work.  It needs to be
registered as both a producer (PR) and a receiver (RE).

technic/machines/supply_converter.lua
technic/machines/switching_station.lua
technic/register.lua

index d94027b879eebfdb4c621cecb6b7adee15783627..4340f22d69ac02c0352562638ce2e78b827f6f67 100644 (file)
@@ -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
 
index a6c0c99cbbb538bcf306bbc8f238bff52abf596f..88d1890ea0d296d67e58cd70b945f99147365993 100644 (file)
@@ -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
index 09721ff007967a0e8dd3a77566601d4e0c8950de..6a237f950424975c6dca5b08383a69894f06269e 100644 (file)
@@ -3,6 +3,7 @@
 
 technic.receiver = "RE"
 technic.producer = "PR"
+technic.producer_receiver = "PR_RE"
 technic.battery  = "BA"
 
 technic.machines    = {}