fix(interaction): close selection lifecycle review gaps
Bind queued actions and pending inventory requests to exact live incarnations, separate optimistic placement from authoritative responses, and serialize retail-style inventory ownership across UI surfaces. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
d2bb5af453
commit
5acc3f01cf
23 changed files with 2635 additions and 168 deletions
|
|
@ -519,6 +519,29 @@ public sealed class ToolbarController : IItemListDragHandler, IRetainedPanelCont
|
|||
uint player = _playerGuid?.Invoke() ?? 0u;
|
||||
if (player == 0 || _repo.Get(payload.ObjId) is null)
|
||||
return;
|
||||
if (_itemInteraction is not null)
|
||||
{
|
||||
Func<bool> dispatch = () =>
|
||||
{
|
||||
if (_sendPutItemInContainer is null)
|
||||
return false;
|
||||
_sendPutItemInContainer(payload.ObjId, player, 0);
|
||||
return true;
|
||||
};
|
||||
if (_itemInteraction.IsOwnedByPlayer(payload.ObjId))
|
||||
_itemInteraction.TryDispatchPendingBackpackPlacement(
|
||||
payload.ObjId,
|
||||
player,
|
||||
0,
|
||||
InventoryRequestKind.PutInContainer,
|
||||
dispatch);
|
||||
else
|
||||
_itemInteraction.TryDispatchInventoryRequest(
|
||||
InventoryRequestKind.Pickup,
|
||||
payload.ObjId,
|
||||
dispatch);
|
||||
return;
|
||||
}
|
||||
_sendPutItemInContainer?.Invoke(payload.ObjId, player, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue