From ad503059e5f75d3ff298ff90bf7673c4f7340fc9 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 18 Oct 2026 21:18:20 +0200 Subject: [PATCH] RunGoalTests: LoadoutCells reads the fixture's cache Co-Authored-By: Claude Sonnet 5.5 --- tests/Aetheria.Shared.Tests/RunGoalTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/RunGoalTests.cs b/tests/Aetheria.Shared.Tests/RunGoalTests.cs index d2bc84a8f..9db173508 100644 --- a/tests/Aetheria.Shared.Tests/RunGoalTests.cs +++ b/tests/Aetheria.Shared.Tests/RunGoalTests.cs @@ -98,9 +98,9 @@ public sealed partial class RunStartTests .Select(slot => $"{slot.Position.x},{slot.Position.y},{slot.Rotation},{items.ItemData.Get(slot.Design).Name},{(slot.Product.IsSet() ? items.ItemData.Get(slot.Product).Name : "-")}").ToArray(); } - private static string[] LoadoutCells(CultCache cache, Loadout loadout) => + private string[] LoadoutCells(Loadout loadout) => loadout.Slots.OrderBy(slot => slot.Position.x).ThenBy(slot => slot.Position.y) - .Select(slot => $"{slot.Position.x},{slot.Position.y},{slot.Rotation},{cache.Get(slot.Design).Name},{(slot.Product.IsSet() ? cache.Get(slot.Product).Name : "-")}").ToArray(); + .Select(slot => $"{slot.Position.x},{slot.Position.y},{slot.Rotation},{_cache.Get(slot.Design).Name},{(slot.Product.IsSet() ? _cache.Get(slot.Product).Name : "-")}").ToArray(); private LoadoutGenerator GeneratorFor(Galaxy galaxy, ItemManager items, Faction faction, uint seed) { @@ -183,7 +183,7 @@ public sealed partial class RunStartTests { var items = LoggingItems(new List()); var boss = Assert.Single(BossZonePack(galaxy, items, galaxy.Exit, seed: seed).Entities, entity => entity.Boss); - Assert.Equal(LoadoutCells(_cache, loadout), Cells(items, boss)); + Assert.Equal(LoadoutCells(loadout), Cells(items, boss)); Assert.All(boss.Equipment, entry => Assert.DoesNotContain(items.GetData(entry.item).Behaviors, behavior => behavior is PickupData)); Assert.Empty(boss.CargoContents.SelectMany(bay => bay)); Assert.Empty(boss.DockingBayContents.SelectMany(bay => bay));