using System; using System.Collections.Generic; using System.IO; using Questionable.Model.Gathering; namespace Questionable.GatheringPaths; public static class AssemblyGatheringLocationLoader { private static Dictionary? _locations; public static Stream GatheringSchema => typeof(AssemblyGatheringLocationLoader).Assembly.GetManifestResourceStream("Questionable.GatheringPaths.GatheringLocationSchema"); public static IReadOnlyDictionary GetLocations() { if (_locations == null) { _locations = new Dictionary(); } return _locations ?? throw new InvalidOperationException("location data is not initialized"); } private static void AddLocation(ushort questId, GatheringRoot root) { _locations[questId] = root; } }