From 5d77d8475af7aff27eb026a4b56065387c024165 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 4 Nov 2017 22:42:24 -0400 Subject: 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 --- gamemode/inventorysystem/shapedinventory/sh_shaped.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gamemode/inventorysystem/shapedinventory/sh_shaped.lua') 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 -- cgit v1.2.3-70-g09d2