feat(render): implement Campaign AR and terrain fidelity

This commit is contained in:
Erik 2026-08-22 13:13:29 +02:00
parent 99cf26e00c
commit 7a5f96ede5
368 changed files with 50611 additions and 950 deletions

View file

@ -1,14 +1,16 @@
using System.Runtime.Loader;
using AcDream.Plugin.Abstractions;
using AcDream.Plugin.Abstractions.Rendering;
namespace AcDream.Core.Plugins;
/// <summary>
/// Outcome of a plugin load attempt.
/// <para>On success, <see cref="Plugin"/> is the instantiated plugin, <see cref="LoadContext"/>
/// owns its assembly, and <see cref="Error"/> is null.</para>
/// <para>On success, at least one of <see cref="Plugin"/> or
/// <see cref="RenderPackPlugin"/> is instantiated, <see cref="LoadContext"/>
/// owns the assembly, and <see cref="Error"/> is null.</para>
/// <para>On failure, <see cref="Error"/> describes what went wrong. A partial
/// <see cref="Plugin"/> and/or <see cref="LoadContext"/> may still be present;
/// entry-point instances and/or <see cref="LoadContext"/> may still be present;
/// the caller owns their cleanup. The loader never requests collectible unload
/// itself because the session must first roll back host registrations.</para>
/// </summary>
@ -16,8 +18,11 @@ public sealed record LoadedPlugin(
PluginManifest Manifest,
IAcDreamPlugin? Plugin,
AssemblyLoadContext? LoadContext,
Exception? Error)
Exception? Error,
IRenderPackPlugin? RenderPackPlugin = null)
{
public bool Success =>
Plugin is not null && LoadContext is not null && Error is null;
(Plugin is not null || RenderPackPlugin is not null)
&& LoadContext is not null
&& Error is null;
}