namespace NHSE.Core
{
///
/// Details for field items -- items with at or above 60,000.
///
///
/// These details are extracted from FgMainParam.bcsv
///
public class FieldItemDefinition : INamedValue
{
///
/// Item ID
///
public ushort Index { get; }
///
/// Internal Name of the Item
///
public string Name { get; }
///
/// Item ID that the player receives if the item is dug up.
///
/// Is if it cannot be dug up.
public readonly ushort Dig;
///
/// Item ID that the player receives if the item is dug up.
///
/// Is if it cannot be picked up.
public readonly ushort Pick;
///
/// Classification of item.
///
public readonly FieldItemKind Kind;
public FieldItemDefinition(ushort id, ushort dig, ushort pick, string name, FieldItemKind kind)
{
Index = id;
Dig = dig;
Pick = pick;
Name = name;
Kind = kind;
}
///
/// When the field item is picked up, this is the held item ID.
///
///
/// If the item cannot be picked up, the is returned as a fallback rather than .
///
public ushort HeldItemId => Pick != Item.NONE ? Pick : Dig != Item.NONE ? Dig : Index;
}
}