mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-03 18:52:58 -05:00
Free atts off actually works
This commit is contained in:
parent
cfc2276b16
commit
52a61a05b3
23
addon.json
23
addon.json
@ -1,16 +1,9 @@
|
||||
{
|
||||
"title": "ARC9",
|
||||
"description": "",
|
||||
"type": "weapon",
|
||||
"tags": [
|
||||
"roleplay",
|
||||
"realism"
|
||||
],
|
||||
"ignore": [
|
||||
".git/*",
|
||||
"README.md",
|
||||
".py/*",
|
||||
".blend/*",
|
||||
".pdn/*"
|
||||
]
|
||||
}
|
||||
"title": "ARC9 Weapon Base",
|
||||
"type": "weapon",
|
||||
"tags":
|
||||
[
|
||||
"roleplay",
|
||||
"realism"
|
||||
]
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ function SWEP:CountAttsInTree(tree)
|
||||
|
||||
local count = {}
|
||||
|
||||
for _, i in ipairs(flattree) do
|
||||
for _, i in pairs(flattree[1]) do
|
||||
if i.Installed then
|
||||
local att = i.Installed
|
||||
count[att] = (count[att] or 0) + 1
|
||||
@ -72,6 +72,7 @@ function SWEP:ReceiveWeapon()
|
||||
|
||||
if SERVER then
|
||||
if !self:ValidateInventoryForNewTree(tbl) then
|
||||
self:SendWeapon()
|
||||
return
|
||||
end
|
||||
end
|
||||
|
@ -214,7 +214,7 @@ function SWEP:ValidateInventoryForNewTree(tree)
|
||||
|
||||
local currcount = self:CountAttsInTree(self.Attachments)
|
||||
|
||||
for att, attc in ipairs(count) do
|
||||
for att, attc in pairs(count) do
|
||||
local atttbl = ARC9.GetAttTable(att)
|
||||
|
||||
if atttbl.Free then continue end
|
||||
|
Loading…
Reference in New Issue
Block a user