From 50e69217bd62b5f73871d3d75f550afad5ea8601 Mon Sep 17 00:00:00 2001 From: OgelGames Date: Sat, 31 Oct 2020 16:39:27 +1100 Subject: [PATCH] remove more excluded files from luacheck --- .luacheckrc | 5 ----- technic/machines/register/cables.lua | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index c58aca8..e61836f 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -33,11 +33,6 @@ read_globals = { "monitoring", "drawers" } --- Remove after network update -files["technic/machines/register/cables.lua"].ignore = { "name", "from_below", "p" } -files["technic/machines/switching_station.lua"].ignore = { "pos1", "tier", "poshash" } -files["technic/machines/switching_station.lua"].max_line_length = false - -- Remove after chests update files["technic_chests/register.lua"].ignore = { "fs_helpers", "name", "locked_after_place" } files["technic_chests/register.lua"].max_line_length = false diff --git a/technic/machines/register/cables.lua b/technic/machines/register/cables.lua index 05cb68a..f01630f 100644 --- a/technic/machines/register/cables.lua +++ b/technic/machines/register/cables.lua @@ -282,8 +282,8 @@ function technic.register_cable(tier, size, description, prefix, override_cable, fine_pointed = vector.subtract(fine_pointed, pointed_thing.above) fine_pointed[changed] = nil local ps = {} - for p, _ in pairs(fine_pointed) do - ps[#ps+1] = p + for p2, _ in pairs(fine_pointed) do + ps[#ps+1] = p2 end local bigger = (math.abs(fine_pointed[ps[1]]) > math.abs(fine_pointed[ps[2]]) and ps[1]) or ps[2] if math.abs(fine_pointed[bigger]) < 0.3 then