From 233e478e40d72a091f70f18dc6846066a4f52016 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 24 Aug 2017 20:32:34 -0400 Subject: Fix all linter warnings --- .../shared/prayersystem/prayers/lesserevasion.lua | 132 ++++++++++----------- 1 file changed, 66 insertions(+), 66 deletions(-) (limited to 'gamemode/shared/prayersystem/prayers/lesserevasion.lua') diff --git a/gamemode/shared/prayersystem/prayers/lesserevasion.lua b/gamemode/shared/prayersystem/prayers/lesserevasion.lua index 15077d3..040189e 100644 --- a/gamemode/shared/prayersystem/prayers/lesserevasion.lua +++ b/gamemode/shared/prayersystem/prayers/lesserevasion.lua @@ -1,66 +1,66 @@ -do return end ---[[ - An example item -]] -print("Hello from lesser evasion.lua") -local prayer = {} - ---Required, a name, all prayer names must be unique -prayer.Name = "Lesser Evasion" - ---Optional, a tooltip to display when hovered over -prayer.Tooltip = "A prayer to the rouge god to allow you to quickly dodge to the left or right" - ---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 = {} -local prayedplayerstime = {} -if SERVER then - util.AddNetworkString("art_prayer_lesserevasion") - net.Receive("art_prayer_lesserevasion",function(ln,ply) - if ply:HasPrayer(prayer.Name) and (prayedplayers[ply] == nil or CurTime() > prayedplayerstime[ply] + 5) then - prayedplayers[ply] = true - prayedplayerstime[ply] = CurTime() - end - end) -end - - -local lastprayer = CurTime() -prayer.Pray = function(self) - if SERVER then return end - if CurTime() > lastprayer + 0 then - net.Start("art_prayer_lesserevasion") - net.SendToServer() - lastprayer = CurTime() - end -end - - -hook.Add( "SetupMove", "artery_prayer_lesserevasion", function( ply, mv, cmd ) - if prayedplayers[ply] and not ply:OnGround() then - local mdir = ART.playermovedir(ply) - if mdir == "left" or mdir == "right" then - local noup = mv:GetVelocity() - noup.z = 0 - local pow = 600 - noup:Length() - mv:SetVelocity((noup * pow) + Vector(0, 0, 20)) - prayedplayers[ply] = false - end - end -end ) - -function prayer.DisplayHelp(panel) - local helptxt = vgui.Create("DLabel",panel) - helptxt:SetWrap(true) - helptxt:SetText("Your reflexes quicken, allowing you to dodge eto the left or right every 5 seconds. Start moveing left or right, then jump") - helptxt:SetSize(ScrW() / 4,ScrH() / 8) - helptxt:SetDark(true) -end - ---Optional. Something run once when this item is drawn in a backpack -function prayer.DoOnPanel(dimagebutton) - dimagebutton:SetImage( "prayericons/lesserevasion.png") -end - - -ART.RegisterPrayer(prayer) +-- do return end +-- --[[ +-- An example item +-- ]] +-- print("Hello from lesser evasion.lua") +-- local prayer = {} +-- +-- --Required, a name, all prayer names must be unique +-- prayer.Name = "Lesser Evasion" +-- +-- --Optional, a tooltip to display when hovered over +-- prayer.Tooltip = "A prayer to the rouge god to allow you to quickly dodge to the left or right" +-- +-- --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 = {} +-- local prayedplayerstime = {} +-- if SERVER then +-- util.AddNetworkString("art_prayer_lesserevasion") +-- net.Receive("art_prayer_lesserevasion",function(ln,ply) +-- if ply:HasPrayer(prayer.Name) and (prayedplayers[ply] == nil or CurTime() > prayedplayerstime[ply] + 5) then +-- prayedplayers[ply] = true +-- prayedplayerstime[ply] = CurTime() +-- end +-- end) +-- end +-- +-- +-- local lastprayer = CurTime() +-- prayer.Pray = function(self) +-- if SERVER then return end +-- if CurTime() > lastprayer + 0 then +-- net.Start("art_prayer_lesserevasion") +-- net.SendToServer() +-- lastprayer = CurTime() +-- end +-- end +-- +-- +-- hook.Add( "SetupMove", "artery_prayer_lesserevasion", function( ply, mv, cmd ) +-- if prayedplayers[ply] and not ply:OnGround() then +-- local mdir = ART.playermovedir(ply) +-- if mdir == "left" or mdir == "right" then +-- local noup = mv:GetVelocity() +-- noup.z = 0 +-- local pow = 600 - noup:Length() +-- mv:SetVelocity((noup * pow) + Vector(0, 0, 20)) +-- prayedplayers[ply] = false +-- end +-- end +-- end ) +-- +-- function prayer.DisplayHelp(panel) +-- local helptxt = vgui.Create("DLabel",panel) +-- helptxt:SetWrap(true) +-- helptxt:SetText("Your reflexes quicken, allowing you to dodge eto the left or right every 5 seconds. Start moveing left or right, then jump") +-- helptxt:SetSize(ScrW() / 4,ScrH() / 8) +-- helptxt:SetDark(true) +-- end +-- +-- --Optional. Something run once when this item is drawn in a backpack +-- function prayer.DoOnPanel(dimagebutton) +-- dimagebutton:SetImage( "prayericons/lesserevasion.png") +-- end +-- +-- +-- ART.RegisterPrayer(prayer) -- cgit v1.2.3-70-g09d2