aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/sh_buff.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-08-09 17:53:52 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-08-09 17:53:52 -0400
commitd4f197a35c207c9891d3f4dc5e9708af48c935de (patch)
treeee8fd3960c3a3fb4ecaf0f62b50d251f007ebaf3 /gamemode/shared/sh_buff.lua
parent2fe3c4551344870e3784733fce2d95027b5c8382 (diff)
downloadartery-d4f197a35c207c9891d3f4dc5e9708af48c935de.tar.gz
artery-d4f197a35c207c9891d3f4dc5e9708af48c935de.tar.bz2
artery-d4f197a35c207c9891d3f4dc5e9708af48c935de.zip
Added some weapons
Diffstat (limited to 'gamemode/shared/sh_buff.lua')
-rw-r--r--gamemode/shared/sh_buff.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/gamemode/shared/sh_buff.lua b/gamemode/shared/sh_buff.lua
new file mode 100644
index 0000000..ac46df9
--- /dev/null
+++ b/gamemode/shared/sh_buff.lua
@@ -0,0 +1,31 @@
+--This was probably a mistake
+do return end
+
+local pmeta = FindMetaTable("Player")
+
+pmeta.buffs = {}
+local buffid = 0
+function pmeta:ApplyBuff(buff)
+ if self.buffs[buff.type] == nil then
+ self.buffs[buff.type] = {}
+ end
+ local id = buffid
+ buffid = buffid + 1
+ self.buffs[buff.type][id] = buff
+ self.buffs[id] = buff.type
+ return id
+end
+
+function pmeta:RemoveBuff(buffid)
+ local bufftype = self.buffs[buffid]
+ self.buffs[buff.type][buffid] = nil
+ self.buffs[buffid] = nil
+end
+
+hook.Add("EntityTakeDamage","arterybuffs",function(ent,info)
+
+end)
+
+--[[
+ Add buff types here I guess
+]]