diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-09-02 17:34:27 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-09-02 17:34:27 -0400 |
| commit | 9ba957b99603590b099f4bcd22a9cc86525dbcde (patch) | |
| tree | 1e807a2c80367025d26ed28859f35d3c4454aced | |
| parent | 984b841c008ba29ead9ecb12aa86a57de2b0597a (diff) | |
| download | artery-9ba957b99603590b099f4bcd22a9cc86525dbcde.tar.gz artery-9ba957b99603590b099f4bcd22a9cc86525dbcde.tar.bz2 artery-9ba957b99603590b099f4bcd22a9cc86525dbcde.zip | |
Various debugging things
| -rw-r--r-- | entities/entities/art_chest/init.lua | 2 | ||||
| -rw-r--r-- | entities/entities/art_lootchest/init.lua | 3 | ||||
| -rw-r--r-- | gamemode/client/qtabs/cl_qinventory.lua | 1 | ||||
| -rw-r--r-- | gamemode/core/inventory/item.lua | 1 | ||||
| -rw-r--r-- | gamemode/inventorysystem/shapedinventory/cl_shaped.lua | 2 |
5 files changed, 8 insertions, 1 deletions
diff --git a/entities/entities/art_chest/init.lua b/entities/entities/art_chest/init.lua index e2d70e1..fb0fef5 100644 --- a/entities/entities/art_chest/init.lua +++ b/entities/entities/art_chest/init.lua @@ -7,7 +7,7 @@ local track = nrequire("inventory/sv_invtracker.lua") --local invfuncs = include("../../../gamemode/shared/inventory_common.lua") function ENT:Initialize() self.Openedby = {} - self:SetModel("models/props_junk/Rock001a.mdl") + self:SetModel(self.Model or "models/props_junk/Rock001a.mdl") self:PhysicsInit(SOLID_VPHYSICS) self:SetMoveType(MOVETYPE_NONE) self:SetSolid(SOLID_VPHYSICS) diff --git a/entities/entities/art_lootchest/init.lua b/entities/entities/art_lootchest/init.lua index 2ef04a7..4e6dd52 100644 --- a/entities/entities/art_lootchest/init.lua +++ b/entities/entities/art_lootchest/init.lua @@ -11,6 +11,9 @@ ENT.lastused = CurTime() function ENT:Use(ply) local nowtime = CurTime() print("Last used time:",self.lastused,"now it's ",nowtime) + for i = self.lastused,nowtime,100 do + + end self.lastused = nowtime print("Ply opened:",ply) self.Openedby[ply] = true 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 |
