using System.Collections.ObjectModel; namespace NeonSprawl.Server.Game.Combat; /// In-memory ability catalog loaded at startup (NEO-77). Game callers should use . public sealed class AbilityDefinitionCatalog( string abilitiesDirectory, IReadOnlyDictionary byId, int catalogJsonFileCount) { /// Absolute path to the directory that was enumerated for *_abilities.json catalogs. public string AbilitiesDirectory { get; } = abilitiesDirectory; public IReadOnlyDictionary ById { get; } = new ReadOnlyDictionary(new Dictionary(byId, StringComparer.Ordinal)); public int DistinctAbilityCount => ById.Count; /// Number of *_abilities.json files under . public int CatalogJsonFileCount { get; } = catalogJsonFileCount; /// Resolves a catalog row by stable ability . public bool TryGetAbility(string id, out AbilityDefRow? row) => ById.TryGetValue(id, out row); }