aboutsummaryrefslogtreecommitdiff
path: root/gamemode
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode')
-rw-r--r--gamemode/client/qtabs/cl_qinventory.lua1
-rw-r--r--gamemode/core/inventory/item.lua1
-rw-r--r--gamemode/inventorysystem/shapedinventory/cl_shaped.lua2
3 files changed, 4 insertions, 0 deletions
diff --git a/gamemode/client/qtabs/cl_qinventory.lua b/gamemode/client/qtabs/cl_qinventory.lua
index 9f2eebe..1e1ceb3 100644
--- a/gamemode/client/qtabs/cl_qinventory.lua
+++ b/gamemode/client/qtabs/cl_qinventory.lua
@@ -60,6 +60,7 @@ local drawsheeton = function(id,inventory)
end
net.Receive("art_ObserveInventory",function()
+ print("Got call to observe inventory")
local id = net.ReadUInt(32)
local inv_type = net.ReadString()
--print("Got inv type", inv_type,"id",id)
diff --git a/gamemode/core/inventory/item.lua b/gamemode/core/inventory/item.lua
index a13efa9..a598fc2 100644
--- a/gamemode/core/inventory/item.lua
+++ b/gamemode/core/inventory/item.lua
@@ -39,6 +39,7 @@ function itm.RegisterItem(tbl)
end
function itm.GetItemByName(name)
+ assert(type(name) == "string",string.format("Attempted to get an item by name with a %s."))
assert(items[name] ~= nil,string.format("Attempted to get item with invalid name %q Valid item names are:\n\t%s",name,table.concat(table.GetKeys(items),"\n\t")))
local item
if items[name].init then
diff --git a/gamemode/inventorysystem/shapedinventory/cl_shaped.lua b/gamemode/inventorysystem/shapedinventory/cl_shaped.lua
index 746a37a..dde523f 100644
--- a/gamemode/inventorysystem/shapedinventory/cl_shaped.lua
+++ b/gamemode/inventorysystem/shapedinventory/cl_shaped.lua
@@ -139,9 +139,11 @@ inv.DrawOnDPanel = function(self,panel)
local observer = {}
observer.Put = function(obs,position,item)
+ print("observer's put was called")
drawitemat(self,position[1],position[2],item)
end
observer.Remove = function(obs,position)
+ print("observer's remove was called")
undrawitemat(self,position[1],position[2])
end
return observer