using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using Questionable.Model.Gathering; namespace Questionable.GatheringPaths; [SuppressMessage("ReSharper", "PartialTypeWithSinglePart", Justification = "Required for RELEASE")] public static partial class AssemblyGatheringLocationLoader { private static Dictionary? _locations; public static IReadOnlyDictionary GetLocations() { if (_locations == null) { _locations = []; #if RELEASE LoadLocations(); #endif } return _locations ?? throw new InvalidOperationException("location data is not initialized"); } public static Stream GatheringSchema => typeof(AssemblyGatheringLocationLoader).Assembly.GetManifestResourceStream("Questionable.GatheringPaths.GatheringLocationSchema")!; [SuppressMessage("ReSharper", "UnusedMember.Local")] private static void AddLocation(ushort questId, GatheringRoot root) => _locations![questId] = root; }