feat(vagrant): pickup/drop glue + lib-core.inventory-list dep

- Add lib-core.inventory-list v0.1.0 to manifest deps; bump module
  version 0.7.1 -> 0.7.2
- Import inventory = require("lib-core.inventory-list") in init.lua
- Add Item-Template-Convention comment block after vagrant_player
  template: documents stack_mode/tags/sprite/position contract that
  B.4 (rock) and B.5 (backpack-as-container) will fulfill
- Add register_pickup(item) factory: reads item position, registers
  interaction trigger; callback calls inventory.add + unregisters
  trigger on pickup
- Bind "drop" action to Q; drop handler in M.update pops last item
  from backpack via inventory.remove (renderable tag restored by
  library), repositions item at player pos +30px, re-registers pickup
- Update README Controls section: document E (pickup) and Q (drop)
  with note that end-to-end use requires B.4 + B.5
This commit is contained in:
Axel Meyer
2026-06-13 18:15:23 +02:00
parent 342adf64a1
commit f1e27d8183
3 changed files with 64 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ puppet control model: leg orientation decoupled from body via procedural
callback, foot-body-orientation ("tactical twist"), scale-deformation walk
cycle, and inheritance-decoupled foot sprites.
**Version:** 0.4.4
**Version:** 0.7.2
**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-asset.prototype-subterrain >=0.1.0
**Tags:** test-chamber, puppet, walking-sim, interaction
@@ -22,9 +22,13 @@ cycle, and inheritance-decoupled foot sprites.
- **W A S D** — direct movement (4-way, normalized for diagonals)
- **Shift + WASD** — sprint (2x player speed + 2x walk-anim cadence)
- **Mouse** — body + head look-at targets (same position, different smoothing)
- **E** — interact with nearest proximity-trigger in range
- **E** — interact with nearest proximity-trigger in range (pickup nearby item into backpack)
- **Q** — drop most-recent item from backpack at player position + re-register pickup trigger
- **ESC** — return to launcher
> **Note:** Q (drop) and E (item pickup) are groundwork for B.4 (rock on ground) and
> B.5 (backpack-as-container) — not yet exercisable end-to-end until those slices land.
## Demonstrates
- lib-core.puppet v0.4.3 integration: