diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-11-04 22:42:24 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-11-04 22:42:24 -0400 |
| commit | 5d77d8475af7aff27eb026a4b56065387c024165 (patch) | |
| tree | ccdd061e5654288ab53134be52e8b1ef194d5ebc /gamemode/inventorysystem/shapedinventory | |
| parent | 40080dcfde028c64c4f6f51792b928ee91677bc6 (diff) | |
| download | artery-5d77d8475af7aff27eb026a4b56065387c024165.tar.gz artery-5d77d8475af7aff27eb026a4b56065387c024165.tar.bz2 artery-5d77d8475af7aff27eb026a4b56065387c024165.zip | |
Massive changes
* New error messages for missing dependencies
* Removed useless art_serverchanger entity
* Added a sweet ascii logo
* Added Skills
* Minor fixes to cl_inventory tracker
* Changed a few prints to use logging module
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 |
