feat(mosstank): add VTank-style automation PoC
This commit is contained in:
parent
f6fe0f2a4f
commit
4e6e9bc9d9
212 changed files with 49462 additions and 416 deletions
|
|
@ -395,6 +395,11 @@ public sealed class HeadlessPluginSessionTests
|
|||
|
||||
private static string FixtureAssemblyPath()
|
||||
{
|
||||
string fileName = "AcDream.Plugin.Tests.Fixtures.HostPlugin.dll";
|
||||
string colocated = Path.Combine(AppContext.BaseDirectory, fileName);
|
||||
if (File.Exists(colocated))
|
||||
return colocated;
|
||||
|
||||
string configuration = new DirectoryInfo(AppContext.BaseDirectory)
|
||||
.Parent!.Name;
|
||||
string root = FindRepoRoot(AppContext.BaseDirectory);
|
||||
|
|
@ -405,7 +410,7 @@ public sealed class HeadlessPluginSessionTests
|
|||
"bin",
|
||||
configuration,
|
||||
"net10.0",
|
||||
"AcDream.Plugin.Tests.Fixtures.HostPlugin.dll");
|
||||
fileName);
|
||||
}
|
||||
|
||||
private static string FindRepoRoot(string start)
|
||||
|
|
|
|||
|
|
@ -2736,6 +2736,21 @@ public sealed class HeadlessSessionHostTests
|
|||
Assert.False(frameHost.CanAdvancePlayer);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CommandMovementFrameIsMarkedPersistentWithoutMutatingOwner()
|
||||
{
|
||||
using var movement = new RuntimeLocalPlayerMovementState();
|
||||
var command = new MovementInput(TurnLeft: true);
|
||||
movement.SetCommandInput(command);
|
||||
var source = new HeadlessMovementInputSource(movement);
|
||||
|
||||
MovementInput captured = source.Capture();
|
||||
|
||||
Assert.True(captured.TurnLeft);
|
||||
Assert.True(captured.IsPersistentCommand);
|
||||
Assert.Equal(command, movement.CommandInput);
|
||||
}
|
||||
|
||||
private static LiveSessionHost CreateInertLiveSessionHost()
|
||||
{
|
||||
var controller = new LiveSessionController(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue