From 60ebf457f47f2f3a0d753b1f03a7121472948e1f Mon Sep 17 00:00:00 2001 From: bananarama92 <bananarama921@outlook.com> Date: Fri, 28 Mar 2025 17:18:56 +0100 Subject: [PATCH] BUG: Fix `InventoryWear()` ignoring explicitly passed colors in favor of `Craft.Color` --- BondageClub/Scripts/Inventory.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BondageClub/Scripts/Inventory.js b/BondageClub/Scripts/Inventory.js index 78235649ba..1ef3c7ad77 100644 --- a/BondageClub/Scripts/Inventory.js +++ b/BondageClub/Scripts/Inventory.js @@ -820,10 +820,16 @@ function InventoryWear(C, AssetName, AssetGroup, ItemColor, Difficulty, MemberNu if (A.ExpressionTrigger != null) { InventoryExpressionTriggerApply(C, A.ExpressionTrigger); } + if (Craft) { + // Restore the item color if it has been explicitly passed; keep using the `Craft.Color`-assigned color otherwise const C_Source = Character.find(c => c.MemberNumber === MemberNumber) ?? null; InventoryCraft(C_Source, C, /** @type {AssetGroupItemName} */(AssetGroup), Craft, false); + if (ItemColor != null) { + item.Color = color; + } } + if (Refresh) { CharacterRefresh(C, true); }