From 497c13972718634cbd61472a11b0ade840b54b36 Mon Sep 17 00:00:00 2001 From: calic Date: Fri, 29 May 2026 00:34:12 +0200 Subject: [PATCH] =?UTF-8?q?fix(map-editor):=20v0.2.0b.1=20=E2=80=94=20bind?= =?UTF-8?q?=20blob=5Frect=5Fstone=20material=20so=20Auto-Tile=20renders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit work.map.json was still schema-v2 with the legacy fa_terrain_v1 atlas — neither has a `material` field on its layers, so the renderer's vertex/blob path never fired and Auto-Tile painting had no visible effect (the set_vertex writes landed but the renderer fell back to the cell-tile path that doesn't consume them). Migration: - schema_version 2 -> 3 - size 4x4 -> 16x16 (room to paint) - atlases: fa_terrain_v1 -> blob_rect_stone (S-V2E2-RM-Blob 14-slot atlas from lib-asset.prototype-blob-geom) - layers: surface + wall, both with "material": "blob_rect_stone"; vertices+overrides start empty (lib-core.maps lazy-allocates on first set_vertex) Manifest: - asset_aliases: fa_terrain_v1 -> blob_rect_stone (lib-asset. prototype-blob-geom) - deps: drop prototype-fa-starter, add prototype-blob-geom 0.1.0 --- init.lua | 14 +++++++++----- manifest.module | 6 +++--- maps/work.map.json | 15 +++++++-------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/init.lua b/init.lua index 060a33e..0b8725b 100644 --- a/init.lua +++ b/init.lua @@ -1,11 +1,15 @@ --- sporel-module-map-editor v0.2.0b +-- sporel-module-map-editor v0.2.0b.1 -- Interactive map editor — Rev 4 UX architecture (see design paper -- 2026-05-28-autotile-blob-styles-design.md §11 + plan stub --- 2026-05-28-map-editor-blob-v2.md). v0.2.0b adds the bottom palette +-- 2026-05-28-map-editor-blob-v2.md). 0.2.0b adds the bottom palette -- strip (14 numbered swatches, no real tile thumbnails yet — that -- needs a lib-core.maps tile-UV getter) + Auto-Tile vertex painting --- via maps.set_vertex + a vertex-grid overlay. Direct-mode painting --- still uses the v0.1 cell-paint path. +-- via maps.set_vertex + a vertex-grid overlay. 0.2.0b.1 migrates +-- work.map.json to schema-v3 + binds surface/wall layers to the +-- blob_rect_stone material so Auto-Tile painting actually renders; +-- before that the legacy fa_terrain_v1 atlas was loaded which has no +-- blob-14 slot layout, so paint had no visible effect. +-- Direct-mode painting still uses the v0.1 cell-paint path. -- Transform controls + Direct-Override + Decal/Entity sub-selectors -- land in 0.2.0c/d. -- @@ -766,7 +770,7 @@ input.bind("save_map", { "s" }) input.bind("toggle_mode", { "tab" }) -- 0.2.0a input.bind("toggle_cheatsheet", { "i" }) -- 0.2.0a — `i` for Info/help (no shifted-key support in input lib) -engine.print("map-editor v0.2.0b: ready. Tab=mode, I=help, S=save, E=erase, R=rotate, ESC=quit") +engine.print("map-editor v0.2.0b.1: ready. Tab=mode, I=help, S=save, E=erase, R=rotate, ESC=quit") -- ===================================================================== -- Frame hooks diff --git a/manifest.module b/manifest.module index f195a11..cda932b 100644 --- a/manifest.module +++ b/manifest.module @@ -1,18 +1,18 @@ { "id": "map-editor", - "version": "0.2.0b", + "version": "0.2.0b.1", "kind": "module", "api": "^0.1", "ci_frames": 30, "entry_point": "init.lua", "asset_aliases": { - "fa_terrain_v1": "lib-asset.prototype-fa-starter" + "blob_rect_stone": "lib-asset.prototype-blob-geom" }, "deps": [ {"id":"lib-core.maps","version":"0.5.2"}, {"id":"lib-core.render","version":"0.1.0"}, {"id":"lib-core.camera","version":"0.3.0"}, {"id":"lib-core.input","version":"0.4.0"}, - {"id":"lib-asset.prototype-fa-starter","version":"0.2.0"} + {"id":"lib-asset.prototype-blob-geom","version":"0.1.0"} ] } diff --git a/maps/work.map.json b/maps/work.map.json index 5a9077f..1aabb09 100644 --- a/maps/work.map.json +++ b/maps/work.map.json @@ -1,11 +1,10 @@ { - "schema_version": 2, - "id": "work", - "size": { "w": 4, "h": 4 }, - "atlases": ["fa_terrain_v1"], - "layers": { - "surface": { - "tiles": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + "schema_version": 3, + "id": "work", + "size": { "w": 16, "h": 16 }, + "atlases": [ "blob_rect_stone" ], + "layers": { + "surface": { "material": "blob_rect_stone" }, + "wall": { "material": "blob_rect_stone" } } - } }