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 --- gamemode/itemsystem/armor/balaclava.lua | 162 ++++++++++++++++---------------- 1 file changed, 81 insertions(+), 81 deletions(-) (limited to 'gamemode/itemsystem/armor/balaclava.lua') diff --git a/gamemode/itemsystem/armor/balaclava.lua b/gamemode/itemsystem/armor/balaclava.lua index 0bd16c7..dead873 100644 --- a/gamemode/itemsystem/armor/balaclava.lua +++ b/gamemode/itemsystem/armor/balaclava.lua @@ -1,81 +1,81 @@ ---[[ - An example item -]] -do return end -local item = {} - ---Required, a name, all item names must be unique -item.Name = "Balaclava" - ---Optional, a tooltip to display -item.Tooltip = "Something to cover your face" - ---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) - print("Trying to Serialize!") - 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) - print("Trying to deserialize!") - return self -end - ---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, you'll need to use the net library. -function item.GetOptions(self) - local options = {} - options["test"] = function() print("You pressed test!") end - options["toste"] = function() print("You pressed toste!") end - options["drop"] = ART.DropItem(self) - return options -end - -function item.DoOnPanel(dimagebutton) - dimagebutton:SetImage( "weapons/rustyaxe/rustyaxe.png") -end - -function item.DoOnEquipPanel(dimagebutton) - print("called with panel:",panel) - dimagebutton:SetImage( "weapons/rustyaxe/rustyaxe_eq.png") -end - ---[[ -function item.Paint(self,width,height) - --print("painting with values",self,width,height) - draw.RoundedBox(4, 0,0,width,height,Color(0,100,0)) -end - -function item.PaintEquiped(self,width,height) - --print("painting with values",self,width,height) - draw.RoundedBox(4, 0,0,width,height,Color(0,100,0)) -end -]] - ---Required, the shape of this item. -item.Shape = { - {true,true}, - {true,true}, -} - ---Optional, If this item can be equiped in any player slots, put them here. -item.Equipable = "Head" - ---Optional, if we should do something special on equip(like draw the PAC for this weapon) -item.onEquip = function(self,who) - print("onEquip",who) - if CLIENT then print("onEquip client!") end - if SERVER then - PrintTable(pac) - ART.ApplyPAC(who,"balaclava") - end -end - ---Optional, if we should do something speical on unequip(like setting animations back to normal) -item.onUnEquip = function(self,who) - ART.RemovePAC(who,"balaclava") -end - -print("Hello from balaclava.lua") ---Don't forget to register the item! -nrequire("item.lua").RegisterItem(item) +-- --[[ +-- An example item +-- ]] +-- do return end +-- local item = {} +-- +-- --Required, a name, all item names must be unique +-- item.Name = "Balaclava" +-- +-- --Optional, a tooltip to display +-- item.Tooltip = "Something to cover your face" +-- +-- --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) +-- print("Trying to Serialize!") +-- 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) +-- print("Trying to deserialize!") +-- return self +-- end +-- +-- --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, you'll need to use the net library. +-- function item.GetOptions(self) +-- local options = {} +-- options["test"] = function() print("You pressed test!") end +-- options["toste"] = function() print("You pressed toste!") end +-- options["drop"] = ART.DropItem(self) +-- return options +-- end +-- +-- function item.DoOnPanel(dimagebutton) +-- dimagebutton:SetImage( "weapons/rustyaxe/rustyaxe.png") +-- end +-- +-- function item.DoOnEquipPanel(dimagebutton) +-- print("called with panel:",panel) +-- dimagebutton:SetImage( "weapons/rustyaxe/rustyaxe_eq.png") +-- end +-- +-- --[[ +-- function item.Paint(self,width,height) +-- --print("painting with values",self,width,height) +-- draw.RoundedBox(4, 0,0,width,height,Color(0,100,0)) +-- end +-- +-- function item.PaintEquiped(self,width,height) +-- --print("painting with values",self,width,height) +-- draw.RoundedBox(4, 0,0,width,height,Color(0,100,0)) +-- end +-- ]] +-- +-- --Required, the shape of this item. +-- item.Shape = { +-- {true,true}, +-- {true,true}, +-- } +-- +-- --Optional, If this item can be equiped in any player slots, put them here. +-- item.Equipable = "Head" +-- +-- --Optional, if we should do something special on equip(like draw the PAC for this weapon) +-- item.onEquip = function(self,who) +-- print("onEquip",who) +-- if CLIENT then print("onEquip client!") end +-- if SERVER then +-- PrintTable(pac) +-- ART.ApplyPAC(who,"balaclava") +-- end +-- end +-- +-- --Optional, if we should do something speical on unequip(like setting animations back to normal) +-- item.onUnEquip = function(self,who) +-- ART.RemovePAC(who,"balaclava") +-- end +-- +-- print("Hello from balaclava.lua") +-- --Don't forget to register the item! +-- nrequire("item.lua").RegisterItem(item) -- cgit v1.2.3-70-g09d2