aboutsummaryrefslogtreecommitdiff
path: root/gamemode/client/qtabs/cl_qinventory.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-05-20 11:37:23 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-05-20 11:37:23 -0400
commitc6698dad925e75ffd2ca2f2e30a595d4ce48d240 (patch)
tree226338dc7ee26a6316951554cf953112ba072c76 /gamemode/client/qtabs/cl_qinventory.lua
parent9e0537b0aa417e88a6a61238484ddcef74080ae0 (diff)
downloadartery-c6698dad925e75ffd2ca2f2e30a595d4ce48d240.tar.gz
artery-c6698dad925e75ffd2ca2f2e30a595d4ce48d240.tar.bz2
artery-c6698dad925e75ffd2ca2f2e30a595d4ce48d240.zip
Massive changes I guess
Diffstat (limited to 'gamemode/client/qtabs/cl_qinventory.lua')
-rw-r--r--gamemode/client/qtabs/cl_qinventory.lua40
1 files changed, 20 insertions, 20 deletions
diff --git a/gamemode/client/qtabs/cl_qinventory.lua b/gamemode/client/qtabs/cl_qinventory.lua
index e4dfaa8..6fc3d37 100644
--- a/gamemode/client/qtabs/cl_qinventory.lua
+++ b/gamemode/client/qtabs/cl_qinventory.lua
@@ -12,7 +12,7 @@ local inventory_frames = {}
local invsheet
local drawfloatinginventory = function(id, inventory)
- print("Drawing a floating inventory!")
+ --print("Drawing a floating inventory!")
local frame = vgui.Create("DFrame")
frame:SetPos( 100, 100 )
frame:SetSize( 300, 200 )
@@ -28,8 +28,8 @@ local drawfloatinginventory = function(id, inventory)
end
frame:MakePopup()
frame.OnClose = function(self)
- print("Closeing chest id", id)
- print("entity is", known_inventories[id].Owner)
+ --print("Closeing chest id", id)
+ --print("entity is", known_inventories[id].Owner)
known_inventories[id]:RemoveObserver(self.id)
net.Start("closechestinv")
net.WriteEntity(known_inventories[id].Owner)
@@ -40,20 +40,20 @@ local drawfloatinginventory = function(id, inventory)
end
local drawsheeton = function(id,inventory)
- print("Drawing an inventory on a sheet!")
+ --print("Drawing an inventory on a sheet!")
if invsheet == nil then return end
local tpanel = vgui.Create( "DPanel", invsheet )
--tpanel.Paint = function( self, w, h )
-- draw.RoundedBox( 4, 0, 0, w, h, Color( 0, 128, 255 ) )
--end
if inventory.DrawOnDPanel then
- print("Has drawondpanel")
+ --print("Has drawondpanel")
local prox = inventory:DrawOnDPanel(tpanel)
- print("Prox returned was",prox)
- PrintTable(prox)
+ --print("Prox returned was",prox)
+ --PrintTable(prox)
known_inventories[id]:AddObserver(prox)
- print("Oservers is now")
- PrintTable(known_inventories[id].observers)
+ --print("Oservers is now")
+ --PrintTable(known_inventories[id].observers)
end
invsheet:AddSheet( inventory.Name, tpanel, "icon16/tab.png" )
end
@@ -61,17 +61,17 @@ end
net.Receive("art_ObserveInventory",function()
local id = net.ReadUInt(32)
local inv_type = net.ReadString()
- print("Got inv type", inv_type,"id",id)
+ --print("Got inv type", inv_type,"id",id)
local datalen = net.ReadUInt(32)
local inital_data = net.ReadData(datalen)
local ownent = net.ReadEntity()
- print("Owning ent of this inventory is", ownent)
+ --print("Owning ent of this inventory is", ownent)
assert(known_inventories[id] == nil, "Trying to observe the same inventory twice!",id)
local tinv = inv.CreateInventoryFromData(inv_type,inital_data)
tinv.Owner = ownent
tinv.id = id
- print("Created new inventory:")
- PrintTable(tinv)
+ --print("Created new inventory:")
+ --PrintTable(tinv)
known_inventories[id] = tinv
if id > 10 then
drawfloatinginventory(id,tinv)
@@ -87,15 +87,15 @@ net.Receive("art_UpdateInventory",function()
local position = net.ReadTable()
if isput then
local item_name = net.ReadString()
- print("Putting ", item_name, "into inventory ",id, " at position")
- PrintTable(position)
+ --print("Putting ", item_name, "into inventory ",id, " at position")
+ --PrintTable(position)
local item_data = net.ReadData(net.ReadUInt(32))
local item = itm.GetItemFromData(item_name,item_data)
known_inventories[id]:Put(position,item)
- print("Inventorie's observers:")
- PrintTable(known_inventories[id].observers)
- print("Inventory is now")
- PrintTable(known_inventories[id])
+ --print("Inventorie's observers:")
+ --PrintTable(known_inventories[id].observers)
+ --print("Inventory is now")
+ --PrintTable(known_inventories[id])
else
known_inventories[id]:Remove(position)
end
@@ -117,7 +117,7 @@ q.CreateInventorySheet = function(dpanel_parent)
invsheet:Dock( FILL )
for k,v in pairs(known_inventories) do
- print("This inventory id in known_inventories is", k)
+ --print("This inventory id in known_inventories is", k)
if k <= 10 then
drawsheeton(k,v)
else