mirror of
https://gitgud.io/BondageProjects/Bondage-College.git
synced 2025-04-25 17:59:34 +00:00
BUG: Fix InventoryWear()
ignoring explicitly passed colors in favor of Craft.Color
This commit is contained in:
parent
1a185e0318
commit
60ebf457f4
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue