aboutsummaryrefslogtreecommitdiff
path: root/gamemode/inventorysystem
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/inventorysystem')
-rw-r--r--gamemode/inventorysystem/shapedinventory/sh_shaped.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua
index 76d322d..66aa24b 100644
--- a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua
+++ b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua
@@ -79,8 +79,9 @@ function inv:Has(ptr)
end
for k,v in pairs(self.tracker) do
if type(v) == "table" and compare_func(v) then
+ print("Found item in spot:",k)
local row = math.ceil(k / self.width)
- local col = k % self.width
+ local col = ((k - 1) % self.width) + 1
print("Has is retuning",row,col)
return {row,col}
end