docs: aetheria-release map: inventory grid switch sections IG-S, IG-SA, IG-SR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
52e52541f9
commit
721a69ff39
1 changed files with 29 additions and 0 deletions
|
|
@ -11678,3 +11678,32 @@ This equals today's alpha-blended Background followed by the additive Icon, beca
|
|||
- The mask is stored in the record, not derived in the shader, because the match relation is asymmetric. An interior no-hardpoint cell holding item X matches a hardpoint cell holding X, but the hardpoint cell does not match it back (InventoryPanel.cs:679-699). Deriving matches in HLSL would make a second owner of those rules.
|
||||
- The shapes are texel boxes evaluated through the nine-slice remap. That is what lets the parity bound be quantisation-only (see the spec) rather than a perceptual threshold.
|
||||
- Cut order: first the parked renderer and a parity harness against the live sheets, then the switch, then the deletes. The sheet oracle has to exist while the shader is judged, and the subtraction is falsified on its own.
|
||||
|
||||
### The switch (IG-S): body facts at master `52e52541f`
|
||||
|
||||
Imagination pass `igswitch-map`, 2026-12-01, after cut `inventory-grid-shader` landed (reports h1 to h3, verdicts s1 to s3 hold). Spec `aetheria-release:cut_spec:cut-inventory-grid-switch.r1` (receipt mind-commit-7d593cbd...); the deletes stay follow-up `inventory-grid-deletes`, mapped after Soul holds the switch. Source reads and YAML probes; the scripts are in that pass's scratchpad (`yaml_probe.py`, `go_probe.py`).
|
||||
|
||||
- IG-S1 Four panels. Two are instances of Inventory.prefab in ARPG.unity (`Cargo 1` at line 10196, `Cargo 2` at 31903); their overrides touch only names, Dialog, Settings, DragParent, ContextMenu, GameManager and temperature curves, never Grid or the cells. The other two are scene objects: `Canvas/Gameplay/Hud Schematic/Inventory` (Flip 0, FitToContent, StartCorner LowerLeft, TemperatureDisplay set) and `Canvas/Gameplay/Enemy Inventory` (Flip 1, FitToContent, StartCorner UpperRight, no TemperatureDisplay). Both scene panels' CellBackgroundColor alpha is .949; the prefab's is .902.
|
||||
- IG-S2 Interactivity is authored by trigger presence. The prefab's `Inventory Cell` carries the six UniRx triggers on Background; the HUD and Enemy prototypes carry none (all six fields 0). Every Background has raycastTarget 1, so present cells block clicks in all four panels, and a HUD click bubbles to the panel's own `OnPointerClick` (background click).
|
||||
- IG-S3 Sibling order. `Prototype.Instantiate` appends each cell as the last sibling (Prototype.cs:42-75). So TemperatureDisplay (first child of Content and of the HUD Schematic) draws under the cells, and the HUD's Override Icon and Shield Icon (ignoreLayout children) draw under the cells too. A Graphic on the container itself would draw under all of them, reversing that order.
|
||||
- IG-S4 Content sizing. The prefab's Content holds GridLayoutGroup plus ContentSizeFitter (preferred, preferred) under a ScrollRect; the HUD and Enemy Schematics have no fitter (fixed rect 254x260 and 260x260).
|
||||
- IG-S5 Pointer move during a drag. Input System 1.20 (`InputSystemUIInputModule.ProcessPointer`, line 476) calls `ProcessPointerMovement` every frame whatever the button state, and that sends `pointerMoveHandler` to every hovered object when the pointer moved (line 537); `sendPointerHoverToParent` is true. ARPG.unity's EventSystem uses that module. So an `IPointerMoveHandler` on the grid sees the pointer while another object owns the drag: the per-cell enter and exit that hover placement needs come from pointer move, with no polling.
|
||||
- IG-S6 UniRx adds triggers on demand: `OnPointerClickAsObservable(this UIBehaviour)` and the drag variants (ObservableTriggerExtensions.Component.cs:375-399) add the trigger component to the grid's GameObject on first subscription. UniRx has no pointer-move trigger.
|
||||
- IG-S7 Foreign writers at base: InventoryMenu.cs:85-107 and 140-161 recompute the item's cells as `Shape.Rotate(v, rotation) + position` and write `CellInstances[v2].Icon.color`; Pulse writes `Background.color` per frame (InventoryPanel.cs:486-515); the ghost is `Instantiate(CellInstances[v])` under DragParent with every Image's alpha halved (338-350, 563-575); TemperatureDisplay follows `_firstRect` (203). `Display(EquippedCargoBay)` never resets `_thermal`.
|
||||
- IG-S8 The record's spare room: texel 3x+2 uses R (mask), G bits 0-1 (present, item), B bits 0-3 (conductivity); A, G bits 2-7 and B bits 4-7 are unused, 18 bits in all. The shader reads the stride 3 as literals (InventoryGrid.shader:221-225).
|
||||
- IG-S9 No play-mode capture of ARPG exists. The play-mode patterns are FloatingItemsDrawnSmoke (SessionState flag, EnterPlaymode, EditorApplication.update stepping, real-time budget) and InventoryGridOverlayCapture (Game view 321x531 in batch). A run starts through the public `MainMenu.Launch(Scenario)` (MainMenu.cs:242), which generates the galaxy on a task and loads ARPG.
|
||||
|
||||
### Authority (IG-SA): what the switch makes true
|
||||
|
||||
- InventoryPanel is the only writer of its grid's records, and RefreshCells(cells, highlight) is the only place a record is composed. Pulse and the selection highlight reach the records only through it.
|
||||
- InventoryGrid owns layout (cell size, padding, orientation, now serialized on the grid), pixels, point-to-cell (CellAt, CellRect, IsRaycastLocationValid) and the hovered cell. It decides no match rule and nothing about a panel.
|
||||
- Demotions: GridLayoutGroup is gone; Flip is derived from `Grid.Orientation`; `CellInstances`, `EmptyCells` and `_firstRect` are gone; interactivity is an authored `Interactive` flag instead of trigger presence on a prototype; the ghost is a second InventoryGrid fed `RecordAt` copies (a display copy, never a decision); TemperatureDisplay is placed from `CellRect(-1,-1)`.
|
||||
- Oracle-only until cut `inventory-grid-deletes`: InventoryCell, the deactivated prototype objects, `NodePrototype`, `NodeTextures`, `NodeBackgroundTextures`, `ThermalTextures` and the sheets. The panel's own code reads none of them.
|
||||
|
||||
### Rationale (IG-SR)
|
||||
|
||||
- The grid sits on a new last child, `Cells`, of the old container, so draw order stays as IG-S3 describes. The menu's Content keeps its fitter and gains a VerticalLayoutGroup that sizes Cells to its preferred size; Unity's fitter reads only layout elements on its own object.
|
||||
- Masks are proven by a golden taken from the base commit's own panels, not by hand fixtures: the harness writes every state's records and cell rects at the first commit (before the switch) and compares the live records exactly at head. The golden is a run output, not a committed file, so idea `invgrid-map.golden-mask-table`'s cost (a format to maintain) does not apply.
|
||||
- The selection stays transient, as today (idea `invgrid-map.persistent-selection` stays open for the operator): SetHighlight refreshes the item's cells with the highlight colour, and the next refresh clears it.
|
||||
- Assembly seam: a future assembly id or outline mask is a CellRecord field composed in RefreshCells, carried by SetCell and RecordAt, and so copied by the ghost with no further change; IG-S8 is the room. This cut adds no field.
|
||||
- The deletes stay a later cut: the sheets are the oracle Soul runs against the switch.
|
||||
|
|
|
|||
Loading…
Reference in a new issue