using System.Collections.ObjectModel;
namespace NeonSprawl.Server.Game.Quests;
/// In-memory quest catalog loaded at startup (NEO-113). Game callers should use (NEO-114).
public sealed class QuestDefinitionCatalog(
string questsDirectory,
IReadOnlyDictionary byId,
int catalogJsonFileCount)
{
/// Absolute path to the directory that was enumerated for *_quests.json catalogs.
public string QuestsDirectory { get; } = questsDirectory;
public IReadOnlyDictionary ById { get; } =
new ReadOnlyDictionary(new Dictionary(byId, StringComparer.Ordinal));
public int DistinctQuestCount => ById.Count;
/// Number of *_quests.json files under .
public int CatalogJsonFileCount { get; } = catalogJsonFileCount;
/// Resolves a catalog row by stable quest .
public bool TryGetQuest(string id, out QuestDefRow? row) =>
ById.TryGetValue(id, out row);
}