fix(interaction): publish pending keyboard pickups
Route F-key pickup through the same ItemHolder backpack placement entry point as double-click activation so the inventory reserves the destination slot before the request is sent.
This commit is contained in:
parent
047a4c83b5
commit
52dbb5749e
4 changed files with 43 additions and 17 deletions
|
|
@ -1419,6 +1419,21 @@ public sealed class ItemInteractionControllerTests
|
|||
Assert.Equal(2, h.Uses.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void KeyboardPickup_PublishesPendingDestinationBeforeRequest()
|
||||
{
|
||||
var h = new Harness();
|
||||
const uint item = 0x70000A0Bu;
|
||||
var pending = new List<(uint Item, uint Container, int Placement)>();
|
||||
h.Controller.PendingBackpackPlacementRequested +=
|
||||
(objectId, container, placement) => pending.Add((objectId, container, placement));
|
||||
|
||||
Assert.True(h.Controller.PlaceWorldItemInBackpack(item));
|
||||
|
||||
Assert.Equal(new[] { (item, Player, 0) }, pending);
|
||||
Assert.Equal(new[] { (item, Player, 0) }, h.BackpackPlacements);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ResetSession_ClearsTargetBusyThrottleAndConsumedClickState()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue