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

@ -36,11 +36,17 @@ internal sealed class LiveSessionAppSource
/// retained UI may keep this surface, while the displaced route itself becomes
/// inert before inbound subscriptions detach.
/// </summary>
internal sealed class LiveSessionCommandSurface : ICommandBus
internal sealed class LiveSessionCommandSurface : IPluginCommandBus
{
private readonly object _gate = new();
private readonly Func<string, bool>? _tryHandlePluginCommand;
private LiveSessionCommandRouter? _active;
public LiveSessionCommandSurface(Func<string, bool>? tryHandlePluginCommand = null)
{
_tryHandlePluginCommand = tryHandlePluginCommand;
}
public ILiveSessionCommandRouting Attach(LiveSessionCommandRouter route)
{
ArgumentNullException.ThrowIfNull(route);
@ -65,6 +71,9 @@ internal sealed class LiveSessionCommandSurface : ICommandBus
route?.Publish(command);
}
public bool TryHandlePluginCommand(string commandLine) =>
_tryHandlePluginCommand?.Invoke(commandLine) == true;
private void Release(LiveSessionCommandRouter expected)
{
expected.Dispose();

View file

@ -455,6 +455,7 @@ internal sealed class LiveSessionRuntimeFactory
OnUseDone: error =>
{
_domain.Inventory.ExternalContainers.ApplyUseDone(error);
_domain.Actions.SpellCast.CompleteUse(error);
_domain.Actions.Transactions.CompleteUse(error);
},
_domain.Inventory.ItemMana,