From 1fa0628c835f8550ed9ab87a688192cfc7dd716e Mon Sep 17 00:00:00 2001 From: Axel Meyer Date: Mon, 15 Jun 2026 02:01:39 +0200 Subject: [PATCH] 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) --- README.md | 33 +++++++++++++++++++++++---------- init.lua | 32 +++++++++++++++++--------------- manifest.module | 2 +- 3 files changed, 41 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 7d64595..6b99c16 100644 --- a/README.md +++ b/README.md @@ -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.12.0 +**Version:** 0.13.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.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 ## 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) - **Tab** — toggle inventory panel (Backpack contents) - **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 recipe row** (crafting panel): context menu with **Craft** / **Inspect** - **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. 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). - Walk to the Workbench (just above the Backpack at (350, 380)) and right-click within 40px range. -- Two panels open simultaneously (Workbench-Crafting + Workbench-Inventory). - Because `lib-core.panel` v0.1 is single-active, only one panel is visible - at a time — closing it (X) reveals the other. +- Both panels open simultaneously, side-by-side: Workbench-Crafting in + the **left-half** layout-slot, Workbench-Inventory in the **right-half** + slot (panel v0.2.0 multi-active + layout-slots). - Right-click on a recipe row (e.g. **Stone Pick**) → context menu with **Craft** + **Inspect**. Click **Craft** → crafted item lands in - **Workbench-Inventory** (NOT Backpack). -- Open Workbench-Inventory, right-click on the crafted item → **Take** moves + **Workbench-Inventory** (NOT Backpack); it appears in the right-half + panel immediately. +- Right-click on the crafted item in Workbench-Inventory → **Take** moves it to the Backpack; a "Took " toast appears. - Crafting inputs are aggregated from `{backpack, workbench}` (drain order: backpack first, then workbench). @@ -141,6 +142,17 @@ Only one rock is spawned per session. ## 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 - **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 the second (`workbench_inv`) is visible until the player closes it (X); 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. - **Notify events-Channel**: filter um `"transfer"` erweitert, damit Take-Action-Toasts im events-channel landen. diff --git a/init.lua b/init.lua index db4688e..ba83d13 100644 --- a/init.lua +++ b/init.lua @@ -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 + -- hardcoded furniture. Subterrain-style puppet control model: -- 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 -- 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). --- Panel-lib v0.1 is single-active so opening both panels lets --- workbench_inv win; user can close it (X) to reveal workbench_crafting --- below — Gate-2 walkthrough documents the flow. +-- +-- v0.13.0: lib-core.panel bumped to 0.2.0 (multi-active + layout-slots). +-- 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 camera = require("lib-core.camera") @@ -297,16 +300,13 @@ end -- Workbench-Inventory panels. -- -- 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 --- so a single registration suffices. Action-name "use" is bound to --- mouse_right in M.init's input.bind block. +-- snapshots the position at registration time. Workbench is static so a +-- single registration suffices. Action-name "use" is bound to mouse_right +-- in M.init's input.bind block. -- --- Note on dual-panel-open: lib-core.panel v0.1.1 enforces a single active --- widget. Calling panel.open twice means the second call wins --- (workbench_inv shows on top; workbench_crafting is hidden until the --- 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. +-- panel v0.2.0 supports multi-active panels with layout-slots; the two +-- panels (workbench_crafting=left-half, workbench_inv=right-half) are +-- visible simultaneously side-by-side after both panel.open calls. local function register_interaction_use(entity) local x = entity:get_property("position.x") local y = entity:get_property("position.y") @@ -882,7 +882,8 @@ function M.init(ctx) ctx_inner.close_menu() 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 -- register_interaction_use(state.workbench) below. @@ -934,7 +935,8 @@ function M.init(ctx) c.close_menu() 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 -- panel.register'd; the callback panel.open()s them by id, so they diff --git a/manifest.module b/manifest.module index fdc0fbf..5475b59 100644 --- a/manifest.module +++ b/manifest.module @@ -1,6 +1,6 @@ { "id": "vagrant-skeleton", - "version": "0.12.0", + "version": "0.13.0", "kind": "module", "api": "^0.1", "ci_frames": 60,