diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-25 15:03:30 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-25 15:03:30 -0400 |
| commit | 984b841c008ba29ead9ecb12aa86a57de2b0597a (patch) | |
| tree | 079aa2cacacc2bb515788a40c94308b19fbeac08 /gamemode/inventorysystem/shapedinventory | |
| parent | 233e478e40d72a091f70f18dc6846066a4f52016 (diff) | |
| download | artery-984b841c008ba29ead9ecb12aa86a57de2b0597a.tar.gz artery-984b841c008ba29ead9ecb12aa86a57de2b0597a.tar.bz2 artery-984b841c008ba29ead9ecb12aa86a57de2b0597a.zip | |
Fixed some bugs
* Huntables now drop items correctly
* Shop npcs work
* Fixed a bug in shaped inventory
Diffstat (limited to 'gamemode/inventorysystem/shapedinventory')
| -rw-r--r-- | gamemode/inventorysystem/shapedinventory/sh_shaped.lua | 3 |
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 |
