From 233e478e40d72a091f70f18dc6846066a4f52016 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 24 Aug 2017 20:32:34 -0400 Subject: Fix all linter warnings --- gamemode/inventorysystem/cl_common.lua | 4 ++-- gamemode/inventorysystem/equipment/cl_equipment.lua | 2 +- gamemode/inventorysystem/equipment/sh_equipment.lua | 4 ++-- gamemode/inventorysystem/shapedinventory/sh_shaped.lua | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'gamemode/inventorysystem') diff --git a/gamemode/inventorysystem/cl_common.lua b/gamemode/inventorysystem/cl_common.lua index 361cf3c..505c5d9 100644 --- a/gamemode/inventorysystem/cl_common.lua +++ b/gamemode/inventorysystem/cl_common.lua @@ -42,7 +42,7 @@ function com.generatereceiver() PrintTable(self.info.pos) print("frominv",frominv) print("toinv",toinv) - + --Do nothing if we don't actually want to move anything anywhere local posequal = true if (froment ~= toent) or (fromid ~= toid) or (frominv ~= toinv) then posequal = false end @@ -55,7 +55,7 @@ function com.generatereceiver() end end if posequal then return end - + local item = frominv:Get(frompos) print("item was", item) --Fake remove the item, in case the position we want to move it to overlaps with where it is now. diff --git a/gamemode/inventorysystem/equipment/cl_equipment.lua b/gamemode/inventorysystem/equipment/cl_equipment.lua index ca03bf6..8d06594 100644 --- a/gamemode/inventorysystem/equipment/cl_equipment.lua +++ b/gamemode/inventorysystem/equipment/cl_equipment.lua @@ -147,7 +147,7 @@ inv.DrawOnDPanel = function(self,panel) end prox[k] = pn end - + prox.Put = function(self,position,item) assert(self[position[1]] ~= nil, "Tried to put an item into an unknown slot! Slot:" .. position[1]) if item.GetOptions then diff --git a/gamemode/inventorysystem/equipment/sh_equipment.lua b/gamemode/inventorysystem/equipment/sh_equipment.lua index 7095363..5bea682 100644 --- a/gamemode/inventorysystem/equipment/sh_equipment.lua +++ b/gamemode/inventorysystem/equipment/sh_equipment.lua @@ -2,9 +2,9 @@ A simple inventory that holds 1 item ]] local itm = nrequire("item.lua") -local ste = nrequire("utility/stream.lua") +--local ste = nrequire("utility/stream.lua") local inventory = nrequire("inventory/inventory.lua") -local col = nrequire("config/colortheme.lua") +--local col = nrequire("config/colortheme.lua") local slots = { "Head", "Shoulders", diff --git a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua index bb35d2d..76d322d 100644 --- a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua +++ b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua @@ -114,7 +114,7 @@ function inv:Serialize() for k,v in pairs(self.tracker) do if type(v) == "table" then local row = math.ceil(k / self.width) - local col = (k % self.width) + local col = k % self.width ret[v.Name] = {{row,col},v:Serialize()} end end -- cgit v1.2.3-70-g09d2