fix(items): complete retail corpse looting feedback

Route corpse Use through the shared ItemHolder policy so Stuck corpses open instead of being sent as pickup requests. Restore the framed, horizontally resizable external-container strip and use a compact initial width. Port retail's target-list pending item projection so loot is marked in the chosen inventory slot without changing canonical ownership before the server confirms.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-17 16:53:49 +02:00
parent 20ce67b625
commit d51a0fc825
13 changed files with 275 additions and 102 deletions

View file

@ -21,6 +21,10 @@ public sealed class ExternalContainerController : IItemListDragHandler, IRetaine
private const float ItemCellSize = 32f;
private const float ContainerCellSize = 36f;
// User-directed retained default: the raw 800-pixel LayoutDesc remains
// horizontally reachable by resize/persistence but opens less wide.
internal const float DefaultContentWidth = 700f;
internal const float MinimumContentWidth = 160f;
private readonly ExternalContainerState _state;
private readonly ClientObjectTable _objects;
@ -144,6 +148,32 @@ public sealed class ExternalContainerController : IItemListDragHandler, IRetaine
contentsEmptySprite,
containerEmptySprite);
/// <summary>
/// Retail's root authors only the tiled center surface; the common floating-window
/// bevel surrounds it. Its Left/Right edge rules stretch every horizontal list and
/// pin the close button, so this strip resizes on X only.
/// </summary>
internal static RetailWindowFrame.Options CreateWindowOptions(UiElement root)
=> new()
{
WindowName = WindowNames.ExternalContainer,
Chrome = RetailWindowChrome.NineSlice,
Left = root.Left,
Top = root.Top,
ContentWidth = Math.Min(root.Width, DefaultContentWidth),
ContentHeight = root.Height,
MinWidth = MinimumContentWidth + 2f * RetailChromeSprites.Border,
Visible = false,
Draggable = true,
Resizable = true,
ResizeX = true,
ResizeY = false,
ResizableEdges = ResizeEdges.Left | ResizeEdges.Right,
ConstrainDragToParent = true,
ConstrainResizeToParent = true,
DrawChromeCenter = false,
};
public void Tick()
{
uint root = _state.CurrentContainerId;