summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--technic/machines/register/cables.lua8
-rw-r--r--technic/register.lua3
2 files changed, 5 insertions, 6 deletions
diff --git a/technic/machines/register/cables.lua b/technic/machines/register/cables.lua
index 7abdfcb..a1e7bc8 100644
--- a/technic/machines/register/cables.lua
+++ b/technic/machines/register/cables.lua
@@ -1,7 +1,7 @@
local S = technic.getter
-technic.cables = {}
+local cable_itstr_to_tier = {}
function technic.register_cable(tier, size)
local ltier = string.lower(tier)
@@ -14,7 +14,7 @@ function technic.register_cable(tier, size)
for z2 = 0, 1 do
local id = technic.get_cable_id({x1, x2, y1, y2, z1, z2})
- technic.cables["technic:"..ltier.."_cable"..id] = tier
+ cable_itstr_to_tier["technic:"..ltier.."_cable"..id] = tier
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2}
if id ~= 0 then
@@ -118,12 +118,12 @@ end
function technic.is_tier_cable(name, tier)
- return technic.cables[name] and technic.cables[name] == tier
+ return cable_itstr_to_tier[name] and cable_itstr_to_tier[name] == tier
end
function technic.get_cable_tier(name)
- return technic.cables[name]
+ return cable_itstr_to_tier[name]
end
diff --git a/technic/register.lua b/technic/register.lua
index 6a237f9..8f75b81 100644
--- a/technic/register.lua
+++ b/technic/register.lua
@@ -12,8 +12,7 @@ technic.networks = {}
function technic.register_tier(tier, description)
- technic.machines[tier] = {}
- technic.cables[tier] = {}
+ technic.machines[tier] = {}
end
function technic.register_machine(tier, nodename, machine_type)