A small game item class 'Gem' that derives from LoadoutItem. It stores a GemId string and exposes a Level integer which is initialized via ProgressManager.GetGemDisplayLevel(GemId).
using Sandbox;
public class Gem : LoadoutItem
{
/// <summary>Set by Player.SpawnGemsOnGunObj after spawning. Used in Init to look up level and apply stats.</summary>
public string GemId { get; set; }
/// <summary>1-based level. 1 = base, 2+ = upgraded.</summary>
public int Level => ProgressManager.GetGemDisplayLevel( GemId );
}