diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-10-24 12:09:46 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-10-24 12:09:46 -0400 |
| commit | 3347d78a48e08084606e8902d6580a025ab2f793 (patch) | |
| tree | 19fe6b996073c7b68061bc1a339838deafde65b0 /entities | |
| parent | 9adcb3c73a8d0e7ecfe66b30da630c6c2e67f03a (diff) | |
| download | artery-3347d78a48e08084606e8902d6580a025ab2f793.tar.gz artery-3347d78a48e08084606e8902d6580a025ab2f793.tar.bz2 artery-3347d78a48e08084606e8902d6580a025ab2f793.zip | |
Added a lootchest, still needs some items to drop!
Diffstat (limited to 'entities')
| -rw-r--r-- | entities/entities/art_lootchest/cl_init.lua | 5 | ||||
| -rw-r--r-- | entities/entities/art_lootchest/init.lua | 24 | ||||
| -rw-r--r-- | entities/entities/art_lootchest/shared.lua | 2 |
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" |
