From 984b841c008ba29ead9ecb12aa86a57de2b0597a Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Fri, 25 Aug 2017 15:03:30 -0400 Subject: Fixed some bugs * Huntables now drop items correctly * Shop npcs work * Fixed a bug in shaped inventory --- gamemode/inventorysystem/shapedinventory/sh_shaped.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gamemode/inventorysystem') 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 -- cgit v1.2.3-70-g09d2