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 --- .../prayersystem/prayers/preditorinstinct.lua | 136 ++++++++++----------- 1 file changed, 68 insertions(+), 68 deletions(-) (limited to 'gamemode/shared/prayersystem/prayers/preditorinstinct.lua') diff --git a/gamemode/shared/prayersystem/prayers/preditorinstinct.lua b/gamemode/shared/prayersystem/prayers/preditorinstinct.lua index e317dd5..b056f74 100644 --- a/gamemode/shared/prayersystem/prayers/preditorinstinct.lua +++ b/gamemode/shared/prayersystem/prayers/preditorinstinct.lua @@ -1,68 +1,68 @@ -do return end ---[[ - An example item -]] -local prayer = {} - ---Required, a name, all item names must be unique -prayer.Name = "Preditor Instinct" - ---Optional, a tooltip to display when hovered over -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 = {} -if SERVER then - util.AddNetworkString("art_prayer_preditorinstinct") - net.Receive("art_prayer_preditorinstinct",function(ln,ply) - if ply:HasItem(item.Name) then - prayedplayers[ply] = true - timer.Simple(60,function() - prayedplayers[ply] = nil - end) - end - end) -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 -local buffedplayers = {} -local function buffplayers() - for k,v in pairs(prayedplayers) do - if buffedplayers[k] ~= nil then continue end - --Find nearby wounded players or npcs - print("Checking if ", k, "should be buffed") - local wents = ents.FindInSphere(k:GetPos()+Vector(0,0,64),500) - for i,j in pairs(wents) do - print("Checking if ",j, "has taken dammage") - if k ~= j and j:Health() < j:GetMaxHealth() then - print("I buffed a player",k, "because ", j ,"has taken dammage") - k:SetWalkSpeed(k:GetWalkSpeed()*1.3) - buffedplayers[k] = true - timer.Simple(60,function() - k:SetWalkSpeed(k:GetWalkSpeed()*(1/1.3)) - buffedplayers[k] = nil - end) - goto nextply - end - end - ::nextply:: - end - timer.Simple(2,buffplayers) -end -buffplayers() - ---Optional. Something run once when this item is drawn in a backpack -function prayer.DoOnPanel(dimagebutton) - dimagebutton:SetImage( "prayericons/preditorinstinct.png") -end - -ART.RegisterPrayer(prayer) +-- do return end +-- --[[ +-- An example item +-- ]] +-- local prayer = {} +-- +-- --Required, a name, all item names must be unique +-- prayer.Name = "Preditor Instinct" +-- +-- --Optional, a tooltip to display when hovered over +-- 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 = {} +-- if SERVER then +-- util.AddNetworkString("art_prayer_preditorinstinct") +-- net.Receive("art_prayer_preditorinstinct",function(ln,ply) +-- if ply:HasItem(item.Name) then +-- prayedplayers[ply] = true +-- timer.Simple(60,function() +-- prayedplayers[ply] = nil +-- end) +-- end +-- end) +-- 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 +-- local buffedplayers = {} +-- local function buffplayers() +-- for k,v in pairs(prayedplayers) do +-- if buffedplayers[k] ~= nil then continue end +-- --Find nearby wounded players or npcs +-- print("Checking if ", k, "should be buffed") +-- local wents = ents.FindInSphere(k:GetPos()+Vector(0,0,64),500) +-- for i,j in pairs(wents) do +-- print("Checking if ",j, "has taken dammage") +-- if k ~= j and j:Health() < j:GetMaxHealth() then +-- print("I buffed a player",k, "because ", j ,"has taken dammage") +-- k:SetWalkSpeed(k:GetWalkSpeed()*1.3) +-- buffedplayers[k] = true +-- timer.Simple(60,function() +-- k:SetWalkSpeed(k:GetWalkSpeed()*(1/1.3)) +-- buffedplayers[k] = nil +-- end) +-- goto nextply +-- end +-- end +-- ::nextply:: +-- end +-- timer.Simple(2,buffplayers) +-- end +-- buffplayers() +-- +-- --Optional. Something run once when this item is drawn in a backpack +-- function prayer.DoOnPanel(dimagebutton) +-- dimagebutton:SetImage( "prayericons/preditorinstinct.png") +-- end +-- +-- ART.RegisterPrayer(prayer) -- cgit v1.2.3-70-g09d2