From 30285644d66edb6065f84d9a2e7736550dfd407a Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Sat, 6 Dec 2025 23:41:38 -0600 Subject: [PATCH] Optimize item tags for proper loot spawning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Cards: Collection + Luxury (removed Misc for rarer spawns) - Packs: Collection + Misc (findable in misc loot) - Binder/Sheet: Collection + Luxury (removed Tool placeholder) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/ModBehaviour.cs | 20 +++++++------------- src/PackHelper.cs | 9 +++++++-- src/StorageHelper.cs | 15 +++++++++++---- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/ModBehaviour.cs b/src/ModBehaviour.cs index 56df501..5d1a079 100644 --- a/src/ModBehaviour.cs +++ b/src/ModBehaviour.cs @@ -710,26 +710,20 @@ namespace TradingCardMod // Set display quality based on rarity SetDisplayQuality(item, card.GetQuality()); - // Set tags + // Set tags - Cards are collectibles item.Tags.Clear(); - Tag? luxuryTag = TagHelper.GetTargetTag("Luxury"); - if (luxuryTag != null) - { - item.Tags.Add(luxuryTag); - } - - Tag? miscTag = TagHelper.GetTargetTag("Misc"); - if (miscTag != null) - { - item.Tags.Add(miscTag); - } - Tag? collTag = TagHelper.GetTargetTag("Collection"); if (collTag != null) { item.Tags.Add(collTag); } + + Tag? luxuryTag = TagHelper.GetTargetTag("Luxury"); + if (luxuryTag != null) + { + item.Tags.Add(luxuryTag); + } // ============================================================ // Add our custom TradingCard tag diff --git a/src/PackHelper.cs b/src/PackHelper.cs index 8ef1e1a..ad2c848 100644 --- a/src/PackHelper.cs +++ b/src/PackHelper.cs @@ -64,10 +64,15 @@ namespace TradingCardMod item.Quality = 3; // Uncommon quality for packs item.DisplayQuality = (DisplayQuality)3; - // Set tags + // Set tags - Packs are collectibles found in misc loot item.Tags.Clear(); - // Add Misc tag for loot spawning + Tag? collTag = TagHelper.GetTargetTag("Collection"); + if (collTag != null) + { + item.Tags.Add(collTag); + } + Tag? miscTag = TagHelper.GetTargetTag("Misc"); if (miscTag != null) { diff --git a/src/StorageHelper.cs b/src/StorageHelper.cs index 0d707f3..b9c5241 100644 --- a/src/StorageHelper.cs +++ b/src/StorageHelper.cs @@ -80,12 +80,19 @@ namespace TradingCardMod // Set display quality item.DisplayQuality = (DisplayQuality)3; - // Set tags - storage items should be tools + // Set tags - storage items are luxury collectibles item.Tags.Clear(); - Tag? toolTag = TagHelper.GetTargetTag("Tool"); - if (toolTag != null) + + Tag? collTag = TagHelper.GetTargetTag("Collection"); + if (collTag != null) { - item.Tags.Add(toolTag); + item.Tags.Add(collTag); + } + + Tag? luxuryTag = TagHelper.GetTargetTag("Luxury"); + if (luxuryTag != null) + { + item.Tags.Add(luxuryTag); } // Configure slots to only accept items with allowed tags