Add register_cable_tier API function (#612)

This commit is contained in:
sfence
2022-11-04 19:23:44 +01:00
committed by GitHub
parent 705961e2fe
commit 66e20a9231
2 changed files with 11 additions and 0 deletions

View File

@ -11,6 +11,13 @@ function technic.get_cable_tier(name)
return cable_tier[name]
end
function technic.register_cable_tier(name, tier)
assert(technic.machines[tier], "Tier does not exist")
assert(type(name) == "string", "Invalid node name")
cable_tier[name] = tier
end
local function check_connections(pos)
-- Build a table of all machines
local machines = {}