aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/prayersystem/prayers/preditorinstinct.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-10-24 12:10:40 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-10-24 12:10:40 -0400
commit09de17b25912ca1ed79afcf9ecfc3291fe34a96d (patch)
tree82e842a8cfe8247b44cf6a778eca54a4beb08995 /gamemode/shared/prayersystem/prayers/preditorinstinct.lua
parent3347d78a48e08084606e8902d6580a025ab2f793 (diff)
downloadartery-09de17b25912ca1ed79afcf9ecfc3291fe34a96d.tar.gz
artery-09de17b25912ca1ed79afcf9ecfc3291fe34a96d.tar.bz2
artery-09de17b25912ca1ed79afcf9ecfc3291fe34a96d.zip
fixed prayers to work with the prayer system
Diffstat (limited to 'gamemode/shared/prayersystem/prayers/preditorinstinct.lua')
-rw-r--r--gamemode/shared/prayersystem/prayers/preditorinstinct.lua26
1 files changed, 13 insertions, 13 deletions
diff --git a/gamemode/shared/prayersystem/prayers/preditorinstinct.lua b/gamemode/shared/prayersystem/prayers/preditorinstinct.lua
index 8ba7b87..988904c 100644
--- a/gamemode/shared/prayersystem/prayers/preditorinstinct.lua
+++ b/gamemode/shared/prayersystem/prayers/preditorinstinct.lua
@@ -1,13 +1,13 @@
--[[
An example item
]]
-local item = {}
+local prayer = {}
--Required, a name, all item names must be unique
-item.Name = "Preditor Instinct"
+prayer.Name = "Preditor Instinct"
--Optional, a tooltip to display when hovered over
-item.Tooltip = "A prayer to the rouge god to grant you 30% movement when chaseing a wounded target"
+prayer.Tooltip = "A prayer to the rouge god to grant you 30% movement when chaseing a wounded target"
--Optional, when the player clicks this item, a menu will show up, if the menu item is clicked, the function is ran. This is all run client side, so if you want it to do something server side, you'll need to use the net library. Remember that items are in the shared domain, so you can define what it does in the same file!
local prayedplayers = {}
@@ -22,14 +22,14 @@ if SERVER then
end
end)
end
-if CLIENT then
- local lastprayer = CurTime()
- prayer.Pray = function(self)
- if CurTime() > lastprayer + 0 then
- net.Start("art_prayer_preditorinstinct")
- net.SendToServer()
- lastprayer = CurTime()
- end
+
+local lastprayer = CurTime()
+prayer.Pray = function(self)
+ if SERVER then return end
+ if CurTime() > lastprayer + 0 then
+ net.Start("art_prayer_preditorinstinct")
+ net.SendToServer()
+ lastprayer = CurTime()
end
end
--called continuously to buff players
@@ -60,8 +60,8 @@ end
buffplayers()
--Optional. Something run once when this item is drawn in a backpack
-function item.DoOnPanel(dimagebutton)
+function prayer.DoOnPanel(dimagebutton)
dimagebutton:SetImage( "prayericons/preditorinstinct.png")
end
-ART.RegisterPrayer(item)
+ART.RegisterPrayer(prayer)