feat(vagrant): Tab-Toggle inventory panel + right-click context menu

- lib-core.panel and lib-core.inventory-list-display added to deps (v0.1.0 each)
- backpack-widget created in M.init with label-resolver returning "Rock"
- Drop action registered: removes from backpack, relocates to player position,
  re-registers pickup trigger
- Inspect action registered: prints reg_id via engine.print
- M.update: panel.update(dt) + is_pausing() early-return added after
  quit_to_launcher check
- interaction.update wrapped in panel.is_open() guard to block world triggers
  while panel is visible
- M.draw: panel.render() added at z-top after CI traces
- Q-drop (LIFO quick-drop via Q key) unchanged and parallel to panel Drop action
This commit is contained in:
Axel Meyer
2026-06-13 23:38:03 +02:00
parent e38d396b87
commit 60eac65bce
3 changed files with 75 additions and 8 deletions

View File

@@ -8,9 +8,9 @@ callback, foot-body-orientation ("tactical twist"), scale-deformation walk
cycle, and inheritance-decoupled foot sprites. End-to-end inventory pickup/drop
demo: pick up a rock into a backpack container, drop it back into the world.
**Version:** 0.8.0
**Version:** 0.9.0
**Module-ID:** vagrant-skeleton
**Requires:** lib-core.input >=0.4.0, lib-core.camera >=0.3.0, lib-core.render >=0.1.0, lib-core.maps >=0.1.2, lib-core.puppet >=0.4.4, lib-core.interaction >=0.1.0, lib-core.composition >=0.2.0, lib-core.inventory-list >=0.1.0, lib-asset.prototype-subterrain >=0.1.0
**Requires:** lib-core.input >=0.4.0, lib-core.camera >=0.3.0, lib-core.render >=0.1.0, lib-core.maps >=0.1.2, lib-core.puppet >=0.4.4, lib-core.interaction >=0.1.0, lib-core.composition >=0.2.0, lib-core.actor >=0.1.0, lib-core.inventory-list >=0.1.0, lib-core.panel >=0.1.0, lib-core.inventory-list-display >=0.1.0, lib-asset.prototype-subterrain >=0.1.0
**Tags:** test-chamber, puppet, walking-sim, interaction
## Topology
@@ -24,7 +24,9 @@ demo: pick up a rock into a backpack container, drop it back into the world.
- **Shift + WASD** — sprint (2x player speed + 2x walk-anim cadence)
- **Mouse** — body + head look-at targets (same position, different smoothing)
- **E** — interact: if within range of the rock, picks it up into the backpack
- **Q** — drop: places the most-recently-added backpack item at player position (+30px right)
- **Q** — quick-drop (LIFO): places the most-recently-added backpack item at player position (+30px right)
- **Tab** — toggle inventory panel (Backpack contents)
- **Right-Click on item row** (while panel open): context menu with **Drop** / **Inspect** options
- **ESC** — return to launcher
## Demo Walkthrough
@@ -109,6 +111,17 @@ Only one rock is spawned per session.
## CHANGELOG
### v0.9.0 — inventory panel UI
- **Panel overlay**: `lib-core.panel` + `lib-core.inventory-list-display` wired in.
Tab key toggles a panel overlay showing backpack contents.
- **Context menu actions**: right-clicking an item row opens a context menu with
**Drop** (re-parents item to world at player position, re-registers pickup trigger)
and **Inspect** (prints `reg_id` to console).
- **Q-drop unchanged**: LIFO quick-drop via Q remains available in parallel to the
panel-based drop action.
- **Interaction guard**: `interaction.update` is suppressed while the panel is open
so world triggers don't fire during menu navigation.
### v0.8.0 — end-to-end inventory demo functional
- **Backpack container**: `composition.define_template{id="backpack"}` now includes
`container={kind="list"}`. The composition v0.2 validator accepts this; the backpack