1
0
Fork 0
forked from aly/qstbak
qstbak/GatheringPaths/Questionable.GatheringPaths/AssemblyGatheringLocationLoader.cs
2025-12-18 00:49:57 +10:00

27 lines
807 B
C#

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