feat: v0.13.0 Workbench multi-panel via panel v0.2.0

D.2-revisit closes the Workbench Gate-2 walkthrough: right-click
on Workbench now opens workbench_crafting (left-half layout-slot)
+ workbench_inv (right-half) simultaneously, replacing the v0.12.0
auto-switch workaround. Both panels visible at the same time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Axel Meyer
2026-06-15 02:01:39 +02:00
parent 5cd42caaa7
commit 1fa0628c83
3 changed files with 41 additions and 26 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 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. demo: pick up a rock into a backpack container, drop it back into the world.
**Version:** 0.12.0 **Version:** 0.13.0
**Module-ID:** vagrant-skeleton **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.3.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-core.notify >=0.1.0, lib-core.notify-display >=0.1.0, lib-core.world-overlay >=0.1.0, lib-core.crafting >=0.2.0, lib-core.crafting-display >=0.2.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.3.0, lib-core.actor >=0.1.0, lib-core.inventory-list >=0.1.0, lib-core.panel >=0.2.0, lib-core.inventory-list-display >=0.1.0, lib-core.notify >=0.1.0, lib-core.notify-display >=0.1.0, lib-core.world-overlay >=0.1.0, lib-core.crafting >=0.2.0, lib-core.crafting-display >=0.2.0, lib-asset.prototype-subterrain >=0.1.0
**Tags:** test-chamber, puppet, walking-sim, interaction **Tags:** test-chamber, puppet, walking-sim, interaction
## Topology ## Topology
@@ -27,7 +27,7 @@ demo: pick up a rock into a backpack container, drop it back into the world.
- **Q** — quick-drop (LIFO): 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) - **Tab** — toggle inventory panel (Backpack contents)
- **C** — toggle Backpack-Crafting panel (lists known recipes; availability dimmed by inventory) - **C** — toggle Backpack-Crafting panel (lists known recipes; availability dimmed by inventory)
- **Right-Click on Workbench** (within range) — opens Workbench-Crafting + Workbench-Inventory panels (Phase D v0.2) - **Right-Click on Workbench** (within range) — opens Workbench-Crafting (left-half) + Workbench-Inventory (right-half) panels side-by-side (panel v0.2.0 multi-active)
- **Right-Click on item row** (inventory panel): context menu with **Drop** / **Inspect** (Backpack) or **Take** / **Inspect** (Workbench) - **Right-Click on item row** (inventory panel): context menu with **Drop** / **Inspect** (Backpack) or **Take** / **Inspect** (Workbench)
- **Right-Click on recipe row** (crafting panel): context menu with **Craft** / **Inspect** - **Right-Click on recipe row** (crafting panel): context menu with **Craft** / **Inspect**
- **L** — toggle game-log (chronological list of all events) - **L** — toggle game-log (chronological list of all events)
@@ -72,17 +72,18 @@ The world contains five notable entities at startup:
**Multiple pickups:** Each E → Q → E cycle moves the same rock in and out. **Multiple pickups:** Each E → Q → E cycle moves the same rock in and out.
Only one rock is spawned per session. Only one rock is spawned per session.
**Workbench flow (Phase D v0.2):** **Workbench flow (Phase D v0.2 + v0.13.0 multi-panel):**
- Pick up rock + stick into the backpack (E on each). - Pick up rock + stick into the backpack (E on each).
- Walk to the Workbench (just above the Backpack at (350, 380)) and - Walk to the Workbench (just above the Backpack at (350, 380)) and
right-click within 40px range. right-click within 40px range.
- Two panels open simultaneously (Workbench-Crafting + Workbench-Inventory). - Both panels open simultaneously, side-by-side: Workbench-Crafting in
Because `lib-core.panel` v0.1 is single-active, only one panel is visible the **left-half** layout-slot, Workbench-Inventory in the **right-half**
at a time — closing it (X) reveals the other. slot (panel v0.2.0 multi-active + layout-slots).
- Right-click on a recipe row (e.g. **Stone Pick**) → context menu with - Right-click on a recipe row (e.g. **Stone Pick**) → context menu with
**Craft** + **Inspect**. Click **Craft** → crafted item lands in **Craft** + **Inspect**. Click **Craft** → crafted item lands in
**Workbench-Inventory** (NOT Backpack). **Workbench-Inventory** (NOT Backpack); it appears in the right-half
- Open Workbench-Inventory, right-click on the crafted item → **Take** moves panel immediately.
- Right-click on the crafted item in Workbench-Inventory → **Take** moves
it to the Backpack; a "Took <item>" toast appears. it to the Backpack; a "Took <item>" toast appears.
- Crafting inputs are aggregated from `{backpack, workbench}` (drain order: - Crafting inputs are aggregated from `{backpack, workbench}` (drain order:
backpack first, then workbench). backpack first, then workbench).
@@ -141,6 +142,17 @@ Only one rock is spawned per session.
## CHANGELOG ## CHANGELOG
### v0.13.0 — Workbench Multi-Panel via lib-core.panel v0.2.0
- Right-click on Workbench now opens BOTH panels simultaneously:
`workbench_crafting` (layout="left-half") + `workbench_inv`
(layout="right-half").
- Replaces the v0.12.0 auto-switch workaround that was forced by
panel v0.1.1's single-active limitation. The Workbench Gate-2
walkthrough per `2026-06-14-phase-D-workbench-design.md` §7 now
runs cleanly.
- Deps: lib-core.panel 0.1.1 → 0.2.0 (multi-active + layout-slots).
### v0.12.0 — Workbench ### v0.12.0 — Workbench
- **New: Workbench entity** in the world at (350, 380) — `composition.define_template` - **New: Workbench entity** in the world at (350, 380) — `composition.define_template`
@@ -165,7 +177,8 @@ Only one rock is spawned per session.
enforces one active widget. Opening both Workbench panels means only enforces one active widget. Opening both Workbench panels means only
the second (`workbench_inv`) is visible until the player closes it (X); the second (`workbench_inv`) is visible until the player closes it (X);
closing it reveals `workbench_crafting`. Proper side-by-side stacking closing it reveals `workbench_crafting`. Proper side-by-side stacking
is a future panel-lib slice. is a future panel-lib slice. **Resolved in v0.13.0** via panel v0.2.0
multi-active + layout-slots.
- **Deps**: crafting 0.1.0 → 0.2.0, crafting-display 0.1.0 → 0.2.0. - **Deps**: crafting 0.1.0 → 0.2.0, crafting-display 0.1.0 → 0.2.0.
- **Notify events-Channel**: filter um `"transfer"` erweitert, damit - **Notify events-Channel**: filter um `"transfer"` erweitert, damit
Take-Action-Toasts im events-channel landen. Take-Action-Toasts im events-channel landen.

