From c0fb26fca117d4f71fd9c438cdee98d527524ace Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 21:39:18 +0200 Subject: [PATCH] Pin that a triggered burst is not ready before its first round Co-Authored-By: Claude Opus 5.5 --- .../FireControlPerWeaponTests.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs b/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs index f61c75fe9..5a3578987 100644 --- a/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs +++ b/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs @@ -678,4 +678,20 @@ public sealed class FireControlPerWeaponTests : IDisposable Assert.Equal(0, refused.Sounds); Assert.True(fired.Heat - refused.Heat > 5f, $"a refused weapon adds no charge heat ({refused.Heat} vs {fired.Heat})"); } + // A triggered burst has not started its cooldown, but it is not ready either: pulled again before its first round + // flies it would restart the burst. Kills: CanFire that reads the cooldown alone. + [Fact] + public void ATriggeredBurstIsNotReadyBeforeItsFirstRound() + { + var r = Build(range: 100f); + r.Shooter.Target.Value = null; + Aim(r, float2(0, 1)); + var weapon = (InstantWeapon) r.Gun.Weapon; + r.Zone.Update(.01f); // resolves the gun's stats, which size the burst + Assert.True(weapon.CanFire); + + weapon.Activate(); + + Assert.False(weapon.CanFire); + } }