From f856021997d77b131db9c770ac9efde55955eb3c Mon Sep 17 00:00:00 2001 From: Nibu Date: Wed, 11 Nov 2026 07:16:40 +0000 Subject: [PATCH] Ammunition run: say the real window (heat death ~260 s, not ten minutes) and drop a dead debug line Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/ServerShared/Scenarios/Arcs.cs | 4 ++-- Assets/Scripts/ServerShared/Scenarios/Pursuit.cs | 4 ++-- tests/Aetheria.Shared.Tests/ScenarioAmmunitionRunTests.cs | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/ServerShared/Scenarios/Arcs.cs b/Assets/Scripts/ServerShared/Scenarios/Arcs.cs index 459ee4e8b..8846d006b 100644 --- a/Assets/Scripts/ServerShared/Scenarios/Arcs.cs +++ b/Assets/Scripts/ServerShared/Scenarios/Arcs.cs @@ -21,8 +21,8 @@ public sealed class Arcs : Scenario public static readonly CultMath.float2 Bow = float2(0, 400), Stern = float2(0, -400), Turret = float2(600, 300), Port = float2(-400, 0), Starboard = float2(400, 0); - // Crates of ammunition each shooter's hold is stocked with: the measured draw over a run (ScenarioAmmunitionRunTests: ten minutes of play, - // or until the shooter dies of heat) plus half again and one. The turret drew 14 Ammo with the player in its range; the player drew 27 Ammo + // Crates of ammunition each shooter's hold is stocked with: the measured draw over a run (ScenarioAmmunitionRunTests: at most ten minutes of play, and in + // practice the ~260 s a shooter holding every gun down lasts before it dies of heat; a pilot who vents heat is unmeasured) plus half again and one. The turret drew 14 Ammo with the player in its range; the player drew 27 Ammo // holding every gun down. The guided launchers fire only on a lock, which that run cannot give them, so they carry the default three crates. public const int TurretAmmoCrates = 22, PlayerAmmoCrates = 42, PlayerMissileCrates = 3; diff --git a/Assets/Scripts/ServerShared/Scenarios/Pursuit.cs b/Assets/Scripts/ServerShared/Scenarios/Pursuit.cs index 157ea4f1f..2e490a2a6 100644 --- a/Assets/Scripts/ServerShared/Scenarios/Pursuit.cs +++ b/Assets/Scripts/ServerShared/Scenarios/Pursuit.cs @@ -8,8 +8,8 @@ public sealed class Pursuit : Scenario // cloud breaking a sensor's lock, and well outside the 40 at which AStrongCloseSensorBurnsThrough shows a close // sensor burning through. private const float Astern = 300; - // Crates each shooter's hold is stocked with: the measured draw over a run (ScenarioAmmunitionRunTests: ten minutes of play, or until the - // shooter dies of heat) plus half again and one where the hold has room. The player laid four crates of Mines and drew + // Crates each shooter's hold is stocked with: the measured draw over a run (ScenarioAmmunitionRunTests: at most ten minutes of play, and in + // practice the ~250-270 s a shooter holding every gun down lasts before it dies of heat; a pilot who vents heat is unmeasured) plus half again and one where the hold has room. The player laid four crates of Mines and drew // 33 Ammo; its hold takes 54 crates after five consumables and Mines, so its Ammo stops at 39. The pursuer drew 31 Ammo and one Missiles. A launcher // that drew under a reload carries the default three crates. public const int MineCrates = 7, PlayerAmmoCrates = 39, PlayerMissileCrates = 3, PursuerAmmoCrates = 47, PursuerMissileCrates = 3; diff --git a/tests/Aetheria.Shared.Tests/ScenarioAmmunitionRunTests.cs b/tests/Aetheria.Shared.Tests/ScenarioAmmunitionRunTests.cs index 3a1921cbd..43dec542a 100644 --- a/tests/Aetheria.Shared.Tests/ScenarioAmmunitionRunTests.cs +++ b/tests/Aetheria.Shared.Tests/ScenarioAmmunitionRunTests.cs @@ -9,7 +9,7 @@ using Xunit; // the run early. The draw is counted in crates (one reload per crate) and each drawn crate is put back, so the count is not capped by the stock. public sealed partial class RunStartTests { - // Ten minutes: longer than any session the Arcs and Pursuit briefs ask a tester for. + // Ceiling of the window: a shooter holding every gun down dies of heat at ~250-270 s, so the draws are bounded by heat death, not by this. public const float RunSeconds = 600f; // Crates each armed entity of the scenario draws over the run, keyed by (index in the stage's entities, -1 for the player; ammunition name), @@ -50,7 +50,6 @@ public sealed partial class RunStartTests if (playerFires) foreach (var weapon in player.Weapons.Where(weapon => weapon.WeaponData.AmmoType.IsSet())) weapon.Activate(); arena.Update(SimClock.GameStep); - if (false) System.IO.File.AppendAllText(System.Environment.GetEnvironmentVariable("TMPDIR") + "/dbg.txt", $"{scenario.Name} t={tick*SimClock.GameStep:F0} active={player.Active} me={player.Position} " + string.Join(",", player.Weapons.Select(w => w.WeaponData.AmmoType.IsSet() ? w.Ammo + "/" + w.Reserve : "e")) + "\n"); foreach (var (entity, index) in shooters) foreach (var key in entity.Weapons.Where(weapon => weapon.WeaponData.AmmoType.IsSet()).Select(weapon => weapon.WeaponData.AmmoType.Key).Distinct()) {