using Sandbox; using Sandbox.UI; namespace Sasalka; public class InventoryItem : Component { [Property] public BaseItemDefinition Definition { get; set; } [Property] public int Count { get; set; } = 1; [Property] public bool Equipped { get; set; } = false; protected override void OnStart() { if ( GameObject.Components.TryGet( out var item ) ) //FindMode.EverythingInSelf { item.Label = Definition.Name; } } }