Add map inspector that emits a human-readable stats report
Counts set vs empty cells per layer, lists the top-10 most frequent non-empty GIDs with decoded components, and reports roof coverage. When an atlas registry is supplied, atlas-id+tile-name annotations are added; without one the report still works using indices only.
This commit is contained in:
30
tests/fixtures/maps/inspect_sample.map.json
vendored
Normal file
30
tests/fixtures/maps/inspect_sample.map.json
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"schema_version": 2,
|
||||
"id": "inspect_sample",
|
||||
"size": { "w": 4, "h": 4 },
|
||||
"atlases": ["atlas_a", "atlas_b"],
|
||||
"layers": {
|
||||
"surface": {
|
||||
"tiles": [
|
||||
16, 16, 16, 16,
|
||||
16, 32, 32, 16,
|
||||
16, 32, 32, 16,
|
||||
16, 16, 16, 16
|
||||
]
|
||||
},
|
||||
"wall": {
|
||||
"tiles": [
|
||||
16777232, 16777232, 16777232, 16777232,
|
||||
16777232, 0, 0, 16777232,
|
||||
16777232, 0, 0, 16777232,
|
||||
16777232, 16777232, 16777232, 16777232
|
||||
]
|
||||
}
|
||||
},
|
||||
"roof": [
|
||||
0, 0, 0, 0,
|
||||
0, 1, 1, 0,
|
||||
0, 1, 1, 0,
|
||||
0, 0, 0, 0
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user