diff --git a/README.md b/README.md index 7f51e3b..5910fb9 100644 --- a/README.md +++ b/README.md @@ -180,9 +180,9 @@ The build runs all three guards before it writes anything: ``` -check-rules: OK — 87 rules, 20 files scanned, 3 aliases + 41 constant sets checked, 275 formulas verified +check-rules: OK — 87 rules, 21 files scanned, 3 aliases + 41 constant sets checked, 275 formulas verified check-kits: OK — 25 roles, 10 trades, 218 catalogue items, every kit key resolves, every posting can use what it carries, every loadout distinct check-lang: OK — en.json, 927 keys, no leaf/branch collisions -check-behaviour: OK — 43 behavioural tests +check-behaviour: OK — 44 behavioural tests ``` diff --git a/package.json b/package.json index 7e3276f..ff40461 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build": "node tools/build-packs.mjs && node tools/update-readme.mjs", "icons": "node tools/make-icons.mjs", "dice": "node tools/make-dice-textures.mjs", - "check": "node tools/check-rules.mjs && node tools/check-kits.mjs && node tools/check-lang.mjs && node tools/check-behaviour.mjs", + "check": "node tools/check-rules.mjs && node tools/check-kits.mjs && node tools/check-lang.mjs && node tools/check-templates.mjs && node tools/check-behaviour.mjs", "test": "npm run check", "readme": "node tools/update-readme.mjs" }, @@ -17,5 +17,8 @@ "type": "commonjs", "dependencies": { "classic-level": "^3.0.0" + }, + "devDependencies": { + "handlebars": "^4.7.9" } } diff --git a/packs/armour/000003.log b/packs/armour/000003.log new file mode 100644 index 0000000..9b6d27d Binary files /dev/null and b/packs/armour/000003.log differ diff --git a/packs/armour/000005.ldb b/packs/armour/000005.ldb deleted file mode 100644 index c982555..0000000 Binary files a/packs/armour/000005.ldb and /dev/null differ diff --git a/packs/armour/000006.log b/packs/armour/000006.log deleted file mode 100644 index 1a1bb27..0000000 Binary files a/packs/armour/000006.log and /dev/null differ diff --git a/packs/armour/CURRENT b/packs/armour/CURRENT index cacca75..1a84852 100644 --- a/packs/armour/CURRENT +++ b/packs/armour/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/armour/LOG b/packs/armour/LOG index c8b5ec3..4d8cf14 100644 --- a/packs/armour/LOG +++ b/packs/armour/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.825703 1726ef000 Recovering log #3 -2026/08/12-18:25:14.825849 1726ef000 Level-0 table #5: started -2026/08/12-18:25:14.825995 1726ef000 Level-0 table #5: 4591 bytes OK -2026/08/12-18:25:14.826236 1726ef000 Delete type=0 #3 -2026/08/12-18:25:14.826263 1726ef000 Delete type=3 #2 +2026/08/12-18:41:45.665018 17412b000 Delete type=3 #1 diff --git a/packs/armour/LOG.old b/packs/armour/LOG.old deleted file mode 100644 index 8c1ac7b..0000000 --- a/packs/armour/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:00.997036 17328b000 Delete type=3 #1 diff --git a/packs/armour/MANIFEST-000002 b/packs/armour/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/armour/MANIFEST-000002 differ diff --git a/packs/armour/MANIFEST-000004 b/packs/armour/MANIFEST-000004 deleted file mode 100644 index 9c05997..0000000 Binary files a/packs/armour/MANIFEST-000004 and /dev/null differ diff --git a/packs/expedition/000003.log b/packs/expedition/000003.log new file mode 100644 index 0000000..263295b Binary files /dev/null and b/packs/expedition/000003.log differ diff --git a/packs/expedition/000005.ldb b/packs/expedition/000005.ldb deleted file mode 100644 index 4ff460d..0000000 Binary files a/packs/expedition/000005.ldb and /dev/null differ diff --git a/packs/expedition/000006.log b/packs/expedition/000006.log deleted file mode 100644 index 268b187..0000000 Binary files a/packs/expedition/000006.log and /dev/null differ diff --git a/packs/expedition/CURRENT b/packs/expedition/CURRENT index cacca75..1a84852 100644 --- a/packs/expedition/CURRENT +++ b/packs/expedition/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/expedition/LOG b/packs/expedition/LOG index 2d89db5..4852486 100644 --- a/packs/expedition/LOG +++ b/packs/expedition/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.845998 172efb000 Recovering log #3 -2026/08/12-18:25:14.846266 172efb000 Level-0 table #5: started -2026/08/12-18:25:14.846391 172efb000 Level-0 table #5: 4129 bytes OK -2026/08/12-18:25:14.846614 172efb000 Delete type=0 #3 -2026/08/12-18:25:14.846646 172efb000 Delete type=3 #2 +2026/08/12-18:41:45.733783 172907000 Delete type=3 #1 diff --git a/packs/expedition/LOG.old b/packs/expedition/LOG.old deleted file mode 100644 index 8f111b0..0000000 --- a/packs/expedition/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.063788 173a97000 Delete type=3 #1 diff --git a/packs/expedition/MANIFEST-000002 b/packs/expedition/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/expedition/MANIFEST-000002 differ diff --git a/packs/expedition/MANIFEST-000004 b/packs/expedition/MANIFEST-000004 deleted file mode 100644 index 47fbcd4..0000000 Binary files a/packs/expedition/MANIFEST-000004 and /dev/null differ diff --git a/packs/gear/000003.log b/packs/gear/000003.log new file mode 100644 index 0000000..629ba6d Binary files /dev/null and b/packs/gear/000003.log differ diff --git a/packs/gear/000005.ldb b/packs/gear/000005.ldb deleted file mode 100644 index d9bac03..0000000 Binary files a/packs/gear/000005.ldb and /dev/null differ diff --git a/packs/gear/000006.log b/packs/gear/000006.log deleted file mode 100644 index d1deb9b..0000000 Binary files a/packs/gear/000006.log and /dev/null differ diff --git a/packs/gear/CURRENT b/packs/gear/CURRENT index cacca75..1a84852 100644 --- a/packs/gear/CURRENT +++ b/packs/gear/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/gear/LOG b/packs/gear/LOG index b070b77..236679a 100644 --- a/packs/gear/LOG +++ b/packs/gear/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.826938 171ee3000 Recovering log #3 -2026/08/12-18:25:14.827153 171ee3000 Level-0 table #5: started -2026/08/12-18:25:14.827483 171ee3000 Level-0 table #5: 31614 bytes OK -2026/08/12-18:25:14.827723 171ee3000 Delete type=0 #3 -2026/08/12-18:25:14.827764 171ee3000 Delete type=3 #2 +2026/08/12-18:41:45.666832 17391f000 Delete type=3 #1 diff --git a/packs/gear/LOG.old b/packs/gear/LOG.old deleted file mode 100644 index 75dd63f..0000000 --- a/packs/gear/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:00.998955 172a7f000 Delete type=3 #1 diff --git a/packs/gear/MANIFEST-000002 b/packs/gear/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/gear/MANIFEST-000002 differ diff --git a/packs/gear/MANIFEST-000004 b/packs/gear/MANIFEST-000004 deleted file mode 100644 index f7cd73c..0000000 Binary files a/packs/gear/MANIFEST-000004 and /dev/null differ diff --git a/packs/lastadmission/000003.log b/packs/lastadmission/000003.log new file mode 100644 index 0000000..817f360 Binary files /dev/null and b/packs/lastadmission/000003.log differ diff --git a/packs/lastadmission/000005.ldb b/packs/lastadmission/000005.ldb deleted file mode 100644 index a96263c..0000000 Binary files a/packs/lastadmission/000005.ldb and /dev/null differ diff --git a/packs/lastadmission/000006.log b/packs/lastadmission/000006.log deleted file mode 100644 index 6eb7bd2..0000000 Binary files a/packs/lastadmission/000006.log and /dev/null differ diff --git a/packs/lastadmission/CURRENT b/packs/lastadmission/CURRENT index cacca75..1a84852 100644 --- a/packs/lastadmission/CURRENT +++ b/packs/lastadmission/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/lastadmission/LOG b/packs/lastadmission/LOG index c76a441..b2bdb1b 100644 --- a/packs/lastadmission/LOG +++ b/packs/lastadmission/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.839430 1726ef000 Recovering log #3 -2026/08/12-18:25:14.839716 1726ef000 Level-0 table #5: started -2026/08/12-18:25:14.840052 1726ef000 Level-0 table #5: 44390 bytes OK -2026/08/12-18:25:14.840621 1726ef000 Delete type=0 #3 -2026/08/12-18:25:14.840694 1726ef000 Delete type=3 #2 +2026/08/12-18:41:45.717519 17412b000 Delete type=3 #1 diff --git a/packs/lastadmission/LOG.old b/packs/lastadmission/LOG.old deleted file mode 100644 index 95bad1f..0000000 --- a/packs/lastadmission/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.048880 17328b000 Delete type=3 #1 diff --git a/packs/lastadmission/MANIFEST-000002 b/packs/lastadmission/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/lastadmission/MANIFEST-000002 differ diff --git a/packs/lastadmission/MANIFEST-000004 b/packs/lastadmission/MANIFEST-000004 deleted file mode 100644 index a50cc98..0000000 Binary files a/packs/lastadmission/MANIFEST-000004 and /dev/null differ diff --git a/packs/npcs/000003.log b/packs/npcs/000003.log new file mode 100644 index 0000000..09b2bf6 Binary files /dev/null and b/packs/npcs/000003.log differ diff --git a/packs/npcs/000005.ldb b/packs/npcs/000005.ldb deleted file mode 100644 index 29f69de..0000000 Binary files a/packs/npcs/000005.ldb and /dev/null differ diff --git a/packs/npcs/000006.log b/packs/npcs/000006.log deleted file mode 100644 index ac2ef10..0000000 Binary files a/packs/npcs/000006.log and /dev/null differ diff --git a/packs/npcs/CURRENT b/packs/npcs/CURRENT index cacca75..1a84852 100644 --- a/packs/npcs/CURRENT +++ b/packs/npcs/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/npcs/LOG b/packs/npcs/LOG index 0f2f298..86ac18a 100644 --- a/packs/npcs/LOG +++ b/packs/npcs/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.812575 1726ef000 Recovering log #3 -2026/08/12-18:25:14.814591 1726ef000 Level-0 table #5: started -2026/08/12-18:25:14.816158 1726ef000 Level-0 table #5: 225945 bytes OK -2026/08/12-18:25:14.816434 1726ef000 Delete type=0 #3 -2026/08/12-18:25:14.816497 1726ef000 Delete type=3 #2 +2026/08/12-18:41:45.701249 173113000 Delete type=3 #1 diff --git a/packs/npcs/LOG.old b/packs/npcs/LOG.old deleted file mode 100644 index ba23a00..0000000 --- a/packs/npcs/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.033123 172a7f000 Delete type=3 #1 diff --git a/packs/npcs/MANIFEST-000002 b/packs/npcs/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/npcs/MANIFEST-000002 differ diff --git a/packs/npcs/MANIFEST-000004 b/packs/npcs/MANIFEST-000004 deleted file mode 100644 index 116e469..0000000 Binary files a/packs/npcs/MANIFEST-000004 and /dev/null differ diff --git a/packs/powers/000003.log b/packs/powers/000003.log new file mode 100644 index 0000000..d723043 Binary files /dev/null and b/packs/powers/000003.log differ diff --git a/packs/powers/000005.ldb b/packs/powers/000005.ldb deleted file mode 100644 index 7f540c6..0000000 Binary files a/packs/powers/000005.ldb and /dev/null differ diff --git a/packs/powers/000006.log b/packs/powers/000006.log deleted file mode 100644 index 43e306f..0000000 Binary files a/packs/powers/000006.log and /dev/null differ diff --git a/packs/powers/CURRENT b/packs/powers/CURRENT index cacca75..1a84852 100644 --- a/packs/powers/CURRENT +++ b/packs/powers/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/powers/LOG b/packs/powers/LOG index e4bd61d..b88a9bc 100644 --- a/packs/powers/LOG +++ b/packs/powers/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.822117 173707000 Recovering log #3 -2026/08/12-18:25:14.822240 173707000 Level-0 table #5: started -2026/08/12-18:25:14.822383 173707000 Level-0 table #5: 3295 bytes OK -2026/08/12-18:25:14.822727 173707000 Delete type=0 #3 -2026/08/12-18:25:14.822771 173707000 Delete type=3 #2 +2026/08/12-18:41:45.728905 173113000 Delete type=3 #1 diff --git a/packs/powers/LOG.old b/packs/powers/LOG.old deleted file mode 100644 index b569b0d..0000000 --- a/packs/powers/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.058642 173a97000 Delete type=3 #1 diff --git a/packs/powers/MANIFEST-000002 b/packs/powers/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/powers/MANIFEST-000002 differ diff --git a/packs/powers/MANIFEST-000004 b/packs/powers/MANIFEST-000004 deleted file mode 100644 index 20de082..0000000 Binary files a/packs/powers/MANIFEST-000004 and /dev/null differ diff --git a/packs/pregens/000003.log b/packs/pregens/000003.log new file mode 100644 index 0000000..b39d203 Binary files /dev/null and b/packs/pregens/000003.log differ diff --git a/packs/pregens/000005.ldb b/packs/pregens/000005.ldb deleted file mode 100644 index 88aa716..0000000 Binary files a/packs/pregens/000005.ldb and /dev/null differ diff --git a/packs/pregens/000008.log b/packs/pregens/000008.log deleted file mode 100644 index ccd9db2..0000000 Binary files a/packs/pregens/000008.log and /dev/null differ diff --git a/packs/pregens/CURRENT b/packs/pregens/CURRENT index 875cf23..1a84852 100644 --- a/packs/pregens/CURRENT +++ b/packs/pregens/CURRENT @@ -1 +1 @@ -MANIFEST-000007 +MANIFEST-000002 diff --git a/packs/pregens/LOG b/packs/pregens/LOG index 469e462..ce0ed96 100644 --- a/packs/pregens/LOG +++ b/packs/pregens/LOG @@ -1,3 +1 @@ -2026/08/12-18:25:14.806453 172efb000 Recovering log #6 -2026/08/12-18:25:14.806833 172efb000 Delete type=0 #6 -2026/08/12-18:25:14.806857 172efb000 Delete type=3 #4 +2026/08/12-18:41:45.686790 17412b000 Delete type=3 #1 diff --git a/packs/pregens/LOG.old b/packs/pregens/LOG.old deleted file mode 100644 index 5fe1039..0000000 --- a/packs/pregens/LOG.old +++ /dev/null @@ -1,5 +0,0 @@ -2026/08/12-18:25:01.665437 16f483000 Recovering log #3 -2026/08/12-18:25:01.667727 16f483000 Level-0 table #5: started -2026/08/12-18:25:01.671815 16f483000 Level-0 table #5: 545293 bytes OK -2026/08/12-18:25:01.672145 16f483000 Delete type=0 #3 -2026/08/12-18:25:01.672193 16f483000 Delete type=3 #2 diff --git a/packs/pregens/MANIFEST-000002 b/packs/pregens/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/pregens/MANIFEST-000002 differ diff --git a/packs/pregens/MANIFEST-000007 b/packs/pregens/MANIFEST-000007 deleted file mode 100644 index 3052ee6..0000000 Binary files a/packs/pregens/MANIFEST-000007 and /dev/null differ diff --git a/packs/primer/000003.log b/packs/primer/000003.log new file mode 100644 index 0000000..fff1285 Binary files /dev/null and b/packs/primer/000003.log differ diff --git a/packs/primer/000005.ldb b/packs/primer/000005.ldb deleted file mode 100644 index 669e7b1..0000000 Binary files a/packs/primer/000005.ldb and /dev/null differ diff --git a/packs/primer/000006.log b/packs/primer/000006.log deleted file mode 100644 index daa37bb..0000000 Binary files a/packs/primer/000006.log and /dev/null differ diff --git a/packs/primer/CURRENT b/packs/primer/CURRENT index cacca75..1a84852 100644 --- a/packs/primer/CURRENT +++ b/packs/primer/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/primer/LOG b/packs/primer/LOG index e7244e4..6de1ebf 100644 --- a/packs/primer/LOG +++ b/packs/primer/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.829681 173707000 Recovering log #3 -2026/08/12-18:25:14.829858 173707000 Level-0 table #5: started -2026/08/12-18:25:14.830111 173707000 Level-0 table #5: 21613 bytes OK -2026/08/12-18:25:14.830352 173707000 Delete type=0 #3 -2026/08/12-18:25:14.830387 173707000 Delete type=3 #2 +2026/08/12-18:41:45.725345 17412b000 Delete type=3 #1 diff --git a/packs/primer/LOG.old b/packs/primer/LOG.old deleted file mode 100644 index affbd6f..0000000 --- a/packs/primer/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.055569 172a7f000 Delete type=3 #1 diff --git a/packs/primer/MANIFEST-000002 b/packs/primer/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/primer/MANIFEST-000002 differ diff --git a/packs/primer/MANIFEST-000004 b/packs/primer/MANIFEST-000004 deleted file mode 100644 index 2ce4ec2..0000000 Binary files a/packs/primer/MANIFEST-000004 and /dev/null differ diff --git a/packs/prologue/000003.log b/packs/prologue/000003.log new file mode 100644 index 0000000..9b97058 Binary files /dev/null and b/packs/prologue/000003.log differ diff --git a/packs/prologue/000005.ldb b/packs/prologue/000005.ldb deleted file mode 100644 index 03d2f7f..0000000 Binary files a/packs/prologue/000005.ldb and /dev/null differ diff --git a/packs/prologue/000006.log b/packs/prologue/000006.log deleted file mode 100644 index 2d03e81..0000000 Binary files a/packs/prologue/000006.log and /dev/null differ diff --git a/packs/prologue/CURRENT b/packs/prologue/CURRENT index cacca75..1a84852 100644 --- a/packs/prologue/CURRENT +++ b/packs/prologue/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/prologue/LOG b/packs/prologue/LOG index aa9e227..1fea6ae 100644 --- a/packs/prologue/LOG +++ b/packs/prologue/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.841492 1726ef000 Recovering log #3 -2026/08/12-18:25:14.841753 1726ef000 Level-0 table #5: started -2026/08/12-18:25:14.842198 1726ef000 Level-0 table #5: 43953 bytes OK -2026/08/12-18:25:14.842469 1726ef000 Delete type=0 #3 -2026/08/12-18:25:14.842504 1726ef000 Delete type=3 #2 +2026/08/12-18:41:45.721830 17391f000 Delete type=3 #1 diff --git a/packs/prologue/LOG.old b/packs/prologue/LOG.old deleted file mode 100644 index f39ad32..0000000 --- a/packs/prologue/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.052553 173a97000 Delete type=3 #1 diff --git a/packs/prologue/MANIFEST-000002 b/packs/prologue/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/prologue/MANIFEST-000002 differ diff --git a/packs/prologue/MANIFEST-000004 b/packs/prologue/MANIFEST-000004 deleted file mode 100644 index 8e0eaa0..0000000 Binary files a/packs/prologue/MANIFEST-000004 and /dev/null differ diff --git a/packs/rules/000003.log b/packs/rules/000003.log new file mode 100644 index 0000000..15e7e16 Binary files /dev/null and b/packs/rules/000003.log differ diff --git a/packs/rules/000005.ldb b/packs/rules/000005.ldb deleted file mode 100644 index c8f9c7d..0000000 Binary files a/packs/rules/000005.ldb and /dev/null differ diff --git a/packs/rules/000006.log b/packs/rules/000006.log deleted file mode 100644 index 7b08998..0000000 Binary files a/packs/rules/000006.log and /dev/null differ diff --git a/packs/rules/CURRENT b/packs/rules/CURRENT index cacca75..1a84852 100644 --- a/packs/rules/CURRENT +++ b/packs/rules/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/rules/LOG b/packs/rules/LOG index 6a4d3c6..5d3f62e 100644 --- a/packs/rules/LOG +++ b/packs/rules/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.831296 172efb000 Recovering log #3 -2026/08/12-18:25:14.831754 172efb000 Level-0 table #5: started -2026/08/12-18:25:14.832094 172efb000 Level-0 table #5: 33484 bytes OK -2026/08/12-18:25:14.832323 172efb000 Delete type=0 #3 -2026/08/12-18:25:14.832355 172efb000 Delete type=3 #2 +2026/08/12-18:41:45.732314 17391f000 Delete type=3 #1 diff --git a/packs/rules/LOG.old b/packs/rules/LOG.old deleted file mode 100644 index 6c94a7d..0000000 --- a/packs/rules/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.062100 17328b000 Delete type=3 #1 diff --git a/packs/rules/MANIFEST-000002 b/packs/rules/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/rules/MANIFEST-000002 differ diff --git a/packs/rules/MANIFEST-000004 b/packs/rules/MANIFEST-000004 deleted file mode 100644 index 15f0607..0000000 Binary files a/packs/rules/MANIFEST-000004 and /dev/null differ diff --git a/packs/skills/000003.log b/packs/skills/000003.log new file mode 100644 index 0000000..2a55440 Binary files /dev/null and b/packs/skills/000003.log differ diff --git a/packs/skills/000005.ldb b/packs/skills/000005.ldb deleted file mode 100644 index eb948ea..0000000 Binary files a/packs/skills/000005.ldb and /dev/null differ diff --git a/packs/skills/000006.log b/packs/skills/000006.log deleted file mode 100644 index 1989ee1..0000000 Binary files a/packs/skills/000006.log and /dev/null differ diff --git a/packs/skills/CURRENT b/packs/skills/CURRENT index cacca75..1a84852 100644 --- a/packs/skills/CURRENT +++ b/packs/skills/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/skills/LOG b/packs/skills/LOG index 95f58fb..ca7c052 100644 --- a/packs/skills/LOG +++ b/packs/skills/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.819152 173707000 Recovering log #3 -2026/08/12-18:25:14.819603 173707000 Level-0 table #5: started -2026/08/12-18:25:14.819785 173707000 Level-0 table #5: 7590 bytes OK -2026/08/12-18:25:14.820023 173707000 Delete type=0 #3 -2026/08/12-18:25:14.820059 173707000 Delete type=3 #2 +2026/08/12-18:41:45.659409 172907000 Delete type=3 #1 diff --git a/packs/skills/LOG.old b/packs/skills/LOG.old deleted file mode 100644 index e54e049..0000000 --- a/packs/skills/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:00.991223 172a7f000 Delete type=3 #1 diff --git a/packs/skills/MANIFEST-000002 b/packs/skills/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/skills/MANIFEST-000002 differ diff --git a/packs/skills/MANIFEST-000004 b/packs/skills/MANIFEST-000004 deleted file mode 100644 index 90efb97..0000000 Binary files a/packs/skills/MANIFEST-000004 and /dev/null differ diff --git a/packs/slice/000003.log b/packs/slice/000003.log new file mode 100644 index 0000000..39926e8 Binary files /dev/null and b/packs/slice/000003.log differ diff --git a/packs/slice/000005.ldb b/packs/slice/000005.ldb deleted file mode 100644 index ac4df01..0000000 Binary files a/packs/slice/000005.ldb and /dev/null differ diff --git a/packs/slice/000006.log b/packs/slice/000006.log deleted file mode 100644 index c25ac75..0000000 Binary files a/packs/slice/000006.log and /dev/null differ diff --git a/packs/slice/CURRENT b/packs/slice/CURRENT index cacca75..1a84852 100644 --- a/packs/slice/CURRENT +++ b/packs/slice/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/slice/LOG b/packs/slice/LOG index 746ebd4..e6e8f8e 100644 --- a/packs/slice/LOG +++ b/packs/slice/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.843251 1726ef000 Recovering log #3 -2026/08/12-18:25:14.843315 1726ef000 Level-0 table #5: started -2026/08/12-18:25:14.843666 1726ef000 Level-0 table #5: 16902 bytes OK -2026/08/12-18:25:14.843880 1726ef000 Delete type=0 #3 -2026/08/12-18:25:14.843909 1726ef000 Delete type=3 #2 +2026/08/12-18:41:45.727208 173113000 Delete type=3 #1 diff --git a/packs/slice/LOG.old b/packs/slice/LOG.old deleted file mode 100644 index 8f960c6..0000000 --- a/packs/slice/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.057365 1742a3000 Delete type=3 #1 diff --git a/packs/slice/MANIFEST-000002 b/packs/slice/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/slice/MANIFEST-000002 differ diff --git a/packs/slice/MANIFEST-000004 b/packs/slice/MANIFEST-000004 deleted file mode 100644 index 0966a50..0000000 Binary files a/packs/slice/MANIFEST-000004 and /dev/null differ diff --git a/packs/starter/000003.log b/packs/starter/000003.log new file mode 100644 index 0000000..02f266f Binary files /dev/null and b/packs/starter/000003.log differ diff --git a/packs/starter/000005.ldb b/packs/starter/000005.ldb deleted file mode 100644 index c0f9d9b..0000000 Binary files a/packs/starter/000005.ldb and /dev/null differ diff --git a/packs/starter/000006.log b/packs/starter/000006.log deleted file mode 100644 index aaf167c..0000000 Binary files a/packs/starter/000006.log and /dev/null differ diff --git a/packs/starter/CURRENT b/packs/starter/CURRENT index cacca75..1a84852 100644 --- a/packs/starter/CURRENT +++ b/packs/starter/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/starter/LOG b/packs/starter/LOG index 3526f9c..870547d 100644 --- a/packs/starter/LOG +++ b/packs/starter/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.834950 1726ef000 Recovering log #3 -2026/08/12-18:25:14.836174 1726ef000 Level-0 table #5: started -2026/08/12-18:25:14.836766 1726ef000 Level-0 table #5: 82299 bytes OK -2026/08/12-18:25:14.837010 1726ef000 Delete type=0 #3 -2026/08/12-18:25:14.837044 1726ef000 Delete type=3 #2 +2026/08/12-18:41:45.711308 17412b000 Delete type=3 #1 diff --git a/packs/starter/LOG.old b/packs/starter/LOG.old deleted file mode 100644 index fbafad2..0000000 --- a/packs/starter/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.042866 17328b000 Delete type=3 #1 diff --git a/packs/starter/MANIFEST-000002 b/packs/starter/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/starter/MANIFEST-000002 differ diff --git a/packs/starter/MANIFEST-000004 b/packs/starter/MANIFEST-000004 deleted file mode 100644 index 87687fc..0000000 Binary files a/packs/starter/MANIFEST-000004 and /dev/null differ diff --git a/packs/tables/000003.log b/packs/tables/000003.log new file mode 100644 index 0000000..f125b7d Binary files /dev/null and b/packs/tables/000003.log differ diff --git a/packs/tables/000005.ldb b/packs/tables/000005.ldb deleted file mode 100644 index 64baa1c..0000000 Binary files a/packs/tables/000005.ldb and /dev/null differ diff --git a/packs/tables/000006.log b/packs/tables/000006.log deleted file mode 100644 index d5e06f3..0000000 Binary files a/packs/tables/000006.log and /dev/null differ diff --git a/packs/tables/CURRENT b/packs/tables/CURRENT index cacca75..1a84852 100644 --- a/packs/tables/CURRENT +++ b/packs/tables/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/tables/LOG b/packs/tables/LOG index 6b7a858..c7b272c 100644 --- a/packs/tables/LOG +++ b/packs/tables/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.844722 173707000 Recovering log #3 -2026/08/12-18:25:14.844812 173707000 Level-0 table #5: started -2026/08/12-18:25:14.844927 173707000 Level-0 table #5: 3739 bytes OK -2026/08/12-18:25:14.845139 173707000 Delete type=0 #3 -2026/08/12-18:25:14.845172 173707000 Delete type=3 #2 +2026/08/12-18:41:45.705364 17412b000 Delete type=3 #1 diff --git a/packs/tables/LOG.old b/packs/tables/LOG.old deleted file mode 100644 index 9977ee7..0000000 --- a/packs/tables/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.037171 17328b000 Delete type=3 #1 diff --git a/packs/tables/MANIFEST-000002 b/packs/tables/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/tables/MANIFEST-000002 differ diff --git a/packs/tables/MANIFEST-000004 b/packs/tables/MANIFEST-000004 deleted file mode 100644 index 004ff30..0000000 Binary files a/packs/tables/MANIFEST-000004 and /dev/null differ diff --git a/packs/talents/000003.log b/packs/talents/000003.log new file mode 100644 index 0000000..443b7ea Binary files /dev/null and b/packs/talents/000003.log differ diff --git a/packs/talents/000005.ldb b/packs/talents/000005.ldb deleted file mode 100644 index fb653de..0000000 Binary files a/packs/talents/000005.ldb and /dev/null differ diff --git a/packs/talents/000006.log b/packs/talents/000006.log deleted file mode 100644 index 29003f7..0000000 Binary files a/packs/talents/000006.log and /dev/null differ diff --git a/packs/talents/CURRENT b/packs/talents/CURRENT index cacca75..1a84852 100644 --- a/packs/talents/CURRENT +++ b/packs/talents/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/talents/LOG b/packs/talents/LOG index b66666a..89cfe2e 100644 --- a/packs/talents/LOG +++ b/packs/talents/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.820693 171ee3000 Recovering log #3 -2026/08/12-18:25:14.820828 171ee3000 Level-0 table #5: started -2026/08/12-18:25:14.821041 171ee3000 Level-0 table #5: 5770 bytes OK -2026/08/12-18:25:14.821296 171ee3000 Delete type=0 #3 -2026/08/12-18:25:14.821332 171ee3000 Delete type=3 #2 +2026/08/12-18:41:45.662077 172907000 Delete type=3 #1 diff --git a/packs/talents/LOG.old b/packs/talents/LOG.old deleted file mode 100644 index 2d7458c..0000000 --- a/packs/talents/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:00.993769 1742a3000 Delete type=3 #1 diff --git a/packs/talents/MANIFEST-000002 b/packs/talents/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/talents/MANIFEST-000002 differ diff --git a/packs/talents/MANIFEST-000004 b/packs/talents/MANIFEST-000004 deleted file mode 100644 index f8c6b47..0000000 Binary files a/packs/talents/MANIFEST-000004 and /dev/null differ diff --git a/packs/vehicles/000003.log b/packs/vehicles/000003.log new file mode 100644 index 0000000..9950ce5 Binary files /dev/null and b/packs/vehicles/000003.log differ diff --git a/packs/vehicles/000005.ldb b/packs/vehicles/000005.ldb deleted file mode 100644 index f6b2cd4..0000000 Binary files a/packs/vehicles/000005.ldb and /dev/null differ diff --git a/packs/vehicles/000006.log b/packs/vehicles/000006.log deleted file mode 100644 index 47800e2..0000000 Binary files a/packs/vehicles/000006.log and /dev/null differ diff --git a/packs/vehicles/CURRENT b/packs/vehicles/CURRENT index cacca75..1a84852 100644 --- a/packs/vehicles/CURRENT +++ b/packs/vehicles/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/vehicles/LOG b/packs/vehicles/LOG index d85cf6d..a1f5bd0 100644 --- a/packs/vehicles/LOG +++ b/packs/vehicles/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.828480 1726ef000 Recovering log #3 -2026/08/12-18:25:14.828626 1726ef000 Level-0 table #5: started -2026/08/12-18:25:14.828783 1726ef000 Level-0 table #5: 6939 bytes OK -2026/08/12-18:25:14.828982 1726ef000 Delete type=0 #3 -2026/08/12-18:25:14.829012 1726ef000 Delete type=3 #2 +2026/08/12-18:41:45.668653 17412b000 Delete type=3 #1 diff --git a/packs/vehicles/LOG.old b/packs/vehicles/LOG.old deleted file mode 100644 index dd58b25..0000000 --- a/packs/vehicles/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:01.000633 17328b000 Delete type=3 #1 diff --git a/packs/vehicles/MANIFEST-000002 b/packs/vehicles/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/vehicles/MANIFEST-000002 differ diff --git a/packs/vehicles/MANIFEST-000004 b/packs/vehicles/MANIFEST-000004 deleted file mode 100644 index d4d73b7..0000000 Binary files a/packs/vehicles/MANIFEST-000004 and /dev/null differ diff --git a/packs/weapons/000003.log b/packs/weapons/000003.log new file mode 100644 index 0000000..e1488ed Binary files /dev/null and b/packs/weapons/000003.log differ diff --git a/packs/weapons/000005.ldb b/packs/weapons/000005.ldb deleted file mode 100644 index 742beba..0000000 Binary files a/packs/weapons/000005.ldb and /dev/null differ diff --git a/packs/weapons/000006.log b/packs/weapons/000006.log deleted file mode 100644 index 4d427a6..0000000 Binary files a/packs/weapons/000006.log and /dev/null differ diff --git a/packs/weapons/CURRENT b/packs/weapons/CURRENT index cacca75..1a84852 100644 --- a/packs/weapons/CURRENT +++ b/packs/weapons/CURRENT @@ -1 +1 @@ -MANIFEST-000004 +MANIFEST-000002 diff --git a/packs/weapons/LOG b/packs/weapons/LOG index 0acc0c0..76a1df1 100644 --- a/packs/weapons/LOG +++ b/packs/weapons/LOG @@ -1,5 +1 @@ -2026/08/12-18:25:14.823695 171ee3000 Recovering log #3 -2026/08/12-18:25:14.824080 171ee3000 Level-0 table #5: started -2026/08/12-18:25:14.824417 171ee3000 Level-0 table #5: 14767 bytes OK -2026/08/12-18:25:14.824758 171ee3000 Delete type=0 #3 -2026/08/12-18:25:14.824810 171ee3000 Delete type=3 #2 +2026/08/12-18:41:45.663680 17412b000 Delete type=3 #1 diff --git a/packs/weapons/LOG.old b/packs/weapons/LOG.old deleted file mode 100644 index 5162d36..0000000 --- a/packs/weapons/LOG.old +++ /dev/null @@ -1 +0,0 @@ -2026/08/12-18:25:00.995275 1742a3000 Delete type=3 #1 diff --git a/packs/weapons/MANIFEST-000002 b/packs/weapons/MANIFEST-000002 new file mode 100644 index 0000000..bbbc585 Binary files /dev/null and b/packs/weapons/MANIFEST-000002 differ diff --git a/packs/weapons/MANIFEST-000004 b/packs/weapons/MANIFEST-000004 deleted file mode 100644 index 6a582af..0000000 Binary files a/packs/weapons/MANIFEST-000004 and /dev/null differ diff --git a/styles/ringbrp.css b/styles/ringbrp.css index 0e4b59c..3a0b5f7 100644 --- a/styles/ringbrp.css +++ b/styles/ringbrp.css @@ -410,11 +410,19 @@ column-fill: balance; } .rb-skills { list-style: none; margin: 0; padding: 0; } +/* Seven columns: tick, icon, name, value, bands, edit, delete. The NPC sheet's rows + carry four children, not seven, so it gets its own template below — sharing this one + put the name in a 13px column and the value in a 20px one, and the whole list + overlapped itself. Nobody saw it because nobody had ever opened an NPC sheet. */ .rb-skill { display: grid; grid-template-columns: 13px 20px minmax(0,1fr) 44px 104px 15px 15px; gap: 5px; align-items: center; min-height: 26px; padding: 0; border-bottom: 1px solid var(--rb-hairline); } +/* name · value · edit · delete */ +.rb-npc .rb-skill { + grid-template-columns: minmax(0,1fr) 46px 15px 15px; +} .rb-skill:hover { background: var(--rb-blue); } .rb-tick { width: 12px; height: 12px; border: 1px solid var(--rb-muted); display: inline-block; } .rb-tick.on { background: var(--rb-yellow); border-color: var(--rb-yellow); } diff --git a/system.json b/system.json index cc9ee03..c9f010b 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "ringbrp", "title": "The Custodians", "description": "A Basic Roleplaying game of agents who cross the crossing to contain what should not be there — and who come back a little less from here each time.", - "version": "1.0.0", + "version": "1.0.1", "compatibility": { "minimum": 13, "verified": "14.364" diff --git a/templates/npc-sheet.hbs b/templates/npc-sheet.hbs index e9b3126..efde91a 100644 --- a/templates/npc-sheet.hbs +++ b/templates/npc-sheet.hbs @@ -40,7 +40,10 @@
{{#each RINGBRP.categories as |cat key|}} - {{#if (lookup ../skillsByCategory key).length}} + {{! Handlebars cannot read a property off a subexpression — `(lookup a b).length` + is a parse error, and a parse error in a template is a sheet that never opens. + #if already treats an empty array as falsy, so the length was never needed. }} + {{#if (lookup ../skillsByCategory key)}}

{{localize cat.label}}+{{lookup ../sys.categoryBonus key}}

diff --git a/tools/build-packs.mjs b/tools/build-packs.mjs index e7d64dd..b6c2316 100644 --- a/tools/build-packs.mjs +++ b/tools/build-packs.mjs @@ -503,6 +503,11 @@ async function writePack(packName, entries) { // every sheet in the system and gives no error the user would connect to it. execFileSync(process.execPath, [new URL("check-lang.mjs", import.meta.url).pathname], { stdio: "inherit" }); + // And refuse if a template will not compile. A parse error in a .hbs is a sheet + // that never opens, and no other guard reads templates — npc-sheet.hbs shipped + // broken and every NPC in the system threw on click. + execFileSync(process.execPath, [new URL("check-templates.mjs", import.meta.url).pathname], + { stdio: "inherit" }); // And refuse if a rule a play-through already found is broken again. The static // guards cannot tell whether a rule is READ; these tests can. execFileSync(process.execPath, [new URL("check-behaviour.mjs", import.meta.url).pathname], diff --git a/tools/check-templates.mjs b/tools/check-templates.mjs new file mode 100644 index 0000000..dccd3ed --- /dev/null +++ b/tools/check-templates.mjs @@ -0,0 +1,73 @@ +/** + * TEMPLATE GUARD. + * + * Every .hbs in templates/ must compile. This exists because it did not, and shipped: + * npc-sheet.hbs line 43 read + * + * {{#if (lookup ../skillsByCategory key).length}} + * + * and Handlebars cannot read a property off a subexpression. That is a PARSE error, so + * the template never compiled, so every NPC sheet in the system threw on open — the + * Natives & Threats compendium, the starter's enemy roster, the whole LAST ADMISSION + * cast. It was invisible to every other guard: check-rules reads .mjs, check-behaviour + * says in its own header that it cannot reach sheets, and the play-throughs drove the + * system through its API rather than by clicking, so no NPC sheet was ever opened. + * + * The lesson is narrow and cheap to hold: a template is code, and code that is never + * compiled by the build is code nobody has checked. This compiles all of them in about + * a tenth of a second. + * + * It cannot tell you a template is CORRECT — only that Handlebars will accept it. What + * a sheet looks like once it has data in it is still verified by opening one. + */ + +import Handlebars from "handlebars"; +import { readFile, readdir } from "node:fs/promises"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const DIR = path.join(ROOT, "templates"); + +async function hbsFiles(dir) { + const out = []; + for (const e of await readdir(dir, { withFileTypes: true })) { + const full = path.join(dir, e.name); + if (e.isDirectory()) out.push(...await hbsFiles(full)); + else if (e.name.endsWith(".hbs")) out.push(full); + } + return out; +} + +const files = (await hbsFiles(DIR)).sort(); +const failures = []; + +for (const file of files) { + const src = await readFile(file, "utf8"); + const rel = path.relative(ROOT, file); + try { + Handlebars.precompile(src); + } catch (err) { + // Handlebars reports the line in its message; keep it, it is the useful part. + failures.push(` ${rel}\n ${String(err.message).split("\n")[0]}`); + continue; + } + // The specific shape that caused this file to exist. Handlebars' own parser catches + // it, but naming it makes the failure say WHY rather than just where. Comments are + // blanked first, keeping line numbers, or this file's own explanation of the bug + // would report the bug. + const scan = src + .replace(/\{\{!--[\s\S]*?--\}\}|\{\{![\s\S]*?\}\}/g, m => m.replace(/[^\n]/g, " ")); + const bad = scan.split("\n").findIndex(l => /\)\s*\.[a-zA-Z_]/.test(l)); + if (bad >= 0) { + failures.push(` ${rel}:${bad + 1}\n property read off a subexpression — ` + + `Handlebars cannot do (helper x).prop`); + } +} + +if (failures.length) { + console.error(`check-templates: ${failures.length} template(s) will not compile\n` + + failures.join("\n")); + process.exit(1); +} +console.log(`check-templates: OK — ${files.length} templates compile`);