using System.Collections.ObjectModel;
namespace NeonSprawl.Server.Game.Mastery;
/// In-memory mastery catalog loaded at startup (NEO-46). Prefer for lookups.
public sealed class MasteryCatalog(
string masteryDirectory,
IReadOnlyDictionary tracksBySkillId,
IReadOnlyDictionary perksById,
int catalogJsonFileCount)
{
/// Absolute path to the directory enumerated for *_mastery.json catalogs.
public string MasteryDirectory { get; } = masteryDirectory;
public IReadOnlyDictionary TracksBySkillId { get; } =
new ReadOnlyDictionary(
new Dictionary(tracksBySkillId, StringComparer.Ordinal));
public IReadOnlyDictionary PerksById { get; } =
new ReadOnlyDictionary(
new Dictionary(perksById, StringComparer.Ordinal));
public int TrackCount => TracksBySkillId.Count;
public int PerkCount => PerksById.Count;
/// Number of *_mastery.json files under .
public int CatalogJsonFileCount { get; } = catalogJsonFileCount;
}