aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--entities/entities/art_lootchest/cl_init.lua5
-rw-r--r--entities/entities/art_lootchest/init.lua24
-rw-r--r--entities/entities/art_lootchest/shared.lua2
3 files changed, 31 insertions, 0 deletions
diff --git a/entities/entities/art_lootchest/cl_init.lua b/entities/entities/art_lootchest/cl_init.lua
new file mode 100644
index 0000000..4cfd132
--- /dev/null
+++ b/entities/entities/art_lootchest/cl_init.lua
@@ -0,0 +1,5 @@
+include('shared.lua')
+--local invfuncs = include("../../../gamemode/shared/inventory_common.lua")
+local invfuncs = ART.invfuncs
+
+ENT.RenderGroup = RENDERGROUP_BOTH
diff --git a/entities/entities/art_lootchest/init.lua b/entities/entities/art_lootchest/init.lua
new file mode 100644
index 0000000..516dc98
--- /dev/null
+++ b/entities/entities/art_lootchest/init.lua
@@ -0,0 +1,24 @@
+AddCSLuaFile( "cl_init.lua" )
+AddCSLuaFile( "shared.lua" )
+
+include("shared.lua")
+local invfuncs = include("../../../gamemode/shared/inventory_common.lua")
+
+--Some things that can be looted
+local lootables = {
+
+}
+
+function CreateRandomLoot(time)
+
+end
+
+ENT.lastused = CurTime()
+function ENT:Use(ply)
+ local nowtime = CurTime()
+ print("Last used time:",self.lastused,"now it's ",nowtime)
+ self.lastused = nowtime
+ print("Ply opened:",ply)
+ self.Openedby[ply] = true
+ self:SendInventory(ply)
+end
diff --git a/entities/entities/art_lootchest/shared.lua b/entities/entities/art_lootchest/shared.lua
new file mode 100644
index 0000000..d99af27
--- /dev/null
+++ b/entities/entities/art_lootchest/shared.lua
@@ -0,0 +1,2 @@
+ENT.Type = "anim"
+ENT.Base = "art_chest"