Removed currency ammount

This commit is contained in:
Pasha Bibko
2026-04-28 16:07:09 +01:00
parent 61c3123bf9
commit 631d5691ff
8 changed files with 23 additions and 68 deletions

View File

@@ -21,8 +21,8 @@ namespace Fruitomation.Game.Items
[SerializeField, InspectorReadOnly("Item Type")]
private ItemType InternalItemType = ItemType.None;
[SerializeField, InspectorReadOnly("Item Value")]
private CurrencyAmount InternalItemValue;
[SerializeField, InspectorReadOnly]
private double InternalItemValue;
public ItemType CurrentType
{
@@ -84,6 +84,16 @@ namespace Fruitomation.Game.Items
ItemInfo info = ItemInfoRegistry.Get(CurrentType);
CurrentChild = Instantiate(info.Prefab, transform);
if (info.OverrideCost)
{
InternalItemValue = info.Cost;
}
else
{
InternalItemValue = Mathf.Pow((float)InternalItemValue, 1.1f);
}
CustomBehaviour = info.GetCustomBehaviour();
if (CustomBehaviour is not null)
{
@@ -143,7 +153,6 @@ namespace Fruitomation.Game.Items
{
if (harvest)
{
ItemInfo info = ItemInfoRegistry.Get(CurrentType);
MoneyController.Add(InternalItemValue);
}

View File

@@ -70,8 +70,9 @@ namespace Fruitomation.Game.Items
[SerializeField] private CustomBehaviourType CustomBehaviour;
public bool OverrideCost;
public double Cost;
public GameObject Prefab;
public float BaseItemValue;
public CustomItemBehaviour GetCustomBehaviour()
{