add GGS Support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user