using StardewValley.Objects;
namespace TrainerMod.ItemData
{
/// A ring that can be searched and added to the player's inventory through the console.
internal class SearchableRing : ISearchItem
{
/*********
** Properties
*********/
/// The underlying item.
private readonly Ring Ring;
/*********
** Accessors
*********/
/// Whether the item is valid.
public bool IsValid => this.Ring != null;
/// The item ID.
public int ID => this.Ring.parentSheetIndex;
/// The item name.
public string Name => this.Ring.Name;
/// The item type.
public ItemType Type => ItemType.Ring;
/*********
** Accessors
*********/
/// Construct an instance.
/// The ring ID.
public SearchableRing(int id)
{
try
{
this.Ring = new Ring(id);
}
catch
{
// invalid
}
}
}
}