46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using Chickensoft.AutoInject;
|
|
using Chickensoft.Introspection;
|
|
using Chickensoft.Serialization;
|
|
using Godot;
|
|
using Zennysoft.Ma.Adapter;
|
|
|
|
namespace Zennysoft.Game.Ma;
|
|
|
|
[Meta(typeof(IAutoNode)), Id("consumable_item")]
|
|
public partial class ConsumableItem : InventoryItem
|
|
{
|
|
public override void _Notification(int what) => this.Notify(what);
|
|
|
|
[Node] private Sprite3D _sprite { get; set; } = default!;
|
|
|
|
public override void _Ready()
|
|
{
|
|
_sprite.Texture = Stats.Texture;
|
|
}
|
|
|
|
public override string ItemName => Stats.Name;
|
|
|
|
public override string Description => Stats.Description;
|
|
|
|
public override float SpawnRate => Stats.SpawnRate;
|
|
|
|
public override int ThrowDamage => Stats.ThrowDamage;
|
|
|
|
public override float ThrowSpeed => Stats.ThrowSpeed;
|
|
|
|
public int HealHPAmount => Stats.HealHPAmount;
|
|
|
|
public int HealVTAmount => Stats.HealVTAmount;
|
|
|
|
public int RaiseHPAmount => Stats.RaiseHPAmount;
|
|
|
|
public int RaiseVTAmount => Stats.RaiseVTAmount;
|
|
|
|
public override ItemTag ItemTag => Stats.ItemTag;
|
|
|
|
[Export]
|
|
[Save("consumable_item_stats")]
|
|
public ConsumableItemStats Stats { get; set; } = new ConsumableItemStats();
|
|
public override Texture2D GetTexture() => Stats.Texture;
|
|
}
|