From 058da60212f492198f7b467a0a5899dcdc40c016 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 22 Jun 2026 22:35:51 +0200 Subject: [PATCH] feat(D.2b): wire PaperdollController into the inventory frame (Slice 1) Adds the _paperdollController field and PaperdollController.Bind(...) call in the inventory-frame block alongside InventoryController, wiring up the paperdoll equip slots with their icon composer and wield action. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/AcDream.App/Rendering/GameWindow.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index 350261e8..386a68cc 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -623,6 +623,8 @@ public sealed class GameWindow : IDisposable private AcDream.App.UI.Layout.SelectedObjectController? _selectedObjectController; // Phase D.2b-B — inventory controller (backpack grid + pack-selector + burden meter). private AcDream.App.UI.Layout.InventoryController? _inventoryController; + // Phase D.2b Sub-phase C — paperdoll equip-slot controller (wield drag handler). + private AcDream.App.UI.Layout.PaperdollController? _paperdollController; // Phase D.2b Task 9 — plugin UI registrations buffered before OnLoad; drained in OnLoad. private readonly AcDream.App.Plugins.BufferedUiRegistry? _uiRegistry; // Phase I.2: ImGui debug panel ViewModel. Lives for as long as @@ -2244,6 +2246,14 @@ public sealed class GameWindow : IDisposable sendPutItemInContainer: (item, container, placement) => _liveSession?.SendPutItemInContainer(item, container, placement)); + // Slice 1: bind the paperdoll equip slots (same imported subtree) — show equipped gear + + // wield-on-drop. Unwield is handled by InventoryController (drag an equipped item to the grid). + _paperdollController = AcDream.App.UI.Layout.PaperdollController.Bind( + invLayout, Objects, + playerGuid: () => _playerServerGuid, + iconIds: (type, icon, under, over, effects) => iconComposer.GetIcon(type, icon, under, over, effects), + sendWield: (item, mask) => _liveSession?.SendGetAndWieldItem(item, mask)); + Console.WriteLine("[D.2b-B] retail inventory window from LayoutDesc importer (0x21000023)."); } else Console.WriteLine("[D.2b-B] inventory: LayoutDesc 0x21000023 not found.");