aboutsummaryrefslogtreecommitdiff
path: root/gamemode
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2018-03-05 21:10:55 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2018-03-05 21:10:55 -0500
commit83843182094d0d99ef7e81b26739051c2d7ff143 (patch)
tree265da28ded2c7eb6bb8cb8e149ce1e6fb4723444 /gamemode
parent16a9a0d58783d50ed3815821b29964ae1b8cd06b (diff)
downloadartery-83843182094d0d99ef7e81b26739051c2d7ff143.tar.gz
artery-83843182094d0d99ef7e81b26739051c2d7ff143.tar.bz2
artery-83843182094d0d99ef7e81b26739051c2d7ff143.zip
Fix a bug in shaped inventory
Fixed a bug where loading an item in a shaped inventory would be in the wrong graphical slot if not on the diagonal. Caused errors
Diffstat (limited to 'gamemode')
-rw-r--r--gamemode/inventorysystem/shapedinventory/cl_shaped.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/gamemode/inventorysystem/shapedinventory/cl_shaped.lua b/gamemode/inventorysystem/shapedinventory/cl_shaped.lua
index d74b629..7c60156 100644
--- a/gamemode/inventorysystem/shapedinventory/cl_shaped.lua
+++ b/gamemode/inventorysystem/shapedinventory/cl_shaped.lua
@@ -129,9 +129,9 @@ inv.DrawOnDPanel = function(self,panel)
--Go through the items, and set the dpanels appropriately.
for k,v in pairs(self.tracker) do
if type(v) == "table" then
- local px = k % self.width
- local py = math.ceil(k / self.height)
- drawitemat(self,px,py,v)
+ local column = k % self.width
+ local row = math.ceil(k / self.height)
+ drawitemat(self,row,column,v)
end
end