diff options
Diffstat (limited to 'gamemode/inventorysystem/shapedinventory')
| -rw-r--r-- | gamemode/inventorysystem/shapedinventory/sh_shaped.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua index 66aa24b..69e18ca 100644 --- a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua +++ b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua @@ -11,7 +11,7 @@ if CLIENT then inv = nrequire("cl_shaped.lua") end inv.Name = "Shaped Inventory" inv.tracker = {} inv.width = 5 -inv.height = 5 +inv.height = 10 local function calcposition(width,height,row,col) return ((row-1) * width) + col @@ -32,6 +32,7 @@ local function canfitin(self,arow,acol,shape) end function inv:FindPlaceFor(item) + if item.Shape == nil then return nil end for row = 1, self.height do for col = 1, self.width do if canfitin(self,row,col,item.Shape) then @@ -43,6 +44,7 @@ function inv:FindPlaceFor(item) end function inv:CanFitIn(tbl,item) + if item.Shape == nil then return false end if canfitin(self,tbl[1],tbl[2],item.Shape) then return true else |
