using System.Collections.ObjectModel;
namespace NeonSprawl.Server.Game.Factions;
/// In-memory faction catalog loaded at startup (NEO-134). Game code should prefer for lookups.
public sealed class FactionDefinitionCatalog(
string factionsDirectory,
IReadOnlyDictionary byId,
int catalogJsonFileCount)
{
/// Absolute path to the directory that was enumerated for *_factions.json catalogs.
public string FactionsDirectory { get; } = factionsDirectory;
public IReadOnlyDictionary ById { get; } =
new ReadOnlyDictionary(new Dictionary(byId, StringComparer.Ordinal));
public int DistinctFactionCount => ById.Count;
/// Number of *_factions.json files under .
public int CatalogJsonFileCount { get; } = catalogJsonFileCount;
}