Scaffold sporel-module-map-editor package
Empty launchable module with deps on lib-core.maps 0.4.0, render, camera, input, and the fa_terrain_v1 asset alias. Renders the default 4x4 empty work-map; interactive editing wired in subsequent commits.
This commit is contained in:
15
README.md
Normal file
15
README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# sporel-module-map-editor
|
||||
|
||||
Interactive map editor module for v2 Sporel maps. Click-to-paint, vertical layer-chip overlay, collapsible atlas+tile picker.
|
||||
|
||||
## Status
|
||||
|
||||
`v0.1.0` — initial POC. See `docs/superpowers/specs/2026-05-23-sporel-module-map-editor-design.md` in `sporel-meta` for the full spec.
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
bash scripts/run-map-editor.sh [target_map.json]
|
||||
```
|
||||
|
||||
(Detailed hotkey reference and UI walkthrough added in a later commit.)
|
||||
18
init.lua
Normal file
18
init.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
-- sporel-module-map-editor v0.1.0
|
||||
-- Interactive map editor; full wiring lands in subsequent commits.
|
||||
|
||||
local maps = require("lib-core.maps")
|
||||
|
||||
local work_map_id = maps.load("maps/work.map.json")
|
||||
maps.set_current(work_map_id)
|
||||
maps.load_textures(engine.module.asset_aliases())
|
||||
|
||||
engine.print("map-editor: scaffold loaded, map_id=" .. work_map_id)
|
||||
|
||||
function update(ctx, dt)
|
||||
-- TODO: wired in later commits
|
||||
end
|
||||
|
||||
function draw()
|
||||
maps.draw_map()
|
||||
end
|
||||
18
manifest.module
Normal file
18
manifest.module
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "sporel-module-map-editor",
|
||||
"version": "0.1.0",
|
||||
"kind": "module",
|
||||
"api": "^0.1",
|
||||
"ci_frames": 30,
|
||||
"entry_point": "init.lua",
|
||||
"asset_aliases": {
|
||||
"fa_terrain_v1": "lib-asset.prototype-fa-starter"
|
||||
},
|
||||
"deps": [
|
||||
{"id":"lib-core.maps","version":"0.4.0"},
|
||||
{"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"}
|
||||
]
|
||||
}
|
||||
11
maps/work.map.json
Normal file
11
maps/work.map.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"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]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user