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
{
public FactionDefinitionCatalog(
string factionsDirectory,
IReadOnlyDictionary byId,
int catalogJsonFileCount)
{
FactionsDirectory = factionsDirectory;
ById = new ReadOnlyDictionary(new Dictionary(byId, StringComparer.Ordinal));
CatalogJsonFileCount = catalogJsonFileCount;
}
/// Absolute path to the directory that was enumerated for *_factions.json catalogs.
public string FactionsDirectory { get; }
public IReadOnlyDictionary ById { get; }
public int DistinctFactionCount => ById.Count;
/// Number of *_factions.json files under .
public int CatalogJsonFileCount { get; }
}