[Fix] Name & add meta
This commit is contained in:
@@ -12,7 +12,7 @@ namespace YachtDice.Shop
|
||||
private readonly InventoryModel inventoryModel;
|
||||
private readonly HashSet<string> purchasedPermanentIds = new();
|
||||
|
||||
public event Action<ModifierDefinitionSO> OnItemPurchased;
|
||||
public event Action<ModifierDefinition> OnItemPurchased;
|
||||
|
||||
public ShopModel(CurrencyBank currencyBank, InventoryModel inventoryModel)
|
||||
{
|
||||
@@ -20,7 +20,7 @@ namespace YachtDice.Shop
|
||||
this.inventoryModel = inventoryModel;
|
||||
}
|
||||
|
||||
public bool CanPurchase(ModifierDefinitionSO modifier)
|
||||
public bool CanPurchase(ModifierDefinition modifier)
|
||||
{
|
||||
if (modifier == null) return false;
|
||||
if (!currencyBank.CanAfford(modifier.ShopPrice)) return false;
|
||||
@@ -31,7 +31,7 @@ namespace YachtDice.Shop
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TryPurchase(ModifierDefinitionSO modifier)
|
||||
public bool TryPurchase(ModifierDefinition modifier)
|
||||
{
|
||||
if (!CanPurchase(modifier)) return false;
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace YachtDice.Shop
|
||||
|
||||
public bool IsPermanentOwned(string modifierId) => purchasedPermanentIds.Contains(modifierId);
|
||||
|
||||
public ShopItemState GetItemState(ModifierDefinitionSO modifier)
|
||||
public ShopItemState GetItemState(ModifierDefinition modifier)
|
||||
{
|
||||
if (modifier == null) return ShopItemState.TooExpensive;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user