mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02: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",
|
"title": "ARC9 Weapon Base",
|
||||||
"description": "",
|
"type": "weapon",
|
||||||
"type": "weapon",
|
"tags":
|
||||||
"tags": [
|
[
|
||||||
"roleplay",
|
"roleplay",
|
||||||
"realism"
|
"realism"
|
||||||
],
|
]
|
||||||
"ignore": [
|
}
|
||||||
".git/*",
|
|
||||||
"README.md",
|
|
||||||
".py/*",
|
|
||||||
".blend/*",
|
|
||||||
".pdn/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
@ -51,7 +51,7 @@ function SWEP:CountAttsInTree(tree)
|
|||||||
|
|
||||||
local count = {}
|
local count = {}
|
||||||
|
|
||||||
for _, i in ipairs(flattree) do
|
for _, i in pairs(flattree[1]) do
|
||||||
if i.Installed then
|
if i.Installed then
|
||||||
local att = i.Installed
|
local att = i.Installed
|
||||||
count[att] = (count[att] or 0) + 1
|
count[att] = (count[att] or 0) + 1
|
||||||
@ -72,6 +72,7 @@ function SWEP:ReceiveWeapon()
|
|||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
if !self:ValidateInventoryForNewTree(tbl) then
|
if !self:ValidateInventoryForNewTree(tbl) then
|
||||||
|
self:SendWeapon()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -214,7 +214,7 @@ function SWEP:ValidateInventoryForNewTree(tree)
|
|||||||
|
|
||||||
local currcount = self:CountAttsInTree(self.Attachments)
|
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)
|
local atttbl = ARC9.GetAttTable(att)
|
||||||
|
|
||||||
if atttbl.Free then continue end
|
if atttbl.Free then continue end
|
||||||
|
Loading…
Reference in New Issue
Block a user