From fca38a87a75974d78a7cfaa8194b5d5178c3fc30 Mon Sep 17 00:00:00 2001 From: Vati Date: Wed, 15 Apr 2026 18:14:03 +0400 Subject: [PATCH] fix: equipment set categories --- Data/EquipmentSets.lua | 57 +++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/Data/EquipmentSets.lua b/Data/EquipmentSets.lua index eb48499..d9749ed 100644 --- a/Data/EquipmentSets.lua +++ b/Data/EquipmentSets.lua @@ -71,6 +71,15 @@ end -- Outfitter Integration ------------------------------------------- +-- Outfitter groups outfits into four built-in categories (Outfitter.lua:112-117): +-- "Complete", "Partial" are user-assembled gear; "Accessory" is trinket/ring +-- swap buttons; "Special" is prefab convenience outfits. Only the first two +-- represent real equipment sets that belong as Guda bag categories. +local kIgnoredOutfitterCategories = { + Accessory = true, + Special = true, +} + local function ScanOutfitter() -- Check if Outfitter is loaded and initialized if not Outfitter_GetCategoryOrder then return false end @@ -82,32 +91,34 @@ local function ScanOutfitter() local scannedSets = 0 for _, catID in ipairs(categoryOrder) do - local outfits = nil - if Outfitter_GetOutfitsByCategoryID then - outfits = Outfitter_GetOutfitsByCategoryID(catID) - end - if outfits then - for _, outfit in ipairs(outfits) do - local setName = outfit.Name - if setName and outfit.Items then - local itemIDs = {} - for slotName, item in pairs(outfit.Items) do - if item then - local itemID = nil - -- Outfitter stores item codes - if item.Code then - itemID = tonumber(item.Code) - elseif item.ItemID then - itemID = tonumber(item.ItemID) - end - if itemID and itemID > 0 then - itemIDs[itemID] = true + if not kIgnoredOutfitterCategories[catID] then + local outfits = nil + if Outfitter_GetOutfitsByCategoryID then + outfits = Outfitter_GetOutfitsByCategoryID(catID) + end + if outfits then + for _, outfit in ipairs(outfits) do + local setName = outfit.Name + if setName and outfit.Items then + local itemIDs = {} + for slotName, item in pairs(outfit.Items) do + if item then + local itemID = nil + -- Outfitter stores item codes + if item.Code then + itemID = tonumber(item.Code) + elseif item.ItemID then + itemID = tonumber(item.ItemID) + end + if itemID and itemID > 0 then + itemIDs[itemID] = true + end end end - end - setData[setName] = { itemIDs = itemIDs, source = "Outfitter" } - scannedSets = scannedSets + 1 + setData[setName] = { itemIDs = itemIDs, source = "Outfitter" } + scannedSets = scannedSets + 1 + end end end end