From 0f6bdb1bde5f476b8e4500cba559f813cd5276a1 Mon Sep 17 00:00:00 2001
From: SmallJoker <mk939@ymail.com>
Date: Mon, 06 Jun 2022 21:04:13 +0200
Subject: [PATCH] Correct (almost) all luacheck warnings

---
 technic/machines/other/frames.lua |   24 +++++-------------------
 1 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/technic/machines/other/frames.lua b/technic/machines/other/frames.lua
index e65902c..c116187 100644
--- a/technic/machines/other/frames.lua
+++ b/technic/machines/other/frames.lua
@@ -88,22 +88,22 @@
 	return false
 end
 
-local function table_empty(table)
-	for _, __ in pairs(table) do
+local function table_empty(what)
+	for _ in pairs(what) do
 		return false
 	end
 	return true
 end
 
-local function add_table(table, toadd)
+local function add_table(what, toadd)
 	local i = 1
 	while true do
-		local o = table[i]
+		local o = what[i]
 		if o == toadd then return end
 		if o == nil then break end
 		i = i + 1
 	end
-	table[i] = toadd
+	what[i] = toadd
 end
 
 local function move_nodes_vect(poslist, vect, must_not_move, owner)
@@ -398,20 +398,6 @@
 		local pos = vector.round(self.object:getpos())
 		frames_pos[pos_to_string(pos)] = node.name
 
-		local stack = ItemStack(node.name)
-		local itemtable = stack:to_table()
-		local itemname = nil
-
-		if itemtable then
-			itemname = stack:to_table().name
-		end
-
-		local item_texture = nil
-		local item_type = ""
-		if minetest.registered_items[itemname] then
-			item_texture = minetest.registered_items[itemname].inventory_image
-			item_type = minetest.registered_items[itemname].type
-		end
 		local prop = {
 			is_visible = true,
 			textures = { node.name },

--
Gitblit v1.8.0