using System.Collections.ObjectModel;
namespace NeonSprawl.Server.Game.Contracts;
/// In-memory contract template catalog loaded at startup (NEO-145). Game code should prefer for lookups.
public sealed class ContractTemplateCatalog
{
public ContractTemplateCatalog(
string contractsDirectory,
IReadOnlyDictionary byId,
int catalogJsonFileCount)
{
ContractsDirectory = contractsDirectory;
ById = new ReadOnlyDictionary(new Dictionary(byId, StringComparer.Ordinal));
CatalogJsonFileCount = catalogJsonFileCount;
}
/// Absolute path to the directory that was enumerated for *_contract_templates.json catalogs.
public string ContractsDirectory { get; }
public IReadOnlyDictionary ById { get; }
public int DistinctTemplateCount => ById.Count;
/// Number of *_contract_templates.json files under .
public int CatalogJsonFileCount { get; }
}