private void SubscribeInventoryResetItems(Module.Inventory value)
        {
            if (_reset)
            {
                return;
            }

            inventory.SharedModel.EquippedEnabledFunc.SetValueAndForceNotify(inventoryItem =>
            {
                if (inventoryItem.ItemBase.Value.ItemType == ItemType.Costume &&
                    inventoryItem.ItemBase.Value is Costume costume)
                {
                    return(costume.equipped);
                }

                return(TryToFindSlotAlreadyEquip(inventoryItem.ItemBase.Value, out _));
            });

            inventory.SharedModel.UpdateEquipmentNotification();
        }
Beispiel #2
0
 private void SubscribeInventoryResetItems(Module.Inventory value)
 {
     inventory.SharedModel.EquippedEnabledFunc.SetValueAndForceNotify(inventoryItem =>
                                                                      TryToFindSlotAlreadyEquip(inventoryItem.ItemBase.Value, out _));
     inventory.SharedModel.UpdateEquipmentNotification();
 }