Axel Meyer db9eb222cb fix(P.3.1): split_namespaced_id replaced with current-module-prefix match; v0.1.1
Pre-existing bug: split_namespaced_id used first-dot-split. For modules
with dotted IDs (e.g. lib-core.maps-test), this misclassified
'<dotted-module-id>.<tilemap-name>' as cross-lib reference.

Replaced with split_local_tilemap() that matches by exact current-
module-id prefix. Module-id can now have arbitrary dots.

Surfaced by P.3.1 reference test-module 'lib-core.maps-test' which
has a dotted module-id.
2026-05-11 02:50:32 +02:00

lib-core.maps

P.0 single-tile-grid-map implementation. Loads JSON map + tilemap files, provides tile-fetch + walkability queries.

  • Lib-ID: lib-core.maps
  • Version: 0.1.0
  • Spec: meta/docs/superpowers/specs/2026-05-09-p0-lib-maps-design.md

Forward-compat stubs (DEPRECATED-MVP) for multi-map graph, lifecycle states, walls, sprite-fields, generators, save-integration. See meta/docs/architecture/map-topology.md for the full target spec.

API

  • maps.load(path) — load + register a map from JSON
  • maps.create(table) — programmatic creation (tests, procedural)
  • maps.tile_at(map_id, tx, ty) / maps.tile_at(tx, ty) — current-map sugar
  • maps.is_walkable(...), maps.size(...), maps.tile_size(...)
  • maps.current(), maps.set_current(id), maps.list()
  • Stubs (deferred): maps.state(), maps.pin()
Description
P.0.module.skeleton
Readme 509 KiB
Languages
Lua 99.5%
Shell 0.5%