27 lines
807 B
C#
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;
|
|
}
|
|
}
|