Snapshot for release 2026.10.13.1 (internal d2b5fb3)

This commit is contained in:
Tom Bohar 2026-10-13 14:25:49 -04:00
commit 319740ff5d
291 changed files with 58505 additions and 2107 deletions

View file

@ -36,15 +36,34 @@ public static unsafe class PluginExports
[UnmanagedCallersOnly(EntryPoint = "RynthPluginShutdown", CallConvs = new[] { typeof(CallConvCdecl) })]
public static void Shutdown()
{
Runtime.Shutdown();
PathInterface.Release();
// An exception escaping an UnmanagedCallersOnly export fail-fasts the client under NativeAOT.
// Guard each step so one failure cannot skip the other.
RynthNavPlugin? plugin = Runtime.Plugin; // Runtime.Shutdown drops it; the log needs its host
try { Runtime.Shutdown(); }
catch (Exception ex) { LogShutdownError(plugin, "Runtime.Shutdown", ex); }
try { PathInterface.Release(); }
catch (Exception ex) { LogShutdownError(plugin, "PathInterface.Release", ex); }
}
private static void LogShutdownError(RynthNavPlugin? plugin, string step, Exception ex)
{
try { plugin?.LogFromExport($"[RynthNav] Shutdown: {step} failed: {ex.GetType().Name}: {ex.Message}"); }
catch { /* never throw out of a native export */ }
}
[UnmanagedCallersOnly(EntryPoint = "RynthPluginName", CallConvs = new[] { typeof(CallConvCdecl) })]
public static IntPtr GetName() => RynthNavPlugin.NamePointer;
public static IntPtr GetName()
{
try { return RynthNavPlugin.NamePointer; } // a static initializer that throws surfaces here (TypeInitializationException)
catch { return IntPtr.Zero; }
}
[UnmanagedCallersOnly(EntryPoint = "RynthPluginVersion", CallConvs = new[] { typeof(CallConvCdecl) })]
public static IntPtr GetVersion() => RynthNavPlugin.VersionPointer;
public static IntPtr GetVersion()
{
try { return RynthNavPlugin.VersionPointer; }
catch { return IntPtr.Zero; }
}
[UnmanagedCallersOnly(EntryPoint = "RynthPluginOnLoginComplete", CallConvs = new[] { typeof(CallConvCdecl) })]
public static void OnLoginComplete() => Runtime.OnLoginComplete();

View file

@ -28,6 +28,9 @@ public sealed partial class RynthNavPlugin : RynthPluginBase
internal const string PluginVersion = "0.6.6";
internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi(PluginVersion);
/// <summary>Lets PluginExports log through this plugin's host (the base Log is protected).</summary>
internal void LogFromExport(string message) => Log(message);
// Where the tiles, portals.tsv, locations.json and the player's atlas.txt/recalls.txt live.
// From RYNTHNAV_NAVDATA, else "navDataDir" in %APPDATA%\RynthCore\rynthnav.json, else the
// default (the folder the release zip and the launcher's tile updater fill). See NavDataConfig.