muffin v7.4.4

This commit is contained in:
alydev 2025-12-23 09:48:23 +10:00
parent 5791858984
commit 8461a561d3
9 changed files with 29358 additions and 748 deletions

View file

@ -61,7 +61,9 @@ internal sealed class GatheringPointRegistry : IDisposable
private void LoadGatheringPointsFromAssembly()
{
_logger.LogInformation("Loading gathering points from assembly");
foreach (var (value, value2) in AssemblyGatheringLocationLoader.GetLocations())
IReadOnlyDictionary<ushort, GatheringRoot> locations = AssemblyGatheringLocationLoader.GetLocations();
_logger.LogInformation("AssemblyGatheringLocationLoader returned {Count} locations", locations.Count);
foreach (var (value, value2) in locations)
{
_gatheringPoints[new GatheringPointId(value)] = value2;
}
@ -72,27 +74,31 @@ internal sealed class GatheringPointRegistry : IDisposable
private void LoadGatheringPointsFromProjectDirectory()
{
DirectoryInfo directoryInfo = _pluginInterface.AssemblyLocation.Directory?.Parent?.Parent;
if (directoryInfo == null)
_logger.LogInformation("Looking for gathering paths in solution directory: {SolutionDirectory}", directoryInfo?.FullName ?? "(null)");
if (directoryInfo != null)
{
return;
}
DirectoryInfo directoryInfo2 = new DirectoryInfo(Path.Combine(directoryInfo.FullName, "GatheringPaths"));
if (!directoryInfo2.Exists)
{
return;
}
try
{
foreach (string value in ExpansionData.ExpansionFolders.Values)
DirectoryInfo directoryInfo2 = new DirectoryInfo(Path.Combine(directoryInfo.FullName, "GatheringPaths"));
_logger.LogInformation("Gathering paths project directory: {PathProjectDirectory}, Exists: {Exists}", directoryInfo2.FullName, directoryInfo2.Exists);
if (!directoryInfo2.Exists)
{
LoadFromDirectory(new DirectoryInfo(Path.Combine(directoryInfo2.FullName, value)));
return;
}
try
{
foreach (string value in ExpansionData.ExpansionFolders.Values)
{
LoadFromDirectory(new DirectoryInfo(Path.Combine(directoryInfo2.FullName, value)));
}
return;
}
catch (Exception exception)
{
_gatheringPoints.Clear();
_logger.LogError(exception, "Failed to load gathering points from project directory");
return;
}
}
catch (Exception exception)
{
_gatheringPoints.Clear();
_logger.LogError(exception, "Failed to load gathering points from project directory");
}
_logger.LogWarning("Could not determine solution directory from assembly location: {AssemblyLocation}", _pluginInterface.AssemblyLocation.FullName);
}
private void LoadGatheringPointFromStream(string fileName, Stream stream)