fix(items): finish corpse pickup and combat switching
Port retail's first-slot ShowPendingInPlayer path for double-click loot and carry the current owned-container destination through deferred pickup. Retire the previous ground-container view as soon as a replacement is requested so its range close cannot cancel ACE's active MoveTo chain. Preserve active-combat weapon intent across ACE's authoritative wand-to-missile stance tail while leaving peace-mode switches unchanged. Release build succeeds and all 5,885 tests pass with five intentional skips. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
d51a0fc825
commit
0392c6d721
17 changed files with 631 additions and 81 deletions
|
|
@ -17,7 +17,7 @@ public sealed class ExternalContainerStateTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void ReplacementPublishesOldAndNewExactlyOnce()
|
||||
public void ReplacementRetiresOldImmediatelyThenOpensNewOnViewContents()
|
||||
{
|
||||
var state = new ExternalContainerState();
|
||||
var changes = new List<ExternalContainerTransition>();
|
||||
|
|
@ -25,15 +25,23 @@ public sealed class ExternalContainerStateTests
|
|||
state.RequestOpen(1u);
|
||||
state.ApplyViewContents(1u);
|
||||
state.RequestOpen(2u);
|
||||
|
||||
Assert.Equal(0u, state.CurrentContainerId);
|
||||
Assert.Equal(2u, state.RequestedContainerId);
|
||||
|
||||
state.ApplyViewContents(2u);
|
||||
state.ApplyViewContents(2u);
|
||||
|
||||
Assert.Equal(2, changes.Count);
|
||||
Assert.Equal(3, changes.Count);
|
||||
Assert.Equal(ExternalContainerTransitionKind.Opened, changes[0].Kind);
|
||||
Assert.Equal(
|
||||
new ExternalContainerTransition(
|
||||
ExternalContainerTransitionKind.Replaced, 1u, 2u),
|
||||
ExternalContainerTransitionKind.ReplacementRequested, 1u, 2u),
|
||||
changes[1]);
|
||||
Assert.Equal(
|
||||
new ExternalContainerTransition(
|
||||
ExternalContainerTransitionKind.Opened, 0u, 2u),
|
||||
changes[2]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -49,14 +57,14 @@ public sealed class ExternalContainerStateTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void RefusedReplacementRestoresCurrentAsExpectedRoot()
|
||||
public void RefusedReplacementLeavesTheRetiredRootClosed()
|
||||
{
|
||||
var state = Open(1u);
|
||||
state.RequestOpen(2u);
|
||||
|
||||
Assert.True(state.ApplyUseDone(0x550u));
|
||||
Assert.Equal(1u, state.CurrentContainerId);
|
||||
Assert.Equal(1u, state.RequestedContainerId);
|
||||
Assert.Equal(0u, state.CurrentContainerId);
|
||||
Assert.Equal(0u, state.RequestedContainerId);
|
||||
Assert.False(state.ApplyViewContents(2u));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue