aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/prayersystem/prayers/preditorinstinct.lua
diff options
context:
space:
mode:
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)