This commit is contained in:
2026-02-12 15:09:07 -05:00
parent dd2d7a3abe
commit c320e8d993
13 changed files with 9168 additions and 30 deletions

View File

@@ -76,6 +76,44 @@ local function mergeByList(baseByList, extraByList)
return merged
end
local function isMagazineType(itemType)
local s = tostring(itemType or ""):lower()
if s == "" then
return false
end
if s:sub(1, 10) == "base.clip_" then
return true
end
if s:find("magazine", 1, true) then
return true
end
if s:find("drum", 1, true) then
return true
end
if s:find("clip", 1, true) then
return true
end
return false
end
local function collectMagazines(values)
local out = {}
local seen = {}
if type(values) ~= "table" then
return out
end
for _, value in ipairs(values) do
if isMagazineType(value) then
local key = tostring(value):lower()
if not seen[key] then
seen[key] = true
out[#out + 1] = value
end
end
end
return out
end
local defaults = safeRequire("OFBlockRules_Default")
local user = safeRequire("OFBlockRules_User")
local sourceCatalog = safeRequire("OFSourceCatalog")
@@ -83,6 +121,7 @@ local sourceCatalog = safeRequire("OFSourceCatalog")
local aliasCatalog = {
firearms = sourceCatalog.firearms or {},
attachments = sourceCatalog.attachments or {},
magazines = sourceCatalog.magazines or collectMagazines(sourceCatalog.attachments),
ggs_all = sourceCatalog.ggs_all or {},
}

View File

@@ -1,5 +1,34 @@
-- Auto-generated by tools/ggs-dist-cli.js apply
-- Keep this empty template in git; generated content can overwrite it.
-- Generated at: 2026-02-12T19:59:03.395Z
return {
items = {},
items = {
["Base.12GClip"] = {
enabled = false,
placements = {
["ArmyStorageAmmunition"] = 1,
["ArmyStorageGuns"] = 1,
},
},
["Base.1P78"] = {
enabled = false,
placements = {
["ArmyStorageAmmunition"] = 1,
["ArmyStorageGuns"] = 1,
},
},
["Base.9mmClip"] = {
enabled = false,
placements = {
["GunStoreMagsAmmo"] = 1,
["PoliceStorageGuns"] = 1,
},
},
["Base.A2000"] = {
enabled = true,
placements = {
["ArmyStorageAmmunition"] = 1,
["ArmyStorageGuns"] = 1,
},
},
},
}