ConsumableSupplyTests: count consumables in docking-bay holds too (a station's first bay is its dock)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-10 05:34:47 +02:00
commit c2e46a4637

View file

@ -132,7 +132,8 @@ public sealed class ConsumableSupplyTests : IDisposable
}
private static ConsumableItem[] Consumables(EntityPack pack) =>
pack.CargoContents.SelectMany(bay => bay).Select(entry => entry.item).OfType<ConsumableItem>().ToArray();
pack.CargoContents.Concat(pack.DockingBayContents ?? Array.Empty<(int2 position, ItemInstance item)[]>())
.SelectMany(bay => bay).Select(entry => entry.item).OfType<ConsumableItem>().ToArray();
// Distinct, fixed seeds: the same 400 generators on every run.
private static uint SeedOf(int i) => (uint) (i * 7919 + 13);