From b9c323a705caa324cebfea994cf7b69294f9eebe Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 6 Nov 2017 21:13:46 -0500 Subject: Several additions * Minor bugfix / feature addition for dropped entities * Major bugfix for inventories * Adjusted logo * ADded some more skills * Stoped bundeling bobbleheadbob's zones api --- gamemode/core/inventory/inventory.lua | 4 ++-- gamemode/core/inventory/sv_invtracker.lua | 4 +++- gamemode/inventorysystem/shapedinventory/sh_shaped.lua | 2 ++ gamemode/inventorysystem/skills/sh_skillcommon.lua | 2 +- gamemode/zones.lua | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) (limited to 'gamemode') diff --git a/gamemode/core/inventory/inventory.lua b/gamemode/core/inventory/inventory.lua index c9bf6da..4624819 100644 --- a/gamemode/core/inventory/inventory.lua +++ b/gamemode/core/inventory/inventory.lua @@ -90,13 +90,13 @@ local function SetDefaultObservers(tbl) --PrintTable(v) v:Put(position,item) end - oldput(self,position,item) + return oldput(self,position,item) end tbl.Remove = function(self,position) for k,v in pairs(self.observers) do v:Remove(position) end - oldremove(self,position) + return oldremove(self,position) end end diff --git a/gamemode/core/inventory/sv_invtracker.lua b/gamemode/core/inventory/sv_invtracker.lua index f1f3c3d..310af0f 100644 --- a/gamemode/core/inventory/sv_invtracker.lua +++ b/gamemode/core/inventory/sv_invtracker.lua @@ -217,7 +217,9 @@ function plymeta:RemoveItem(tbl) local pos = tbl[2] print("Self inventory was") PrintTable(self.data.inventories[nid]) - self.data.inventories[nid]:Remove(pos) + local item = self.data.inventories[nid]:Remove(pos) + print("sv_invtracker's item was", item) + return item end function plymeta:GiveItem(tbl) diff --git a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua index 1b53d43..e9b2e91 100644 --- a/gamemode/inventorysystem/shapedinventory/sh_shaped.lua +++ b/gamemode/inventorysystem/shapedinventory/sh_shaped.lua @@ -104,6 +104,8 @@ function inv:Remove(tbl) end end end + print("shaped is returning",item) + return item end function inv:Get(tbl) diff --git a/gamemode/inventorysystem/skills/sh_skillcommon.lua b/gamemode/inventorysystem/skills/sh_skillcommon.lua index d48fb98..fd05eaa 100644 --- a/gamemode/inventorysystem/skills/sh_skillcommon.lua +++ b/gamemode/inventorysystem/skills/sh_skillcommon.lua @@ -2,7 +2,7 @@ Common functions since skills are a special inventory, adding skills need to be a special item ]] local itm = nrequire("item.lua") - +local log = nrequire("log.lua") --Common things --Make sure items have a "name" and "ammt" attribute local item = {} diff --git a/gamemode/zones.lua b/gamemode/zones.lua index f95d6f2..5d6d781 100644 --- a/gamemode/zones.lua +++ b/gamemode/zones.lua @@ -1,3 +1,4 @@ +do return end local version = 1.20 -- Older versions will not run if a newer version is used in another script. --[[ ZONES - by Bobbleheadbob with help from Zeh Matt @@ -608,4 +609,4 @@ function zones.PointInPoly(point,poly) //True if point is within a polygon. end return inside -end \ No newline at end of file +end -- cgit v1.2.3-70-g09d2