summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-03-09 06:17:11 +0100
committerest31 <MTest31@outlook.com>2015-03-22 19:35:50 +0100
commit6b800758fb1088465fab5c966caf1fe2df19d748 (patch)
treea940f13ae9f8f70a93190567d22b4d21d2333e6a
parent137695ea67cf7096311c893de7cf139e6307b26b (diff)
Rename technic.cables and make it private
Give it a more descriptive name. Previous use outside cables.lua isn't neccessary and gets removed.
-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)