From 363f0332788e04e2e4bb63af5cd21fac5ae56ae5 Mon Sep 17 00:00:00 2001
From: ShadowNinja <noreply@gmail.com>
Date: Sun, 06 Oct 2013 18:42:41 +0200
Subject: [PATCH] Disable wind mill by default because it isn't ready yet

---
 technic/machines/switching_station.lua |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua
index 25310eb..843006f 100644
--- a/technic/machines/switching_station.lua
+++ b/technic/machines/switching_station.lua
@@ -30,6 +30,8 @@
 technic.DBG = 1
 local dprint = technic.dprint
 
+technic.networks = {}
+
 minetest.register_craft({
 	output = "technic:switching_station",
 	recipe = {
@@ -136,7 +138,7 @@
 end
 
 local get_network = function(pos1, tier)
-	local cached = technic.networks[pos1]
+	local cached = technic.networks[minetest.hash_node_position(pos1)]
 	if cached and cached.tier == tier then
 		touch_nodes(cached.PR_nodes, tier)
 		touch_nodes(cached.BA_nodes, tier)
@@ -153,7 +155,7 @@
 				i, technic.machines[tier], tier)
 		i = i + 1
 	until all_nodes[i] == nil
-	technic.networks[pos1] = {tier = tier, PR_nodes = PR_nodes, RE_nodes = RE_nodes, BA_nodes = BA_nodes}
+	technic.networks[minetest.hash_node_position(pos1)] = {tier = tier, PR_nodes = PR_nodes, RE_nodes = RE_nodes, BA_nodes = BA_nodes}
 	return PR_nodes, BA_nodes, RE_nodes
 end
 
@@ -184,7 +186,7 @@
 		local name = minetest.get_node(pos1).name
 		local tier = technic.get_cable_tier(name)
 		if tier then
-			PR_nodes, RE_nodes, BA_nodes = get_network(pos1, tier)
+			PR_nodes, BA_nodes, RE_nodes = get_network(pos1, tier)
 		else
 			--dprint("Not connected to a network")
 			meta:set_string("infotext", "Switching Station - no network")

--
Gitblit v1.8.0