ConsumableAiTests: refit the gun the way a docked ship does
Not yet verified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
99333cf1a2
commit
7e92c7da93
1 changed files with 4 additions and 0 deletions
|
|
@ -332,8 +332,12 @@ public sealed class ConsumableAiTests : IDisposable
|
|||
Assert.Equal(1, s.Carried);
|
||||
|
||||
var longGun = (EquippableItem) s.Items.CreateInstance(s.Items.CreateLot(s.LongGun, s.Maker, .5f));
|
||||
Assert.True(s.Zone.Remove(s.Agent)); // refitting is a docked ship's act: out of the zone and inactive
|
||||
s.Agent.Deactivate();
|
||||
Assert.NotNull(s.Agent.TryUnequip(s.Agent.Equipment.Single(e => e.Behaviors.OfType<Weapon>().Any())));
|
||||
Assert.True(s.Agent.TryEquip(longGun, HardpointCell));
|
||||
s.Zone.Admit(s.Agent, piloted: false); // back in, the agent's Minion keeps its CombatState
|
||||
s.Place(30f, 0f);
|
||||
s.Zone.Update(.05f);
|
||||
s.Zone.Update(.05f);
|
||||
var refit = (float) typeof(CombatState).GetField("_optimumRange", Private).GetValue(s.State);
|
||||
|
|
|
|||
Loading…
Reference in a new issue