feat(mosstank): add VTank-style automation PoC

This commit is contained in:
Erik 2026-08-27 18:57:21 +02:00
parent f6fe0f2a4f
commit 4e6e9bc9d9
212 changed files with 49462 additions and 416 deletions

View file

@ -97,7 +97,8 @@ internal sealed record InteractionRetainedUiDependencies(
AcDream.App.Rendering.Packs.RenderPackCatalogSource? RenderPackCatalog = null,
Func<AcDream.App.Rendering.Packs.RenderPackDiagnosticsSnapshot>?
RenderPackDiagnostics = null,
string? ScreenshotsDirectory = null)
string? ScreenshotsDirectory = null,
AppAutomationSurface? Automation = null)
{
public RuntimeActionState Actions => Runtime.ActionOwner;
@ -429,6 +430,13 @@ internal sealed class RetailInteractionRetainedUiCompositionFactory
return false;
activeSession.SendSell(vendorGuid, items);
return true;
},
sendSalvage: (toolGuid, itemGuids) =>
{
if (session.CurrentSession is not { } activeSession || !session.IsInWorld)
return false;
activeSession.SendSalvage(toolGuid, itemGuids);
return true;
});
}
@ -1230,7 +1238,10 @@ internal sealed class RetailInteractionRetainedUiCompositionFactory
$"Screenshot failed: {error}",
RetailLogTextType.ClientLocal);
}
});
},
ProjectileDebugSamples: d.Automation is null
? null
: d.Automation.CaptureProjectileDebugSamples);
RetailUiRuntime runtime = lease.Mount(
() => RetailUiRuntime.CreateUninitialized(bindings));
checkpoint(InteractionRetainedUiCompositionPoint.UiRuntimeMounted);

View file

@ -83,6 +83,7 @@ internal sealed record SessionPlayerDependencies(
CombatFeedbackSlot CombatFeedback,
TransferableResourceSlot<PortalTunnelPresentation> PortalTunnelFallback,
Action<string> Log,
Func<string, bool>? TryHandlePluginCommand,
/// <summary>Campaign LA slice LA1: the shared per-session status-event
/// writer, no-op when <see cref="RuntimeOptions.StatusFilePath"/> was
/// not configured.</summary>
@ -112,6 +113,7 @@ internal sealed record SessionPlayerResult(
DatSpawnClaimHydrationClassifier SpawnClaimHydration,
LiveSessionController LiveSession,
LiveEntityHydrationController Hydration,
LiveEntityDeletionController Deletion,
LiveEntityNetworkUpdateController NetworkUpdates,
LiveEntityLivenessController Liveness,
LiveEntitySessionController SessionEvents,
@ -357,7 +359,8 @@ internal sealed class SessionPlayerCompositionPhase
// LiveSessionCommandSurface has no dependencies of its own, so
// hoisting its construction is inert; the later site now reuses
// this instance instead of constructing a second one.
var liveSessionCommands = new LiveSessionCommandSurface();
var liveSessionCommands = new LiveSessionCommandSurface(
d.TryHandlePluginCommand);
var settingsTargets = new RuntimeSettingsTargets(
new SilkRuntimeDisplayWindowTarget(d.Window),
live.DrawDispatcher,
@ -1332,6 +1335,7 @@ internal sealed class SessionPlayerCompositionPhase
spawnClaimClassifier,
liveSession,
hydration,
deletion,
networkUpdates,
liveness,
sessionEvents,