Consumable host: initialise at activation, dispose at expiry, instantiate consumables
ActivateConsumable runs Initialize on the effect's behaviours; expiry disposes them before Resolver.Forget, so a consumable's modifiers exist exactly while its effect is active. ItemManager.CreateInstance returns a ConsumableItem for a consumable design. StatResolver.DetachModifier drops an entry left with nothing attached, so ModifierEntryCount returns to baseline. LoadoutTests' hand-built ConsumableItem goes through CreateInstance. Builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
739eee4a8e
commit
aaab561f98
5 changed files with 20 additions and 7 deletions
|
|
@ -183,6 +183,9 @@ public class ItemManager
|
|||
};
|
||||
}
|
||||
|
||||
if (design is ConsumableItemData)
|
||||
return new ConsumableItem { Data = l.Design, Lot = lot };
|
||||
|
||||
return new CompoundCommodity
|
||||
{
|
||||
Data = l.Design, Lot = lot
|
||||
|
|
|
|||
Loading…
Reference in a new issue