Base inventory item type for passive items that are carried but never equipped. It exposes an Owner property resolved via GetComponentInParent<Player>(true), prevents switching to the item by returning false from OnCanSwitchTo, and provides an empty virtual OnPlayerDeath handler.
/// <summary>
/// Base class for a passive thing a player carries in their inventory and stores in a coffin - it is
/// never equipped. Anything that can be selected and held derives from <see cref="Carryable"/> instead.
/// </summary>
public abstract partial class Item : BaseInventoryItem
{
/// <summary>
/// The player that owns this item
/// </summary>
public Player Owner => GetComponentInParent<Player>( true );
/// <summary>
/// Passive items are never deployed, so the inventory must never select one.
/// </summary>
protected override bool OnCanSwitchTo() => false;
/// <summary>
/// Called when the owner dies
/// </summary>
public virtual void OnPlayerDeath( IPlayerEvent.DiedParams args )
{
}
}