feat(ui): drive toolbar use state from selection
Port the retail selected-object availability predicate into Core and project it through the shared interaction owner. The imported hand now follows canonical selection/object notices, keeps weapon and targeted-tool activation on the existing wield/use cursor paths, and ghosts empty or explicitly unusable selections per the connected UX requirement. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
0134122c28
commit
60387668d0
11 changed files with 269 additions and 16 deletions
|
|
@ -107,7 +107,7 @@ accepted-divergence entries (#96, #49, #50).
|
|||
|
||||
---
|
||||
|
||||
## 3. Documented approximation (AP) — 88 active rows
|
||||
## 3. Documented approximation (AP) — 89 active rows
|
||||
|
||||
Wave-0 UI ledger repair (2026-07-10) retired stale AP-38, resolved the AP-84
|
||||
collision, restored overwritten paperdoll rows as AP-92/AP-93, and registered
|
||||
|
|
@ -218,6 +218,7 @@ AP-94..AP-112 for the confirmed retail-UI completion gaps.
|
|||
| AP-119 | Equal-generation CreateObject refresh applies the packet's complete `PhysicsDesc` to the existing `EntityEffectProfile`, including replacing its network sound/PES-table/default-script description. Retail's equal-`INSTANCE_TS` branch applies the individual ObjDesc/Parent-or-Position/Movement/State/Vector/WeenieDesc tail and does not call `CPhysicsObj::set_description` again. | `src/AcDream.App/Physics/LiveEntityNetworkUpdateController.cs` (`ILiveEntitySameGenerationUpdateSink.OnDescription`); `LiveEntitySameGenerationUpdateRouter.cs` | Existing spell/projectile/portal VFX tests and connected behavior were accepted with this refresh. Slice 4 records and isolates it rather than silently changing DAT-effect ownership during an architecture extraction. | A same-generation CreateObject whose PeTable/sound/default-script fields differ from the original can replace effect lookup state where retail would retain the original table, producing a different later typed effect. | `SmartBox::HandleCreateObject @ 0x00454C80`; `CPhysicsObj::set_description @ 0x00514F40`; `docs/research/2026-07-13-retail-projectile-vfx-pseudocode.md` |
|
||||
| AP-120 | `ObjectTableWiring.ApplyEntitySpawn` publishes the CreateObject's WeenieDesc/item state before the same-generation physics update tail. Retail applies WeenieDesc after ObjDesc, Parent-or-Position/Pickup, Movement, State, and Vector. | `src/AcDream.Core.Net/ObjectTableWiring.cs` (`ApplyEntitySpawn`); `src/AcDream.App/World/LiveEntitySameGenerationUpdateRouter.cs` | Core.Net owns item-table ingestion before App callbacks and the current single-thread FIFO prevents a second network packet from interleaving; changing publication order crosses the Core.Net/App ownership boundary and requires a separately tested event transaction. | A synchronous item-table observer can see the refreshed WeenieDesc while the same object's physics/parent/state still reflects the prior snapshot; retail observers see the completed physics tail first. | `SmartBox::HandleCreateObject @ 0x00454C80`; `ACCObjectMaint::CreateObject @ 0x00558870` |
|
||||
| AP-121 | The `/framerate` command persists acdream's live ShowFps value in the modern `settings.json` Display bag after performing retail's live toggle/notice behavior. The named retail `DoFrameRate` body itself only flips `fShowFramerate` and sends `SetFramerateDisplay`; no equivalent persistence write occurs in that command body. | `src/AcDream.App/Settings/RuntimeSettingsController.cs` (`ToggleFrameRate`) | This preserves acdream's shipped L.0 cross-launch display preference while keeping the live retail mechanism and SmartBox visibility result exact; it changes no gameplay or wire state | A relaunch can retain FPS visibility where the named retail command body alone would not; a future port of retail's wider preference owner must avoid double-persisting or applying conflicting startup state | `ClientCommunicationSystem::DoFrameRate @ 0x005707D0`; `CM_UI::SendNotice_SetFramerateDisplay @ 0x0047A050`; `gmSmartBoxUI::RecvNotice_SetFramerateDisplay @ 0x004D65E0` |
|
||||
| AP-122 | The toolbar Use hand is Ghosted when selection is empty. Retail sets state 1 (Normal) and an empty-selection click enters generic `TARGET_MODE_USE`; selected-object enablement and activation remain retail-faithful. | `src/AcDream.App/UI/Layout/ToolbarController.cs` (`RefreshUseButton`) | User explicitly requires no selection to present as unavailable. The disabled retained button consumes the click without opening a cursor; every nonempty selection still uses the exact retail CombatUse/type/ItemUses predicate and the shared activation owner. | Generic pick-then-use mode cannot be entered from the empty toolbar hand; an object must first be selected, after which the same Use command is available. | `gmToolbarUI::HandleSelectionChanged @ 0x004BF380`; `gmToolbarUI::ListenToElementMessage @ 0x004BEE90` |
|
||||
|
||||
## 4. Temporary stopgap (TS) — 38 active rows + TS-37 historical note (TS-20 retired 2026-07-16 — the later named-retail audit disproved the proposed DrawingBSP polygon filter; TS-37 is a retired-row historical note, not an active count; TS-39 retired R5-V3 — sticky seams bound to the ported PositionManager/StickyManager, radii threaded; TS-45 retired 2026-07-07 — hand-rolled `SphereCollision` replaced by the faithful CSphere family port, fixing the player-vs-monster crowd wedge; TS-3 retired 2026-07-07 — `frames_stationary_fall` accounting ported in the #182 verbatim UpdateObjectInternal rebuild, fixing the airborne falling-animation wedge; TS-41 retired 2026-07-07 — SERVERVEL synth-velocity remote body-drive replaced by the retail interp catch-up + unconditional MovementManager::UseTime, the remote-creature de-overlap #184; TS-42 retired 2026-07-19 — semantic animation completion now precedes the ordered Target/Movement/PartArray/Position tail; TS-44 narrowed again 2026-07-19 — complete orientation joined interpolation, only during-stick enqueue suppression remains)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ The active work order is
|
|||
It closes six remaining retail interaction surfaces before larger M4 subsystem
|
||||
bodies begin: spell-bar overflow controls, status-bar Use/Assess commands,
|
||||
assessment information, equipped-child picking, vendor browsing, and
|
||||
server-authoritative vendor transactions. Slice 1 is active and ports the
|
||||
DAT-authored arrow-only favorite-spell scrollbar through the shared retained
|
||||
scrollbar/list model. The corrected import preserves authored arrow sides and
|
||||
rollover/pressed media, passive refresh preserves manual offsets, and the
|
||||
mixed-parent DAT anchor chain produces the fixed retail capacity of 18 visible
|
||||
favorite cells (nine numbered plus nine unnumbered). Its
|
||||
implementation and complete Release suite pass; connected overflow-arrow
|
||||
visual acceptance is pending.
|
||||
server-authoritative vendor transactions. Slice 1's DAT-authored arrow-only
|
||||
favorite-spell scrollbar, fixed 18-cell capacity, authored arrow sides/media,
|
||||
and persistent manual offset passed the connected gate. Slice 2 is active: the
|
||||
status hand now follows canonical selection/object notices, ghosts empty and
|
||||
unusable selections, and routes enabled weapons, direct-use items, and
|
||||
use-on-target tools through the existing interaction transaction and cursor
|
||||
owners. Its connected hand-state gate is pending; the magnifying-glass Assess
|
||||
command follows in the same slice.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,11 @@ transactions. This is deliberately using the extracted interaction owners and
|
|||
canonical shared main-panel host before quest/emote/character-creation bodies
|
||||
broaden the feature surface.
|
||||
|
||||
Slice 1's 18-cell favorite-spell overflow bar is user-accepted. Slice 2 is
|
||||
active: the status hand's selected-object availability and existing
|
||||
Use/AutoWield/use-on-target command routing are code-complete, with the
|
||||
connected state/cursor gate pending before the Assess half continues.
|
||||
|
||||
Carried:
|
||||
#153 far-teleport residual, #116 slide-response, the remaining R6 ownership cleanup plus
|
||||
registered TS-50/TS-51/TS-53 timing residuals (the complete-root-Frame/object-workset
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# World interaction completion — pre-M4 program
|
||||
|
||||
**Status:** Slice 1 code-complete 2026-07-23; connected visual gate pending.
|
||||
**Status:** Slice 1 user-accepted 2026-07-23. Slice 2 Use-hand state and command
|
||||
path code-complete; connected visual gate pending before Assess continues.
|
||||
**Milestone:** M4 prerequisite/preamble.
|
||||
**Architecture:** retained gameplay UI over shared selection, object, and
|
||||
interaction state. `GameWindow` remains a composition/callback shell.
|
||||
|
|
@ -52,9 +53,21 @@ spells. Passive object/endowment refresh preserves a manual offset. The mixed
|
|||
producing exactly 18 visible 32-pixel favorite cells (nine numbered plus nine
|
||||
unnumbered) without consuming the overflow. The initial 57-test/full-suite gate passed;
|
||||
the corrective 104-test focus set, 3,472 App tests / 3 skips, Release solution
|
||||
build, and 7,845 complete-solution tests / 5 skips pass. The connected gate is
|
||||
pending after user feedback on arrow sides, rollover, width, and offset
|
||||
persistence.
|
||||
build, and 7,845 complete-solution tests / 5 skips pass. The corrected
|
||||
18-cell bar and both overflow directions passed the connected gate.
|
||||
|
||||
Slice 2 now drives the toolbar hand from canonical `SelectionState` changes and
|
||||
live `ClientObjectTable` updates. The pure Core predicate ports
|
||||
`gmToolbarUI::HandleSelectionChanged`: combat-use items, armor/clothing/jewelry,
|
||||
and `ItemUses` values without `USEABLE_NO` remain active. Clicking still enters
|
||||
the existing `ItemInteractionController` command path, so weapons use the
|
||||
server-confirmed AutoWield transaction and targeted tools enter the existing
|
||||
use-on-target cursor. Empty selection and explicitly unusable spell components
|
||||
are ghosted and ignore clicks. Empty-selection ghosting is the user's explicit
|
||||
choice over retail's generic `TARGET_MODE_USE` entry and is registered as
|
||||
AP-122. The 14-test Core interaction focus, 49-test toolbar focus, Release
|
||||
solution build, 3,474 App tests / 3 skips, and 7,848 complete-solution tests /
|
||||
5 skips pass.
|
||||
|
||||
## Slice 1 — spell-bar overflow arrows
|
||||
|
||||
|
|
@ -115,3 +128,27 @@ Named retail references and executable pseudocode are recorded in
|
|||
- Existing stack, combat-power, chat, inventory, spellbook, and external
|
||||
container scrollbars retain their current behavior.
|
||||
- No substantial feature body enters `GameWindow`.
|
||||
|
||||
## Slice 2 — status Use/Assess commands
|
||||
|
||||
### Use-hand implementation
|
||||
|
||||
1. `ItemInteractionPolicy.IsToolbarUseEnabled` is the pure named-retail
|
||||
selection predicate.
|
||||
2. `ItemInteractionController.IsToolbarUseEnabled` adapts the selected live
|
||||
object without triggering a request or consuming the use throttle.
|
||||
3. `ToolbarController` subscribes to canonical `SelectionState.Changed` and
|
||||
selected-object add/update/remove notices, then sets the imported button's
|
||||
normal or ghosted state through `UiButton.Enabled`.
|
||||
4. Enabled clicks retain the one existing activation path:
|
||||
equipment enters `AutoWieldController`, ordinary use enters the normal Use
|
||||
request owner, and targeted items enter `UseItemOnTarget`, which already
|
||||
owns the retail target cursor.
|
||||
|
||||
### Remaining Slice 2 work
|
||||
|
||||
- Port the magnifying-glass Assess command state and activation.
|
||||
- Run the connected Use-hand visual gate: no selection, spell component,
|
||||
weapon, and health kit.
|
||||
- Continue directly into the Assess information slice after the combined
|
||||
status-control gate.
|
||||
|
|
|
|||
|
|
@ -579,8 +579,15 @@ HandleSelectionChanged(): // 0x004BF380
|
|||
```
|
||||
|
||||
The exact item-type mask in the use-button ghost test is visible as separate
|
||||
`InqType() & 4`, `& 2`, and `& 8` checks. Preserve those numeric tests until the
|
||||
retail `ITEM_TYPE` names are pinned.
|
||||
`InqType() & 4`, `& 2`, and `& 8` checks. The verbatim `ITEM_TYPE` enum now pins
|
||||
those values as Clothing, Armor, and Jewelry respectively.
|
||||
|
||||
**2026-07-23 connected requirement:** acdream intentionally ghosts the hand
|
||||
when the selection is empty. Retail instead sets state 1 and lets a click enter
|
||||
generic `TARGET_MODE_USE` (see `ListenToElementMessage @ 0x004BEE90`). Selected
|
||||
objects still use the exact predicate above and still activate through the
|
||||
ordinary `ItemHolder::UseObject` path. The empty-selection difference is
|
||||
registered as AP-122.
|
||||
|
||||
### 5.3 Meter notices
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue