Tick the zone before reading the cooldown in the stance tests

BurstCount is set by the first Execute, so a trigger pulled with no tick has no burst pending. The
tests now run one tick and read whether the cooldown started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-29 21:27:28 +02:00
commit 7c1b1cd3d8

View file

@ -250,7 +250,9 @@ public sealed class IffAndCombatTests : IDisposable
weapon.Activate();
Assert.True(weapon.CanFire); // Trigger() was safed: no burst was started
zone.Update(.01f);
Assert.True(weapon.CanFire); // Trigger() was safed: no burst fired, so no cooldown
}
[Fact]
@ -265,8 +267,9 @@ public sealed class IffAndCombatTests : IDisposable
shooter.SetIff(target, true);
weapon.Activate();
zone.Update(.01f);
Assert.False(weapon.CanFire); // Trigger() ran: a burst is pending
Assert.False(weapon.CanFire); // Trigger() ran: the burst fired and the cooldown runs
}
[Fact]
@ -278,8 +281,9 @@ public sealed class IffAndCombatTests : IDisposable
var weapon = (InstantWeapon) shooter.Equipment.Single(e => e.Behaviors.Any(b => b is Weapon)).Behaviors.Single(b => b is Weapon);
weapon.Activate();
zone.Update(.01f);
Assert.False(weapon.CanFire); // Trigger() ran: a burst is pending
Assert.False(weapon.CanFire); // Trigger() ran: the burst fired and the cooldown runs
}
[Fact]