aboutsummaryrefslogtreecommitdiff
path: root/gamemode/inventorysystem
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-08-24 20:32:34 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-08-24 20:32:34 -0400
commit233e478e40d72a091f70f18dc6846066a4f52016 (patch)
treecf34be714088889731736c81bd44e198c792625a /gamemode/inventorysystem
parent61bc16dae5a1b61bcd237d9f0be36125829d95b1 (diff)
downloadartery-233e478e40d72a091f70f18dc6846066a4f52016.tar.gz
artery-233e478e40d72a091f70f18dc6846066a4f52016.tar.bz2
artery-233e478e40d72a091f70f18dc6846066a4f52016.zip
Fix all linter warnings
Diffstat (limited to 'gamemode/inventorysystem')
-rw-r--r--gamemode/inventorysystem/cl_common.lua4
-rw-r--r--gamemode/inventorysystem/equipment/cl_equipment.lua2
-rw-r--r--gamemode/inventorysystem/equipment/sh_equipment.lua4
-rw-r--r--gamemode/inventorysystem/shapedinventory/sh_shaped.lua2
4 files changed, 6 insertions, 6 deletions
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