aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/inventory
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-08-24 20:32:34 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-08-24 20:32:34 -0400
commit233e478e40d72a091f70f18dc6846066a4f52016 (patch)
treecf34be714088889731736c81bd44e198c792625a /gamemode/core/inventory
parent61bc16dae5a1b61bcd237d9f0be36125829d95b1 (diff)
downloadartery-233e478e40d72a091f70f18dc6846066a4f52016.tar.gz
artery-233e478e40d72a091f70f18dc6846066a4f52016.tar.bz2
artery-233e478e40d72a091f70f18dc6846066a4f52016.zip
Fix all linter warnings
Diffstat (limited to 'gamemode/core/inventory')
-rw-r--r--gamemode/core/inventory/common/items.lua20
-rw-r--r--gamemode/core/inventory/common/weapons.lua4
-rw-r--r--gamemode/core/inventory/sv_invtracker.lua18
3 files changed, 19 insertions, 23 deletions
diff --git a/gamemode/core/inventory/common/items.lua b/gamemode/core/inventory/common/items.lua
index 95a507c..868d940 100644
--- a/gamemode/core/inventory/common/items.lua
+++ b/gamemode/core/inventory/common/items.lua
@@ -1,18 +1,14 @@
local items = {}
-local function drop_provided(ent,invid,frompos)
- assert(CLIENT,"requested to drop an item when we are not the client!")
- net.Start("art_RequestInvDrop")
- net.WriteEntity(ent)
- net.WriteUInt(invid,32)
- net.WriteTable(frompos)
- net.SendToServer()
-end
-
-local function drop_self(tbl)
-
-end
+-- local function drop_provided(ent,invid,frompos)
+-- assert(CLIENT,"requested to drop an item when we are not the client!")
+-- net.Start("art_RequestInvDrop")
+-- net.WriteEntity(ent)
+-- net.WriteUInt(invid,32)
+-- net.WriteTable(frompos)
+-- net.SendToServer()
+-- end
--Client requests the item be droped from the ent, invid, and inv position
function items.DropItem(ent_or_tbl,invid,frompos)
diff --git a/gamemode/core/inventory/common/weapons.lua b/gamemode/core/inventory/common/weapons.lua
index 9e6eead..0a86f00 100644
--- a/gamemode/core/inventory/common/weapons.lua
+++ b/gamemode/core/inventory/common/weapons.lua
@@ -89,14 +89,14 @@ function com.createattackstable(tbl_attackdata,attacker)
end)
end
end
-
+
--Empty functions for attacks not defined
for k,v in pairs({"left","right","forward","backward"}) do
if movementtbl[k] == nil then
movementtbl[k] = function() end
end
end
-
+
return movementtbl
end
diff --git a/gamemode/core/inventory/sv_invtracker.lua b/gamemode/core/inventory/sv_invtracker.lua
index bb5aba6..ab39e41 100644
--- a/gamemode/core/inventory/sv_invtracker.lua
+++ b/gamemode/core/inventory/sv_invtracker.lua
@@ -86,7 +86,7 @@ net.Receive("art_RequestInvDrop",function(len,ply)
local frominv = froment.data.inventories[frominvid]
local item = frominv:Get(frompos)
frominv:Remove(frompos)
-
+
local placetodrop
--Find somewhere to drop this
local tr = ply:GetEyeTrace()
@@ -95,8 +95,8 @@ net.Receive("art_RequestInvDrop",function(len,ply)
placetodrop = tr.HitPos
else
local tr2 = util.TraceLine({
- start = (tr.Normal*200) + tr.StartPos,
- endpos = ((tr.Normal*200) + tr.StartPos) + Vector(-2000),
+ start = (tr.Normal * 200) + tr.StartPos,
+ endpos = ((tr.Normal * 200) + tr.StartPos) + Vector(-2000),
})
placetodrop = tr2.HitPos
end
@@ -138,15 +138,15 @@ function track.MakeInventoryObserver(ply,invid)
return observer
end
-function track.NotifyPlayerOfInventory(ply,inv)
- local initaldat = inv:Serialize()
+function track.NotifyPlayerOfInventory(ply,tinv)
+ local initaldat = tinv:Serialize()
net.Start("art_ObserveInventory")
- net.WriteUInt(inv.id,32)
- net.WriteString(inv.Name)
+ net.WriteUInt(tinv.id,32)
+ net.WriteString(tinv.Name)
net.WriteUInt(#initaldat,32)
net.WriteData(initaldat,#initaldat)
- print("Before sending, inv owner is", inv.Owner, "and type is",inv.Name)
- net.WriteEntity(inv.Owner)
+ print("Before sending, inv owner is", tinv.Owner, "and type is",tinv.Name)
+ net.WriteEntity(tinv.Owner)
net.Send(ply)
end