feat(vagrant): spawn rock entity with pickup trigger
- Rock template (stack_mode=individual, tags=renderable+item) defined
alongside backpack and vagrant_player templates.
- state.rock entity created in M.init using slot_00_isolated UV from
the blob_rect_stone atlas (lib-asset.prototype-blob-geom); position
(270, 400) — 80px left of the backpack.
- register_pickup(state.rock) wires an interaction trigger; existing
render.draw_entities{tag="renderable"} draws the rock with no
special-case render code.
- CI trace: engine.print("vagrant: rock_spawned") emitted once on init.
- Version bump 0.7.2 -> 0.7.3.
This commit is contained in:
19
README.md
19
README.md
@@ -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.7.2
|
||||
**Version:** 0.7.3
|
||||
**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
|
||||
@@ -26,8 +26,11 @@ cycle, and inheritance-decoupled foot sprites.
|
||||
- **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.
|
||||
> **Note:** The world now contains a rock (near the backpack, 80px to its left). Walk up
|
||||
> and press E to pick it up into the backpack; press Q to drop it back at your feet.
|
||||
> Picking up the rock currently throws a loud error because the backpack is not yet a
|
||||
> container — this confirms the pickup wiring is alive. Full pickup-into-backpack works
|
||||
> once the backpack becomes a container (next slice).
|
||||
|
||||
## Demonstrates
|
||||
|
||||
@@ -79,6 +82,16 @@ cycle, and inheritance-decoupled foot sprites.
|
||||
|
||||
## CHANGELOG
|
||||
|
||||
### v0.7.3
|
||||
- **Rock entity**: `composition.define_template{id="rock"}` added (stack_mode=individual,
|
||||
tags=renderable+item). One rock entity spawned at (270, 400) — 80px left of the backpack.
|
||||
Uses `slot_00_isolated` UV from the `blob_rect_stone` atlas (lib-asset.prototype-blob-geom).
|
||||
`register_pickup(state.rock)` wires an interaction trigger so pressing E near the rock
|
||||
fires the pickup callback. The callback calls `inventory.add(state.backpack, …)` which
|
||||
errors until the backpack becomes a container (next slice) — the error confirms the wiring
|
||||
is alive. `render.draw_entities{tag="renderable"}` (existing Phase A render path) draws
|
||||
the rock without any special-case render code.
|
||||
|
||||
### v0.4.4
|
||||
- **Sprint** (Shift+WASD): doubles `WALK_SPEED` (120 → 240) and walk-anim
|
||||
`speed` (0.45 → 0.9). Mid-walk sprint toggle uses `puppet.set_play_speed`
|
||||
|
||||
Reference in New Issue
Block a user