gems/Gem.cs

A small class representing a Gem loadout item. It stores a GemId set externally and exposes a Level property that queries ProgressManager.GetGemDisplayLevel with the 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 );
}