aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/prayersystem/prayers/thickskin.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/shared/prayersystem/prayers/thickskin.lua')
-rw-r--r--gamemode/shared/prayersystem/prayers/thickskin.lua32
1 files changed, 16 insertions, 16 deletions
diff --git a/gamemode/shared/prayersystem/prayers/thickskin.lua b/gamemode/shared/prayersystem/prayers/thickskin.lua
index 41d5fb5..739a8b9 100644
--- a/gamemode/shared/prayersystem/prayers/thickskin.lua
+++ b/gamemode/shared/prayersystem/prayers/thickskin.lua
@@ -1,22 +1,22 @@
--[[
- An example item
+ An example prayer
]]
-local item = {}
+local prayer = {}
--Required, a name, all item names must be unique
-item.Name = "Thick Skin"
+prayer.Name = "Thick Skin"
--Optional, a tooltip to display when hovered over
-item.Tooltip = "A prayer to the warrior god to grant you 20% resistance to all dammage"
+prayer.Tooltip = "A prayer to the warrior god to grant you 20% resistance to all dammage"
--Required Returns the data needed to rebuild this item, should only contain the minimum data nessessary since this gets sent over the network
-item.Serialize = function(self)
+prayer.Serialize = function(self)
print("Trying to serailize!")
return ""
end
--Required, Rebuilds the item from data created in Serialize, if the item is different from the "main" copy of the item, it should retun a tabl.Copy(self), with the appropriate fields set.
-item.DeSerialize = function(self,string)
+prayer.DeSerialize = function(self,string)
print("Trying to deserialize!")
return self
end
@@ -34,14 +34,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_thickskin")
- 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_thickskin")
+ net.SendToServer()
+ lastprayer = CurTime()
end
end
hook.Add( "EntityTakeDamage" , "artery_thickskin" , function(ent,info)
@@ -51,9 +51,9 @@ hook.Add( "EntityTakeDamage" , "artery_thickskin" , function(ent,info)
end)
--Optional. Something run once when this item is drawn in a backpack
-function item.DoOnPanel(dimagebutton)
+function prayer.DoOnPanel(dimagebutton)
dimagebutton:SetImage( "prayericons/thickskin.png")
end
-ART.RegisterPrayer(item)
+ART.RegisterPrayer(prayer)