View File

@@ -1,4 +1,4 @@
-- sporel-module-vagrant-skeleton v0.12.0 -- sporel-module-vagrant-skeleton v0.13.0
-- Sprite-mode test-chamber: 13-bone humanoid puppet + sprite-tilemap + -- Sprite-mode test-chamber: 13-bone humanoid puppet + sprite-tilemap +
-- hardcoded furniture. Subterrain-style puppet control model: -- hardcoded furniture. Subterrain-style puppet control model:
-- multi-look-target (aim/soft), slerp body rotation, hip-static legs, -- multi-look-target (aim/soft), slerp body rotation, hip-static legs,
@@ -57,9 +57,12 @@
-- in the workbench. Take-action in workbench-inv moves an item back -- in the workbench. Take-action in workbench-inv moves an item back
-- to the backpack. C-key Backpack-Crafting remains via the bw-compat -- to the backpack. C-key Backpack-Crafting remains via the bw-compat
-- shim in crafting v0.2.0 (Form-1 bare entity-handle stays valid). -- shim in crafting v0.2.0 (Form-1 bare entity-handle stays valid).
-- Panel-lib v0.1 is single-active so opening both panels lets --
-- workbench_inv win; user can close it (X) to reveal workbench_crafting -- v0.13.0: lib-core.panel bumped to 0.2.0 (multi-active + layout-slots).
-- below — Gate-2 walkthrough documents the flow. -- Workbench-Crafting registers with layout="left-half", Workbench-
-- Inventory with layout="right-half"; right-click opens both panels
-- simultaneously side-by-side. Replaces the v0.12.0 single-active
-- caveat where workbench_inv covered workbench_crafting.
local input = require("lib-core.input") local input = require("lib-core.input")
local camera = require("lib-core.camera") local camera = require("lib-core.camera")
@@ -297,16 +300,13 @@ end
-- Workbench-Inventory panels. -- Workbench-Inventory panels.
-- --
-- lib-core.interaction v0.1.0 is XY-based (not entity-bound); the trigger -- lib-core.interaction v0.1.0 is XY-based (not entity-bound); the trigger
-- snapshots the position at registration time. Workbench is static in v0.12 -- snapshots the position at registration time. Workbench is static so a
-- so a single registration suffices. Action-name "use" is bound to -- single registration suffices. Action-name "use" is bound to mouse_right
-- mouse_right in M.init's input.bind block. -- in M.init's input.bind block.
-- --
-- Note on dual-panel-open: lib-core.panel v0.1.1 enforces a single active -- panel v0.2.0 supports multi-active panels with layout-slots; the two
-- widget. Calling panel.open twice means the second call wins -- panels (workbench_crafting=left-half, workbench_inv=right-half) are
-- (workbench_inv shows on top; workbench_crafting is hidden until the -- visible simultaneously side-by-side after both panel.open calls.
-- player closes the inv panel via X). This matches the spec §4.4 note that
-- "v0.2 default ist whatever panel-lib default" — proper side-by-side
-- layout is a panel-lib v0.2 task, out of scope for D.2.
local function register_interaction_use(entity) local function register_interaction_use(entity)
local x = entity:get_property("position.x") local x = entity:get_property("position.x")
local y = entity:get_property("position.y") local y = entity:get_property("position.y")
@@ -882,7 +882,8 @@ function M.init(ctx)
ctx_inner.close_menu() ctx_inner.close_menu()
end) end)
panel.register("workbench_crafting", state.workbench_crafting_widget) panel.register("workbench_crafting", state.workbench_crafting_widget,
{layout = "left-half"})
-- KEIN bind_default_trigger: trigger is the workbench right-click via -- KEIN bind_default_trigger: trigger is the workbench right-click via
-- register_interaction_use(state.workbench) below. -- register_interaction_use(state.workbench) below.
@@ -934,7 +935,8 @@ function M.init(ctx)
c.close_menu() c.close_menu()
end) end)
panel.register("workbench_inv", state.workbench_inv_widget) panel.register("workbench_inv", state.workbench_inv_widget,
{layout = "right-half"})
-- Right-click trigger registered AFTER both workbench widgets are -- Right-click trigger registered AFTER both workbench widgets are
-- panel.register'd; the callback panel.open()s them by id, so they -- panel.register'd; the callback panel.open()s them by id, so they

View File

@@ -1,6 +1,6 @@
{ {
"id": "vagrant-skeleton", "id": "vagrant-skeleton",
"version": "0.12.0", "version": "0.13.0",
"kind": "module", "kind": "module",
"api": "^0.1", "api": "^0.1",
"ci_frames": 60, "ci_frames": 60,