From 6130eb7d04dfe97d14dad258794467821d57ba42 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 12 Oct 2026 19:30:30 +0200 Subject: [PATCH] LootTests: a station is active once built, so the pickup taker's second bay is equipped before Activate Station() activates the entity and TryEquip refuses while active; the second Crate at (2,2) failed for that reason, not a hull rule. Builds. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/LootTests.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/LootTests.cs b/tests/Aetheria.Shared.Tests/LootTests.cs index 62763403f..02998bca7 100644 --- a/tests/Aetheria.Shared.Tests/LootTests.cs +++ b/tests/Aetheria.Shared.Tests/LootTests.cs @@ -139,11 +139,13 @@ public sealed class LootTests : IDisposable return ship; } - private static Entity Station(Lab lab, float3 at, bool stocked = true) + private static Entity Station(Lab lab, float3 at, bool stocked = true, bool secondBay = false) { var hull = lab.Items.ItemData.RefOf(lab.Items.ItemData.GetByName("Hub")); var station = new OrbitalEntity(lab.Items, lab.Zone, new EquippableItem { Data = hull, Durability = 1000000, Lot = lab.Lot++ }, default, new EntitySettings()); Assert.True(station.TryEquip(lab.Make("Crate"), new int2(1, 1))); + // Equipping is refused once a station is active, so a second bay goes in before Activate. + if (secondBay) Assert.True(station.TryEquip(lab.Make("Crate"), new int2(2, 2))); if (stocked) { var spare = lab.Make("Spare"); @@ -325,8 +327,7 @@ public sealed class LootTests : IDisposable public void TryPickUpStoresAndRemoves() { var lab = Build(); - var taker = Station(lab, float3(0, 0, 0), stocked: false); - Assert.True(taker.TryEquip(lab.Make("Crate"), new int2(2, 2))); + var taker = Station(lab, float3(0, 0, 0), stocked: false, secondBay: true); Assert.Equal(2, taker.CargoBays.Count); // The first bay is full, so the first bay that accepts the item is the second. while (taker.CargoBays[0].TryStore(lab.Make("Spare"))) { }