using System.Collections.ObjectModel; namespace NeonSprawl.Server.Game.Encounters; /// In-memory reward-table catalog loaded at startup (NEO-101). Game callers should use (NEO-102). public sealed class RewardTableDefinitionCatalog( string rewardTablesDirectory, IReadOnlyDictionary byId, int catalogJsonFileCount) { /// Absolute path to the directory that was enumerated for *_reward_tables.json catalogs. public string RewardTablesDirectory { get; } = rewardTablesDirectory; public IReadOnlyDictionary ById { get; } = new ReadOnlyDictionary(new Dictionary(byId, StringComparer.Ordinal)); public int DistinctRewardTableCount => ById.Count; /// Number of *_reward_tables.json files under . public int CatalogJsonFileCount { get; } = catalogJsonFileCount; /// Resolves a catalog row by stable reward-table . public bool TryGetRewardTable(string id, out RewardTableDefRow? row) => ById.TryGetValue(id, out row); }