extern alias engine;
using engine::Wizard.Battle.View.Vfx;
namespace SVSim.BattleNode.Sessions.Engine;
/// The node's receive-conductor VfxMgr (design Headless-Conductor, Candidate B). The engine's
/// receive CONDUCTOR fuses each authoritative mutation INTO an delegate and
/// registers it via VfxMgr.RegisterSequentialVfx (NetworkOperationCollectionBase.cs:63/73/86 —
/// the play move; the deal seats its hand synchronously before any VFX). The shared/authored
/// NO-OPS registration (correct for the DIRECT ActionProcessor path the M2-M12
/// oracles use, where the mutation already ran synchronously before the VFX was built). On the RECEIVE
/// path the mutation IS the delegate, so the shadow must RUN it.
///
/// This subclass is wired ONLY through (the
/// node's own factory). The HeadlessFixture oracle tests construct their VfxMgr via their own
/// HeadlessContentsCreator (a plain new VfxMgr()), so the M2-M12 direct-path oracles are
/// untouched BY CONSTRUCTION.
///
/// It executes ONLY top-level registrations. It deliberately does NOT
/// recurse into container VFX (Sequential/Parallel) — those carry cosmetic nested VFX built over the
/// no-op view leaves, which must stay un-played. The authoritative mutations the receive conductor
/// cares about are always registered as a top-level InstantVfx.
internal sealed class HeadlessConductorVfxMgr : VfxMgr
{
public override void RegisterSequentialVfx(T vfx)
{
if (vfx is InstantVfx instant)
{
instant.Run();
}
// Non-InstantVfx (containers, waits, cosmetic vfx) are dropped — no render loop headless.
}
}