add GGS Support

This commit is contained in:
2026-02-16 00:33:14 -05:00
parent 53b0b4317d
commit 06593805a7
10 changed files with 686 additions and 87 deletions

View File

@@ -6,6 +6,15 @@ local OFAmmoMakerDisplayCategoryPatch = {
local SPENT_CASINGS_CATEGORY = "OFSpentCasings"
local AMMO_PART_CATEGORY = "OFAmmoPart"
local function isSortingToggleEnabled()
local vars = SandboxVars and SandboxVars.OpinionatedFirearms
if vars and vars.AddSorting ~= nil then
return vars.AddSorting == true
end
return true
end
local function addAmmoMakerType(typeSet, fullType)
if type(fullType) ~= "string" or fullType == "" then
return
@@ -77,6 +86,11 @@ local function applyPatch()
return true
end
if not isSortingToggleEnabled() then
OFAmmoMakerDisplayCategoryPatch.patched = true
return true
end
local scriptManager = ScriptManager and ScriptManager.instance
if not scriptManager or type(scriptManager.FindItem) ~= "function" then
return false