From f2ecc96a3c6f243d8dfd3dd5d7f93e812ca2bbdf Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 10 Oct 2026 10:57:52 +0200 Subject: [PATCH] ConsumableAiTests: the lock held on someone else is a real lock The locker aimed at the prey was not hostile to it, so no lock ever built and the whose-target mutant survived. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/ConsumableAiTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Aetheria.Shared.Tests/ConsumableAiTests.cs b/tests/Aetheria.Shared.Tests/ConsumableAiTests.cs index cc60b78e1..be417442b 100644 --- a/tests/Aetheria.Shared.Tests/ConsumableAiTests.cs +++ b/tests/Aetheria.Shared.Tests/ConsumableAiTests.cs @@ -188,6 +188,7 @@ public sealed class ConsumableAiTests : IDisposable for (var i = 0; i < scene.Lockers.Count; i++) { var locker = scene.Lockers[i]; + if (!lockers[i].onAgent) locker.SetIff(scene.Prey, true); // a lock builds only on a hostile target locker.SetTarget(lockers[i].onAgent ? scene.Agent : (Entity) scene.Prey); Aim(locker, towards: true); } @@ -257,6 +258,7 @@ public sealed class ConsumableAiTests : IDisposable var elsewhere = Build(100, (.9f, false)); HoldLocks(elsewhere); + Assert.Equal(.9f, elsewhere.Lockers[0].Weapons.OfType().Single().Lock, 3); // the lock exists, on the prey elsewhere.Store(elsewhere.VentDesign); Face(elsewhere, 0); Settle(elsewhere);