@team-antioch/sc2-adjutant 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +109 -2
- package/blender/render-set.py +507 -0
- package/data/blizzard-baseline.json +3061 -0
- package/data/button-hotkeys.json +5722 -0
- package/data/catalog-schema.json +1 -0
- package/data/cinematic-sets/catalog.json +180 -0
- package/data/cinematic-sets/looks.json +6555 -0
- package/data/cliff-extracted.json +1524 -0
- package/data/display-channels.json +2838 -0
- package/data/doodad-extracted.json +20075 -0
- package/data/doodad-facings.json +64 -0
- package/data/doodad-models.json +2598 -0
- package/data/doodad-outlines.json +21 -0
- package/data/doodad-sheet-readings.json +1418 -0
- package/data/doodads.json +15258 -0
- package/data/game-assets.json +50909 -0
- package/data/game-models.json +19926 -0
- package/data/light-catalog.json +639 -0
- package/data/model-anims.json +4438 -0
- package/data/model-footprints.json +1149 -0
- package/data/model-guide.json +1 -0
- package/data/music-sounds.json +1006 -0
- package/data/package-entries.json +50164 -0
- package/data/tech-catalog.json +17581 -0
- package/data/terrain-object-catalog.json +16873 -0
- package/data/texture-extracted.json +6359 -0
- package/data/tileset-lights.json +121 -0
- package/data/tileset-sky.json +120 -0
- package/data/trigger-libraries.json +1 -0
- package/data/ui-frame-paths.json +48882 -0
- package/data/water-types.json +26 -0
- package/dist/ai/enemy-ai.d.ts +49 -0
- package/dist/ai/enemy-ai.js +48 -0
- package/dist/ai/unit-speeds.d.ts +1 -0
- package/dist/ai/unit-speeds.js +40 -0
- package/dist/capture/area-tour.d.ts +61 -0
- package/dist/capture/area-tour.js +133 -0
- package/dist/capture/bank-fixtures.d.ts +13 -0
- package/dist/capture/bank-fixtures.js +35 -0
- package/dist/capture/bank-snapshots.d.ts +95 -0
- package/dist/capture/bank-snapshots.js +302 -0
- package/dist/capture/capture-copy.d.ts +52 -0
- package/dist/capture/capture-copy.js +217 -0
- package/dist/capture/edit-capture.d.ts +44 -0
- package/dist/capture/edit-capture.js +126 -0
- package/dist/capture/editor-broker-client.d.ts +190 -0
- package/dist/capture/editor-broker-client.js +198 -0
- package/dist/capture/editor-broker.d.ts +30 -0
- package/dist/capture/editor-broker.js +623 -0
- package/dist/capture/effect-tour.d.ts +113 -0
- package/dist/capture/effect-tour.js +283 -0
- package/dist/capture/effect-video.d.ts +74 -0
- package/dist/capture/effect-video.js +173 -0
- package/dist/capture/exemplar-capture.d.ts +82 -0
- package/dist/capture/exemplar-capture.js +94 -0
- package/dist/capture/export-sets.d.ts +93 -0
- package/dist/capture/export-sets.js +155 -0
- package/dist/capture/game-cards.d.ts +23 -0
- package/dist/capture/game-cards.js +39 -0
- package/dist/capture/pick-lighting.d.ts +8 -0
- package/dist/capture/pick-lighting.js +22 -0
- package/dist/capture/research-archive.d.ts +5 -0
- package/dist/capture/research-archive.js +15 -0
- package/dist/capture/set-capture.d.ts +43 -0
- package/dist/capture/set-capture.js +171 -0
- package/dist/capture/set-cards.d.ts +27 -0
- package/dist/capture/set-cards.js +189 -0
- package/dist/capture/set-views.d.ts +140 -0
- package/dist/capture/set-views.js +269 -0
- package/dist/capture/shots.d.ts +69 -0
- package/dist/capture/shots.js +107 -0
- package/dist/capture/stop-tour.d.ts +40 -0
- package/dist/capture/stop-tour.js +66 -0
- package/dist/capture/style-pack-captures.d.ts +67 -0
- package/dist/capture/style-pack-captures.js +172 -0
- package/dist/catalog/catalog-layer.d.ts +112 -0
- package/dist/catalog/catalog-layer.js +84 -0
- package/dist/catalog/composites.d.ts +8 -0
- package/dist/catalog/composites.js +13 -0
- package/dist/catalog/display-channels.d.ts +16 -0
- package/dist/catalog/display-channels.js +25 -0
- package/dist/catalog/doodad-notes-contribute.d.ts +69 -0
- package/dist/catalog/doodad-notes-contribute.js +308 -0
- package/dist/catalog/doodad-outlines.d.ts +50 -0
- package/dist/catalog/doodad-outlines.js +190 -0
- package/dist/catalog/doodad-search-page.d.ts +108 -0
- package/dist/catalog/doodad-search-page.js +209 -0
- package/dist/catalog/flare-lights.d.ts +15 -0
- package/dist/catalog/flare-lights.js +58 -0
- package/dist/catalog/host-model-renderer.d.ts +18 -0
- package/dist/catalog/host-model-renderer.js +42 -0
- package/dist/catalog/index-mod-doodads.d.ts +30 -0
- package/dist/catalog/index-mod-doodads.js +183 -0
- package/dist/catalog/light-catalog.d.ts +29 -0
- package/dist/catalog/light-catalog.js +16 -0
- package/dist/catalog/m3-display-channels.d.ts +2 -0
- package/dist/catalog/m3-display-channels.js +30 -0
- package/dist/catalog/m3-footprint.d.ts +91 -0
- package/dist/catalog/m3-footprint.js +184 -0
- package/dist/catalog/m3-mesh.d.ts +12 -0
- package/dist/catalog/m3-mesh.js +46 -0
- package/dist/catalog/m3-sequences.d.ts +27 -0
- package/dist/catalog/m3-sequences.js +49 -0
- package/dist/catalog/m3-textures.d.ts +28 -0
- package/dist/catalog/m3-textures.js +92 -0
- package/dist/catalog/mod-doodad-index.d.ts +231 -0
- package/dist/catalog/mod-doodad-index.js +240 -0
- package/dist/catalog/mod-doodad-notes.d.ts +13 -0
- package/dist/catalog/mod-doodad-notes.js +41 -0
- package/dist/catalog/model-anims.d.ts +59 -0
- package/dist/catalog/model-anims.js +129 -0
- package/dist/catalog/model-files.d.ts +21 -0
- package/dist/catalog/model-files.js +80 -0
- package/dist/catalog/model-footprints.d.ts +14 -0
- package/dist/catalog/model-footprints.js +19 -0
- package/dist/catalog/model-guides.d.ts +87 -0
- package/dist/catalog/model-guides.js +122 -0
- package/dist/catalog/music-sounds.d.ts +6 -0
- package/dist/catalog/music-sounds.js +17 -0
- package/dist/catalog/package-files.d.ts +15 -0
- package/dist/catalog/package-files.js +70 -0
- package/dist/catalog/record-doodad-outlines.d.ts +27 -0
- package/dist/catalog/record-doodad-outlines.js +79 -0
- package/dist/catalog/record-models.d.ts +41 -0
- package/dist/catalog/record-models.js +107 -0
- package/dist/catalog/record-workspace-model-anims.d.ts +27 -0
- package/dist/catalog/record-workspace-model-anims.js +125 -0
- package/dist/catalog/sheet-readings.d.ts +46 -0
- package/dist/catalog/sheet-readings.js +115 -0
- package/dist/catalog/stock-catalog.d.ts +106 -0
- package/dist/catalog/stock-catalog.js +217 -0
- package/dist/catalog/story-names.d.ts +7 -0
- package/dist/catalog/story-names.js +73 -0
- package/dist/catalog/tech-catalog.d.ts +21 -0
- package/dist/catalog/tech-catalog.js +52 -0
- package/dist/catalog/terrain-objects.d.ts +18 -0
- package/dist/catalog/terrain-objects.js +12 -0
- package/dist/catalog/texture-sheet.d.ts +20 -0
- package/dist/catalog/texture-sheet.js +14 -0
- package/dist/catalog/tileset-cliff-sets.d.ts +7 -0
- package/dist/catalog/tileset-cliff-sets.js +17 -0
- package/dist/catalog/tileset-lights.d.ts +8 -0
- package/dist/catalog/tileset-lights.js +17 -0
- package/dist/catalog/tileset-sky.d.ts +41 -0
- package/dist/catalog/tileset-sky.js +65 -0
- package/dist/catalog/tileset-textures.d.ts +24 -0
- package/dist/catalog/tileset-textures.js +45 -0
- package/dist/catalog/workspace-doodad-notes.d.ts +23 -0
- package/dist/catalog/workspace-doodad-notes.js +46 -0
- package/dist/catalog/workspace-doodad-search.d.ts +18 -0
- package/dist/catalog/workspace-doodad-search.js +69 -0
- package/dist/catalog/write-doodad-search-page.d.ts +79 -0
- package/dist/catalog/write-doodad-search-page.js +165 -0
- package/dist/cli/add-doodad-note.d.ts +1 -0
- package/dist/cli/add-doodad-note.js +42 -0
- package/dist/cli/capture-composite.d.ts +1 -0
- package/dist/cli/capture-composite.js +41 -0
- package/dist/cli/capture-edit.d.ts +1 -0
- package/dist/cli/capture-edit.js +67 -0
- package/dist/cli/capture-exemplars.d.ts +1 -0
- package/dist/cli/capture-exemplars.js +46 -0
- package/dist/cli/capture-sets.d.ts +1 -0
- package/dist/cli/capture-sets.js +31 -0
- package/dist/cli/capture-shots.d.ts +1 -0
- package/dist/cli/capture-shots.js +56 -0
- package/dist/cli/catalog-sets.d.ts +1 -0
- package/dist/cli/catalog-sets.js +58 -0
- package/dist/cli/check-layout.d.ts +1 -0
- package/dist/cli/check-layout.js +22 -0
- package/dist/cli/check-workspace.d.ts +1 -0
- package/dist/cli/check-workspace.js +31 -0
- package/dist/cli/compare-saves.d.ts +1 -0
- package/dist/cli/compare-saves.js +36 -0
- package/dist/cli/compile-cutscene.d.ts +1 -0
- package/dist/cli/compile-cutscene.js +46 -0
- package/dist/cli/compile-map-args.d.ts +13 -0
- package/dist/cli/compile-map-args.js +41 -0
- package/dist/cli/compile-map.d.ts +1 -0
- package/dist/cli/compile-map.js +33 -0
- package/dist/cli/compile-melee-map.d.ts +1 -0
- package/dist/cli/compile-melee-map.js +24 -0
- package/dist/cli/compile-mod.d.ts +1 -0
- package/dist/cli/compile-mod.js +46 -0
- package/dist/cli/contact-sheet.d.ts +1 -0
- package/dist/cli/contact-sheet.js +188 -0
- package/dist/cli/contribute-doodad-notes.d.ts +1 -0
- package/dist/cli/contribute-doodad-notes.js +46 -0
- package/dist/cli/convert-assets.d.ts +1 -0
- package/dist/cli/convert-assets.js +47 -0
- package/dist/cli/convert-entries.d.ts +1 -0
- package/dist/cli/convert-entries.js +34 -0
- package/dist/cli/convert-files.d.ts +1 -0
- package/dist/cli/convert-files.js +35 -0
- package/dist/cli/convert-library.d.ts +1 -0
- package/dist/cli/convert-library.js +34 -0
- package/dist/cli/convert-screenplay.d.ts +1 -0
- package/dist/cli/convert-screenplay.js +69 -0
- package/dist/cli/convert-sound-set.d.ts +1 -0
- package/dist/cli/convert-sound-set.js +25 -0
- package/dist/cli/convert-triggers.d.ts +1 -0
- package/dist/cli/convert-triggers.js +58 -0
- package/dist/cli/cutscene-census.d.ts +1 -0
- package/dist/cli/cutscene-census.js +49 -0
- package/dist/cli/display-channels.d.ts +1 -0
- package/dist/cli/display-channels.js +17 -0
- package/dist/cli/doodad-notes-args.d.ts +23 -0
- package/dist/cli/doodad-notes-args.js +71 -0
- package/dist/cli/doodad-outlines.d.ts +1 -0
- package/dist/cli/doodad-outlines.js +65 -0
- package/dist/cli/doodad-search-page-args.d.ts +17 -0
- package/dist/cli/doodad-search-page-args.js +54 -0
- package/dist/cli/doodad-search-page.d.ts +1 -0
- package/dist/cli/doodad-search-page.js +66 -0
- package/dist/cli/doodad-thumbnails.d.ts +1 -0
- package/dist/cli/doodad-thumbnails.js +114 -0
- package/dist/cli/drift-test.d.ts +1 -0
- package/dist/cli/drift-test.js +38 -0
- package/dist/cli/edit-kept.d.ts +1 -0
- package/dist/cli/edit-kept.js +43 -0
- package/dist/cli/edit-screenplay.d.ts +1 -0
- package/dist/cli/edit-screenplay.js +49 -0
- package/dist/cli/edit-terrain.d.ts +1 -0
- package/dist/cli/edit-terrain.js +60 -0
- package/dist/cli/editor-broker.d.ts +1 -0
- package/dist/cli/editor-broker.js +32 -0
- package/dist/cli/effect-tour.d.ts +2 -0
- package/dist/cli/effect-tour.js +378 -0
- package/dist/cli/export-sets.d.ts +3 -0
- package/dist/cli/export-sets.js +68 -0
- package/dist/cli/facing-strip.d.ts +1 -0
- package/dist/cli/facing-strip.js +101 -0
- package/dist/cli/freeze-set-piece.d.ts +1 -0
- package/dist/cli/freeze-set-piece.js +23 -0
- package/dist/cli/game-cards.d.ts +1 -0
- package/dist/cli/game-cards.js +43 -0
- package/dist/cli/generate-terrain.d.ts +1 -0
- package/dist/cli/generate-terrain.js +18 -0
- package/dist/cli/help-asked.d.ts +4 -0
- package/dist/cli/help-asked.js +19 -0
- package/dist/cli/import-map.d.ts +1 -0
- package/dist/cli/import-map.js +38 -0
- package/dist/cli/import-mod.d.ts +1 -0
- package/dist/cli/import-mod.js +47 -0
- package/dist/cli/import-set.d.ts +1 -0
- package/dist/cli/import-set.js +48 -0
- package/dist/cli/index-mod-doodads.d.ts +1 -0
- package/dist/cli/index-mod-doodads.js +45 -0
- package/dist/cli/kept-report.d.ts +1 -0
- package/dist/cli/kept-report.js +30 -0
- package/dist/cli/lighting-preview.d.ts +1 -0
- package/dist/cli/lighting-preview.js +34 -0
- package/dist/cli/make-frames.d.ts +1 -0
- package/dist/cli/make-frames.js +21 -0
- package/dist/cli/model-anims.d.ts +1 -0
- package/dist/cli/model-anims.js +21 -0
- package/dist/cli/model-footprints-format.d.ts +3 -0
- package/dist/cli/model-footprints-format.js +7 -0
- package/dist/cli/model-footprints.d.ts +1 -0
- package/dist/cli/model-footprints.js +20 -0
- package/dist/cli/placement-stats.d.ts +1 -0
- package/dist/cli/placement-stats.js +49 -0
- package/dist/cli/preview.d.ts +1 -0
- package/dist/cli/preview.js +23 -0
- package/dist/cli/probe-game.d.ts +1 -0
- package/dist/cli/probe-game.js +54 -0
- package/dist/cli/propose-removals.d.ts +1 -0
- package/dist/cli/propose-removals.js +23 -0
- package/dist/cli/pull-screenplay.d.ts +1 -0
- package/dist/cli/pull-screenplay.js +50 -0
- package/dist/cli/record-model-anims-args.d.ts +9 -0
- package/dist/cli/record-model-anims-args.js +27 -0
- package/dist/cli/record-model-anims.d.ts +1 -0
- package/dist/cli/record-model-anims.js +53 -0
- package/dist/cli/record-models-cli.d.ts +21 -0
- package/dist/cli/record-models-cli.js +112 -0
- package/dist/cli/refresh-screenplay.d.ts +1 -0
- package/dist/cli/refresh-screenplay.js +165 -0
- package/dist/cli/render-set-views.d.ts +1 -0
- package/dist/cli/render-set-views.js +64 -0
- package/dist/cli/sc2-adjutant.d.ts +2 -0
- package/dist/cli/sc2-adjutant.js +43 -0
- package/dist/cli/search-doodads-args.d.ts +9 -0
- package/dist/cli/search-doodads-args.js +53 -0
- package/dist/cli/search-doodads.d.ts +1 -0
- package/dist/cli/search-doodads.js +46 -0
- package/dist/cli/set-cards.d.ts +1 -0
- package/dist/cli/set-cards.js +72 -0
- package/dist/cli/set-shots.d.ts +1 -0
- package/dist/cli/set-shots.js +77 -0
- package/dist/cli/sheet-readings.d.ts +1 -0
- package/dist/cli/sheet-readings.js +140 -0
- package/dist/cli/sound-mix.d.ts +1 -0
- package/dist/cli/sound-mix.js +75 -0
- package/dist/cli/study.d.ts +1 -0
- package/dist/cli/study.js +20 -0
- package/dist/cli/survey-args.d.ts +8 -0
- package/dist/cli/survey-args.js +37 -0
- package/dist/cli/survey.d.ts +1 -0
- package/dist/cli/survey.js +19 -0
- package/dist/cli/sync.d.ts +1 -0
- package/dist/cli/sync.js +53 -0
- package/dist/cli/texture-sheet.d.ts +1 -0
- package/dist/cli/texture-sheet.js +71 -0
- package/dist/cli/texture-usage.d.ts +1 -0
- package/dist/cli/texture-usage.js +73 -0
- package/dist/cli/tts-placeholders.d.ts +1 -0
- package/dist/cli/tts-placeholders.js +62 -0
- package/dist/cli/tune-kept.d.ts +1 -0
- package/dist/cli/tune-kept.js +61 -0
- package/dist/cutscene/card-cameras.d.ts +52 -0
- package/dist/cutscene/card-cameras.js +81 -0
- package/dist/cutscene/cinematic-checks.d.ts +68 -0
- package/dist/cutscene/cinematic-checks.js +153 -0
- package/dist/cutscene/cinematic-dependencies.d.ts +18 -0
- package/dist/cutscene/cinematic-dependencies.js +107 -0
- package/dist/cutscene/cinematic.d.ts +386 -0
- package/dist/cutscene/cinematic.js +1624 -0
- package/dist/cutscene/compare-cutscenes.d.ts +13 -0
- package/dist/cutscene/compare-cutscenes.js +248 -0
- package/dist/cutscene/compile-cutscene.d.ts +54 -0
- package/dist/cutscene/compile-cutscene.js +231 -0
- package/dist/cutscene/contact-sheet.d.ts +98 -0
- package/dist/cutscene/contact-sheet.js +475 -0
- package/dist/cutscene/feed-channels.d.ts +8 -0
- package/dist/cutscene/feed-channels.js +96 -0
- package/dist/cutscene/feeds.d.ts +30 -0
- package/dist/cutscene/feeds.js +43 -0
- package/dist/cutscene/follow-path.d.ts +63 -0
- package/dist/cutscene/follow-path.js +132 -0
- package/dist/cutscene/import-set.d.ts +56 -0
- package/dist/cutscene/import-set.js +453 -0
- package/dist/cutscene/light-test.d.ts +56 -0
- package/dist/cutscene/light-test.js +150 -0
- package/dist/cutscene/load-sources.d.ts +20 -0
- package/dist/cutscene/load-sources.js +48 -0
- package/dist/cutscene/property-curves.d.ts +51 -0
- package/dist/cutscene/property-curves.js +166 -0
- package/dist/cutscene/read-cutscene.d.ts +12 -0
- package/dist/cutscene/read-cutscene.js +63 -0
- package/dist/cutscene/render-set-plan.d.ts +27 -0
- package/dist/cutscene/render-set-plan.js +189 -0
- package/dist/cutscene/set-catalog.d.ts +102 -0
- package/dist/cutscene/set-catalog.js +298 -0
- package/dist/cutscene/set-checks.d.ts +19 -0
- package/dist/cutscene/set-checks.js +146 -0
- package/dist/cutscene/set-cutscene.d.ts +12 -0
- package/dist/cutscene/set-cutscene.js +87 -0
- package/dist/cutscene/set-looks.d.ts +146 -0
- package/dist/cutscene/set-looks.js +66 -0
- package/dist/cutscene/source-kinds.d.ts +17 -0
- package/dist/cutscene/source-kinds.js +34 -0
- package/dist/cutscene/tag-census.d.ts +47 -0
- package/dist/cutscene/tag-census.js +121 -0
- package/dist/cutscene/trigger-scene-checks.d.ts +81 -0
- package/dist/cutscene/trigger-scene-checks.js +219 -0
- package/dist/cutscene/trigger-scene.d.ts +130 -0
- package/dist/cutscene/trigger-scene.js +714 -0
- package/dist/cutscene/turns.d.ts +42 -0
- package/dist/cutscene/turns.js +155 -0
- package/dist/cutscene/write-shot-cutscene.d.ts +420 -0
- package/dist/cutscene/write-shot-cutscene.js +998 -0
- package/dist/domain/asset-source.d.ts +104 -0
- package/dist/domain/asset-source.js +126 -0
- package/dist/domain/blueprint-trigger.d.ts +404 -0
- package/dist/domain/blueprint-trigger.js +202 -0
- package/dist/domain/catalog-fields.d.ts +21 -0
- package/dist/domain/catalog-fields.js +23 -0
- package/dist/domain/character.d.ts +28 -0
- package/dist/domain/character.js +70 -0
- package/dist/domain/cinematic-set.d.ts +199 -0
- package/dist/domain/cinematic-set.js +186 -0
- package/dist/domain/cinematic.d.ts +370 -0
- package/dist/domain/cinematic.js +484 -0
- package/dist/domain/compile-record.d.ts +289 -0
- package/dist/domain/compile-record.js +170 -0
- package/dist/domain/custom-doodad.d.ts +139 -0
- package/dist/domain/custom-doodad.js +135 -0
- package/dist/domain/entry-strings.d.ts +14 -0
- package/dist/domain/entry-strings.js +17 -0
- package/dist/domain/library-interface.d.ts +645 -0
- package/dist/domain/library-interface.js +472 -0
- package/dist/domain/melee-map-blueprint.d.ts +374 -0
- package/dist/domain/melee-map-blueprint.js +162 -0
- package/dist/domain/mission-blueprint.d.ts +12716 -0
- package/dist/domain/mission-blueprint.js +3390 -0
- package/dist/domain/mod-blueprint.d.ts +302 -0
- package/dist/domain/mod-blueprint.js +252 -0
- package/dist/domain/mod-cinematic.d.ts +40 -0
- package/dist/domain/mod-cinematic.js +81 -0
- package/dist/domain/mod-screenplay.d.ts +25 -0
- package/dist/domain/mod-screenplay.js +70 -0
- package/dist/domain/named-id.d.ts +4 -0
- package/dist/domain/named-id.js +8 -0
- package/dist/domain/package-path.d.ts +3 -0
- package/dist/domain/package-path.js +9 -0
- package/dist/domain/reference-graph.d.ts +42 -0
- package/dist/domain/reference-graph.js +125 -0
- package/dist/domain/schedule.d.ts +98 -0
- package/dist/domain/schedule.js +79 -0
- package/dist/domain/sound-set.d.ts +50 -0
- package/dist/domain/sound-set.js +81 -0
- package/dist/domain/threat.d.ts +96 -0
- package/dist/domain/threat.js +45 -0
- package/dist/domain/trigger-scene.d.ts +447 -0
- package/dist/domain/trigger-scene.js +397 -0
- package/dist/domain/unexplored-areas.d.ts +20 -0
- package/dist/domain/unexplored-areas.js +21 -0
- package/dist/dressing/capture-composite.d.ts +20 -0
- package/dist/dressing/capture-composite.js +61 -0
- package/dist/dressing/decal-variations.d.ts +14 -0
- package/dist/dressing/decal-variations.js +29 -0
- package/dist/dressing/expand-dressing.d.ts +60 -0
- package/dist/dressing/expand-dressing.js +995 -0
- package/dist/dressing/facing-strip.d.ts +48 -0
- package/dist/dressing/facing-strip.js +157 -0
- package/dist/dressing/freeze-set-piece.d.ts +12 -0
- package/dist/dressing/freeze-set-piece.js +46 -0
- package/dist/dressing/mission-dressing-edits.d.ts +28 -0
- package/dist/dressing/mission-dressing-edits.js +56 -0
- package/dist/dressing/walked-ground.d.ts +3 -0
- package/dist/dressing/walked-ground.js +21 -0
- package/dist/edit/edit-blueprint.d.ts +56 -0
- package/dist/edit/edit-blueprint.js +244 -0
- package/dist/edit/json-patch.d.ts +42 -0
- package/dist/edit/json-patch.js +154 -0
- package/dist/host/derive.d.ts +47 -0
- package/dist/host/derive.js +267 -0
- package/dist/host/game-logs.d.ts +63 -0
- package/dist/host/game-logs.js +178 -0
- package/dist/host/game-ownership.d.ts +37 -0
- package/dist/host/game-ownership.js +84 -0
- package/dist/host/game-probe.d.ts +61 -0
- package/dist/host/game-probe.js +154 -0
- package/dist/host/game-run-report.d.ts +63 -0
- package/dist/host/game-run-report.js +119 -0
- package/dist/host/host.d.ts +22 -0
- package/dist/host/host.js +55 -0
- package/dist/host/known-errors.d.ts +34 -0
- package/dist/host/known-errors.js +73 -0
- package/dist/host/machine-config.d.ts +41 -0
- package/dist/host/machine-config.js +108 -0
- package/dist/host/placeholder-voices.d.ts +76 -0
- package/dist/host/placeholder-voices.js +246 -0
- package/dist/host/voice-files.d.ts +71 -0
- package/dist/host/voice-files.js +106 -0
- package/dist/host/wav.d.ts +33 -0
- package/dist/host/wav.js +107 -0
- package/dist/host/whiteoutflakes-frames.d.ts +37 -0
- package/dist/host/whiteoutflakes-frames.js +155 -0
- package/dist/host/whiteoutflakes.d.ts +57 -0
- package/dist/host/whiteoutflakes.js +181 -0
- package/dist/init/init-workspace.d.ts +95 -0
- package/dist/init/init-workspace.js +238 -0
- package/dist/kept-terrain/area.d.ts +84 -0
- package/dist/kept-terrain/area.js +201 -0
- package/dist/kept-terrain/cliff-brushes.d.ts +101 -0
- package/dist/kept-terrain/cliff-brushes.js +414 -0
- package/dist/kept-terrain/generating-zones.d.ts +125 -0
- package/dist/kept-terrain/generating-zones.js +818 -0
- package/dist/kept-terrain/height-brushes.d.ts +44 -0
- package/dist/kept-terrain/height-brushes.js +95 -0
- package/dist/kept-terrain/kept-cliffs.d.ts +63 -0
- package/dist/kept-terrain/kept-cliffs.js +216 -0
- package/dist/kept-terrain/kept-ground.d.ts +54 -0
- package/dist/kept-terrain/kept-ground.js +135 -0
- package/dist/kept-terrain/paint-brushes.d.ts +201 -0
- package/dist/kept-terrain/paint-brushes.js +662 -0
- package/dist/kept-terrain/pathing-brush.d.ts +28 -0
- package/dist/kept-terrain/pathing-brush.js +47 -0
- package/dist/kept-terrain/set-boundaries.d.ts +54 -0
- package/dist/kept-terrain/set-boundaries.js +146 -0
- package/dist/kept-terrain/shadow-bake.d.ts +20 -0
- package/dist/kept-terrain/shadow-bake.js +62 -0
- package/dist/kept-terrain/texture-sets.d.ts +71 -0
- package/dist/kept-terrain/texture-sets.js +329 -0
- package/dist/kept-terrain/texture-usage.d.ts +91 -0
- package/dist/kept-terrain/texture-usage.js +239 -0
- package/dist/layout/bounds-checks.d.ts +18 -0
- package/dist/layout/bounds-checks.js +155 -0
- package/dist/layout/check-mission.d.ts +9 -0
- package/dist/layout/check-mission.js +31 -0
- package/dist/layout/checks.d.ts +23 -0
- package/dist/layout/checks.js +987 -0
- package/dist/layout/connection-changes.d.ts +11 -0
- package/dist/layout/connection-changes.js +59 -0
- package/dist/layout/layout-model.d.ts +191 -0
- package/dist/layout/layout-model.js +850 -0
- package/dist/layout/route-checks.d.ts +38 -0
- package/dist/layout/route-checks.js +217 -0
- package/dist/layout/schedules.d.ts +22 -0
- package/dist/layout/schedules.js +71 -0
- package/dist/layout/threats.d.ts +19 -0
- package/dist/layout/threats.js +123 -0
- package/dist/map/anchor-doodad-defaults.d.ts +5 -0
- package/dist/map/anchor-doodad-defaults.js +11 -0
- package/dist/map/catalog-entries.d.ts +13 -0
- package/dist/map/catalog-entries.js +15 -0
- package/dist/map/compile-melee-map.d.ts +21 -0
- package/dist/map/compile-melee-map.js +151 -0
- package/dist/map/compile-mission.d.ts +45 -0
- package/dist/map/compile-mission.js +176 -0
- package/dist/map/compiled-pathing.d.ts +50 -0
- package/dist/map/compiled-pathing.js +342 -0
- package/dist/map/convert-mission-screenplay.d.ts +69 -0
- package/dist/map/convert-mission-screenplay.js +250 -0
- package/dist/map/convert-mission-triggers.d.ts +206 -0
- package/dist/map/convert-mission-triggers.js +722 -0
- package/dist/map/drift-test.d.ts +15 -0
- package/dist/map/drift-test.js +32 -0
- package/dist/map/edit-kept-objects.d.ts +125 -0
- package/dist/map/edit-kept-objects.js +593 -0
- package/dist/map/edit-kept-terrain.d.ts +251 -0
- package/dist/map/edit-kept-terrain.js +766 -0
- package/dist/map/editor-changes.d.ts +98 -0
- package/dist/map/editor-changes.js +457 -0
- package/dist/map/editor-form.d.ts +5 -0
- package/dist/map/editor-form.js +72 -0
- package/dist/map/expand-placements.d.ts +42 -0
- package/dist/map/expand-placements.js +325 -0
- package/dist/map/game-packages.d.ts +49 -0
- package/dist/map/game-packages.js +150 -0
- package/dist/map/generate-terrain.d.ts +6 -0
- package/dist/map/generate-terrain.js +9 -0
- package/dist/map/hidden-cell-checks.d.ts +7 -0
- package/dist/map/hidden-cell-checks.js +88 -0
- package/dist/map/hidden-cells-changes.d.ts +30 -0
- package/dist/map/hidden-cells-changes.js +71 -0
- package/dist/map/import-map.d.ts +17 -0
- package/dist/map/import-map.js +162 -0
- package/dist/map/import-package.d.ts +12 -0
- package/dist/map/import-package.js +41 -0
- package/dist/map/kept-checks.d.ts +82 -0
- package/dist/map/kept-checks.js +434 -0
- package/dist/map/kept-package.d.ts +56 -0
- package/dist/map/kept-package.js +104 -0
- package/dist/map/kept-references.d.ts +62 -0
- package/dist/map/kept-references.js +267 -0
- package/dist/map/kept-session.d.ts +44 -0
- package/dist/map/kept-session.js +144 -0
- package/dist/map/layer-colours.d.ts +4 -0
- package/dist/map/layer-colours.js +9 -0
- package/dist/map/light-regions.d.ts +33 -0
- package/dist/map/light-regions.js +273 -0
- package/dist/map/map-bounds.d.ts +75 -0
- package/dist/map/map-bounds.js +119 -0
- package/dist/map/melee-bases.d.ts +56 -0
- package/dist/map/melee-bases.js +149 -0
- package/dist/map/melee-checks.d.ts +79 -0
- package/dist/map/melee-checks.js +259 -0
- package/dist/map/melee-distances.d.ts +92 -0
- package/dist/map/melee-distances.js +314 -0
- package/dist/map/melee-mains.d.ts +38 -0
- package/dist/map/melee-mains.js +178 -0
- package/dist/map/melee-rules.d.ts +30 -0
- package/dist/map/melee-rules.js +35 -0
- package/dist/map/melee-status.d.ts +30 -0
- package/dist/map/melee-status.js +143 -0
- package/dist/map/mission-catalog.d.ts +15 -0
- package/dist/map/mission-catalog.js +133 -0
- package/dist/map/mission-conversation.d.ts +90 -0
- package/dist/map/mission-conversation.js +211 -0
- package/dist/map/mission-package.d.ts +14 -0
- package/dist/map/mission-package.js +39 -0
- package/dist/map/outline-diff.d.ts +24 -0
- package/dist/map/outline-diff.js +95 -0
- package/dist/map/outline-trigger.d.ts +34 -0
- package/dist/map/outline-trigger.js +59 -0
- package/dist/map/ownership-plan.d.ts +61 -0
- package/dist/map/ownership-plan.js +57 -0
- package/dist/map/package-elements.d.ts +23 -0
- package/dist/map/package-elements.js +38 -0
- package/dist/map/package-lock.d.ts +16 -0
- package/dist/map/package-lock.js +129 -0
- package/dist/map/package-output.d.ts +224 -0
- package/dist/map/package-output.js +906 -0
- package/dist/map/patch-map-info.d.ts +54 -0
- package/dist/map/patch-map-info.js +125 -0
- package/dist/map/read-dependencies.d.ts +8 -0
- package/dist/map/read-dependencies.js +21 -0
- package/dist/map/read-document-header.d.ts +12 -0
- package/dist/map/read-document-header.js +34 -0
- package/dist/map/read-doodad-actors.d.ts +6 -0
- package/dist/map/read-doodad-actors.js +23 -0
- package/dist/map/read-map-info-fields.d.ts +42 -0
- package/dist/map/read-map-info-fields.js +90 -0
- package/dist/map/read-map-info-layout.d.ts +88 -0
- package/dist/map/read-map-info-layout.js +173 -0
- package/dist/map/read-map-info.d.ts +16 -0
- package/dist/map/read-map-info.js +34 -0
- package/dist/map/read-objects-xml.d.ts +87 -0
- package/dist/map/read-objects-xml.js +105 -0
- package/dist/map/read-regions-xml.d.ts +9 -0
- package/dist/map/read-regions-xml.js +44 -0
- package/dist/map/read-tga.d.ts +9 -0
- package/dist/map/read-tga.js +25 -0
- package/dist/map/rotate-half.d.ts +7 -0
- package/dist/map/rotate-half.js +129 -0
- package/dist/map/save-comparison.d.ts +63 -0
- package/dist/map/save-comparison.js +209 -0
- package/dist/map/stable-object-id.d.ts +6 -0
- package/dist/map/stable-object-id.js +16 -0
- package/dist/map/survey.d.ts +154 -0
- package/dist/map/survey.js +340 -0
- package/dist/map/terrain-resave.d.ts +25 -0
- package/dist/map/terrain-resave.js +84 -0
- package/dist/map/texture-usage.d.ts +53 -0
- package/dist/map/texture-usage.js +142 -0
- package/dist/map/tune-kept-triggers.d.ts +75 -0
- package/dist/map/tune-kept-triggers.js +631 -0
- package/dist/map/write-blueprint-trigger.d.ts +89 -0
- package/dist/map/write-blueprint-trigger.js +287 -0
- package/dist/map/write-component-version.d.ts +15 -0
- package/dist/map/write-component-version.js +33 -0
- package/dist/map/write-composite-actors.d.ts +15 -0
- package/dist/map/write-composite-actors.js +53 -0
- package/dist/map/write-document-header.d.ts +15 -0
- package/dist/map/write-document-header.js +51 -0
- package/dist/map/write-document-info-xml.d.ts +8 -0
- package/dist/map/write-document-info-xml.js +20 -0
- package/dist/map/write-files-together.d.ts +44 -0
- package/dist/map/write-files-together.js +107 -0
- package/dist/map/write-lights.d.ts +35 -0
- package/dist/map/write-lights.js +158 -0
- package/dist/map/write-map-package.d.ts +107 -0
- package/dist/map/write-map-package.js +913 -0
- package/dist/map/write-minimap-tga.d.ts +15 -0
- package/dist/map/write-minimap-tga.js +36 -0
- package/dist/map/write-objects-xml.d.ts +50 -0
- package/dist/map/write-objects-xml.js +87 -0
- package/dist/map/write-regions-xml.d.ts +73 -0
- package/dist/map/write-regions-xml.js +90 -0
- package/dist/map/write-sky.d.ts +8 -0
- package/dist/map/write-sky.js +60 -0
- package/dist/map/write-water.d.ts +68 -0
- package/dist/map/write-water.js +230 -0
- package/dist/map/xml-elements.d.ts +10 -0
- package/dist/map/xml-elements.js +31 -0
- package/dist/map/zones-beside-kept.d.ts +28 -0
- package/dist/map/zones-beside-kept.js +221 -0
- package/dist/mcp/call-context.d.ts +59 -0
- package/dist/mcp/call-context.js +83 -0
- package/dist/mcp/capture-jobs.d.ts +46 -0
- package/dist/mcp/capture-jobs.js +103 -0
- package/dist/mcp/core-version.d.ts +2 -0
- package/dist/mcp/core-version.js +3 -0
- package/dist/mcp/find-doodads.d.ts +70 -0
- package/dist/mcp/find-doodads.js +90 -0
- package/dist/mcp/find-sets.d.ts +69 -0
- package/dist/mcp/find-sets.js +35 -0
- package/dist/mcp/follow-roots.d.ts +22 -0
- package/dist/mcp/follow-roots.js +66 -0
- package/dist/mcp/main.d.ts +2 -0
- package/dist/mcp/main.js +39 -0
- package/dist/mcp/open-doodad-finder.d.ts +47 -0
- package/dist/mcp/open-doodad-finder.js +40 -0
- package/dist/mcp/server.d.ts +49 -0
- package/dist/mcp/server.js +181 -0
- package/dist/mcp/stdio-console.d.ts +1 -0
- package/dist/mcp/stdio-console.js +5 -0
- package/dist/mcp/tools/bank-report.d.ts +19 -0
- package/dist/mcp/tools/bank-report.js +51 -0
- package/dist/mcp/tools/blueprint.d.ts +5 -0
- package/dist/mcp/tools/blueprint.js +411 -0
- package/dist/mcp/tools/capture.d.ts +11 -0
- package/dist/mcp/tools/capture.js +307 -0
- package/dist/mcp/tools/catalog.d.ts +12 -0
- package/dist/mcp/tools/catalog.js +571 -0
- package/dist/mcp/tools/compile.d.ts +5 -0
- package/dist/mcp/tools/compile.js +630 -0
- package/dist/mcp/tools/editor-handoff.d.ts +50 -0
- package/dist/mcp/tools/editor-handoff.js +115 -0
- package/dist/mcp/tools/mission-files.d.ts +28 -0
- package/dist/mcp/tools/mission-files.js +78 -0
- package/dist/mcp/tools/schemas.d.ts +18 -0
- package/dist/mcp/tools/schemas.js +9 -0
- package/dist/mcp/tools/session.d.ts +5 -0
- package/dist/mcp/tools/session.js +187 -0
- package/dist/mcp/tools/style-pack.d.ts +11 -0
- package/dist/mcp/tools/style-pack.js +245 -0
- package/dist/mcp/tools/tool-group.d.ts +45 -0
- package/dist/mcp/tools/tool-group.js +20 -0
- package/dist/mods/asset-sources.d.ts +80 -0
- package/dist/mods/asset-sources.js +284 -0
- package/dist/mods/button-hotkeys.d.ts +45 -0
- package/dist/mods/button-hotkeys.js +185 -0
- package/dist/mods/campaign-catalog.d.ts +83 -0
- package/dist/mods/campaign-catalog.js +309 -0
- package/dist/mods/catalog-schema.d.ts +39 -0
- package/dist/mods/catalog-schema.js +138 -0
- package/dist/mods/characters.d.ts +45 -0
- package/dist/mods/characters.js +76 -0
- package/dist/mods/compile-mod.d.ts +52 -0
- package/dist/mods/compile-mod.js +758 -0
- package/dist/mods/conversation-references.d.ts +23 -0
- package/dist/mods/conversation-references.js +83 -0
- package/dist/mods/conversations.d.ts +125 -0
- package/dist/mods/conversations.js +312 -0
- package/dist/mods/convert-assets.d.ts +50 -0
- package/dist/mods/convert-assets.js +139 -0
- package/dist/mods/convert-entries.d.ts +28 -0
- package/dist/mods/convert-entries.js +352 -0
- package/dist/mods/convert-files.d.ts +389 -0
- package/dist/mods/convert-files.js +191 -0
- package/dist/mods/convert-library.d.ts +27 -0
- package/dist/mods/convert-library.js +269 -0
- package/dist/mods/convert-screenplay.d.ts +66 -0
- package/dist/mods/convert-screenplay.js +294 -0
- package/dist/mods/convert-sound-set.d.ts +31 -0
- package/dist/mods/convert-sound-set.js +438 -0
- package/dist/mods/convert-triggers.d.ts +21 -0
- package/dist/mods/convert-triggers.js +105 -0
- package/dist/mods/custom-doodads.d.ts +89 -0
- package/dist/mods/custom-doodads.js +387 -0
- package/dist/mods/data-rules.d.ts +6 -0
- package/dist/mods/data-rules.js +56 -0
- package/dist/mods/effective-entry.d.ts +82 -0
- package/dist/mods/effective-entry.js +309 -0
- package/dist/mods/entry-strings.d.ts +32 -0
- package/dist/mods/entry-strings.js +104 -0
- package/dist/mods/equivalence.d.ts +62 -0
- package/dist/mods/equivalence.js +210 -0
- package/dist/mods/function-search.d.ts +100 -0
- package/dist/mods/function-search.js +164 -0
- package/dist/mods/game-data-files.d.ts +22 -0
- package/dist/mods/game-data-files.js +75 -0
- package/dist/mods/generic-entries.d.ts +47 -0
- package/dist/mods/generic-entries.js +315 -0
- package/dist/mods/import-mod.d.ts +22 -0
- package/dist/mods/import-mod.js +261 -0
- package/dist/mods/kept-report.d.ts +46 -0
- package/dist/mods/kept-report.js +165 -0
- package/dist/mods/library-galaxy.d.ts +349 -0
- package/dist/mods/library-galaxy.js +1373 -0
- package/dist/mods/library-reach.d.ts +54 -0
- package/dist/mods/library-reach.js +450 -0
- package/dist/mods/library-xml.d.ts +207 -0
- package/dist/mods/library-xml.js +997 -0
- package/dist/mods/library.d.ts +79 -0
- package/dist/mods/library.js +528 -0
- package/dist/mods/mod-cinematics.d.ts +79 -0
- package/dist/mods/mod-cinematics.js +159 -0
- package/dist/mods/mod-package-files.d.ts +39 -0
- package/dist/mods/mod-package-files.js +157 -0
- package/dist/mods/owned-strings.d.ts +49 -0
- package/dist/mods/owned-strings.js +129 -0
- package/dist/mods/preloads.d.ts +8 -0
- package/dist/mods/preloads.js +101 -0
- package/dist/mods/removals.d.ts +38 -0
- package/dist/mods/removals.js +123 -0
- package/dist/mods/sound-mix.d.ts +92 -0
- package/dist/mods/sound-mix.js +195 -0
- package/dist/mods/sound-sets.d.ts +24 -0
- package/dist/mods/sound-sets.js +126 -0
- package/dist/mods/sync-mod.d.ts +14 -0
- package/dist/mods/sync-mod.js +103 -0
- package/dist/mods/texture-swaps.d.ts +31 -0
- package/dist/mods/texture-swaps.js +90 -0
- package/dist/mods/workspace-mods.d.ts +108 -0
- package/dist/mods/workspace-mods.js +233 -0
- package/dist/plugins/built-package.d.ts +13 -0
- package/dist/plugins/built-package.js +57 -0
- package/dist/plugins/check-workspace.d.ts +53 -0
- package/dist/plugins/check-workspace.js +709 -0
- package/dist/plugins/hazard/index.d.ts +12 -0
- package/dist/plugins/hazard/index.js +56 -0
- package/dist/plugins/hazard/sc2-adjutant-plugin.json +7 -0
- package/dist/plugins/mechanic-context.d.ts +8 -0
- package/dist/plugins/mechanic-context.js +54 -0
- package/dist/plugins/plugin-api.d.ts +941 -0
- package/dist/plugins/plugin-api.js +129 -0
- package/dist/plugins/plugin-sdk.d.ts +27 -0
- package/dist/plugins/plugin-sdk.js +34 -0
- package/dist/plugins/plugin-skills.d.ts +71 -0
- package/dist/plugins/plugin-skills.js +371 -0
- package/dist/plugins/plugin-sources.d.ts +45 -0
- package/dist/plugins/plugin-sources.js +76 -0
- package/dist/plugins/registry.d.ts +9 -0
- package/dist/plugins/registry.js +649 -0
- package/dist/plugins/workspace.d.ts +111 -0
- package/dist/plugins/workspace.js +279 -0
- package/dist/preview/read-png.d.ts +10 -0
- package/dist/preview/read-png.js +68 -0
- package/dist/preview/render-png.d.ts +1 -0
- package/dist/preview/render-png.js +7 -0
- package/dist/preview/render-svg.d.ts +2 -0
- package/dist/preview/render-svg.js +265 -0
- package/dist/preview/write-png.d.ts +7 -0
- package/dist/preview/write-png.js +49 -0
- package/dist/preview/write-preview.d.ts +6 -0
- package/dist/preview/write-preview.js +11 -0
- package/dist/script/line-moves.d.ts +45 -0
- package/dist/script/line-moves.js +95 -0
- package/dist/script/name-script.d.ts +69 -0
- package/dist/script/name-script.js +126 -0
- package/dist/script/parse-script.d.ts +47 -0
- package/dist/script/parse-script.js +111 -0
- package/dist/script/refresh-screenplay.d.ts +64 -0
- package/dist/script/refresh-screenplay.js +144 -0
- package/dist/script/scene-parts.d.ts +56 -0
- package/dist/script/scene-parts.js +82 -0
- package/dist/script/screenplay-source.d.ts +49 -0
- package/dist/script/screenplay-source.js +171 -0
- package/dist/script/write-conversation-data.d.ts +49 -0
- package/dist/script/write-conversation-data.js +102 -0
- package/dist/session/co-design-stages.d.ts +109 -0
- package/dist/session/co-design-stages.js +232 -0
- package/dist/session/evidence-coverage.d.ts +38 -0
- package/dist/session/evidence-coverage.js +89 -0
- package/dist/study/blizzard-baseline.d.ts +76 -0
- package/dist/study/blizzard-baseline.js +137 -0
- package/dist/study/exemplar-report.d.ts +71 -0
- package/dist/study/exemplar-report.js +163 -0
- package/dist/study/find-places.d.ts +127 -0
- package/dist/study/find-places.js +306 -0
- package/dist/study/load-map-package.d.ts +37 -0
- package/dist/study/load-map-package.js +57 -0
- package/dist/study/map-study.d.ts +301 -0
- package/dist/study/map-study.js +43 -0
- package/dist/study/measure-cliffs.d.ts +39 -0
- package/dist/study/measure-cliffs.js +36 -0
- package/dist/study/measure-composition.d.ts +32 -0
- package/dist/study/measure-composition.js +53 -0
- package/dist/study/measure-doodads.d.ts +129 -0
- package/dist/study/measure-doodads.js +209 -0
- package/dist/study/measure-lighting.d.ts +60 -0
- package/dist/study/measure-lighting.js +77 -0
- package/dist/study/measure-texturing.d.ts +44 -0
- package/dist/study/measure-texturing.js +119 -0
- package/dist/study/measures.d.ts +225 -0
- package/dist/study/measures.js +366 -0
- package/dist/study/placement-stats.d.ts +90 -0
- package/dist/study/placement-stats.js +176 -0
- package/dist/study/render-crop.d.ts +22 -0
- package/dist/study/render-crop.js +23 -0
- package/dist/study/render-layers.d.ts +96 -0
- package/dist/study/render-layers.js +433 -0
- package/dist/study/scaffold-style-pack.d.ts +58 -0
- package/dist/study/scaffold-style-pack.js +261 -0
- package/dist/study/stats.d.ts +17 -0
- package/dist/study/stats.js +25 -0
- package/dist/study/study-exemplars.d.ts +67 -0
- package/dist/study/study-exemplars.js +133 -0
- package/dist/study/terrain-grid.d.ts +24 -0
- package/dist/study/terrain-grid.js +103 -0
- package/dist/sync/sync-anchors.d.ts +23 -0
- package/dist/sync/sync-anchors.js +162 -0
- package/dist/sync/sync-doodads.d.ts +47 -0
- package/dist/sync/sync-doodads.js +350 -0
- package/dist/sync/sync-hidden-cells.d.ts +12 -0
- package/dist/sync/sync-hidden-cells.js +49 -0
- package/dist/sync/sync-mission.d.ts +34 -0
- package/dist/sync/sync-mission.js +338 -0
- package/dist/sync/sync-pathing.d.ts +20 -0
- package/dist/sync/sync-pathing.js +145 -0
- package/dist/sync/sync-regions.d.ts +36 -0
- package/dist/sync/sync-regions.js +190 -0
- package/dist/sync/sync-shared.d.ts +46 -0
- package/dist/sync/sync-shared.js +46 -0
- package/dist/sync/sync-terrain.d.ts +34 -0
- package/dist/sync/sync-terrain.js +283 -0
- package/dist/terrain/bridges.d.ts +11 -0
- package/dist/terrain/bridges.js +205 -0
- package/dist/terrain/cliff-sets.d.ts +47 -0
- package/dist/terrain/cliff-sets.js +142 -0
- package/dist/terrain/cliffs.d.ts +59 -0
- package/dist/terrain/cliffs.js +118 -0
- package/dist/terrain/doodad-pathing.d.ts +97 -0
- package/dist/terrain/doodad-pathing.js +293 -0
- package/dist/terrain/generated-texture-sets.d.ts +20 -0
- package/dist/terrain/generated-texture-sets.js +111 -0
- package/dist/terrain/ground-relief.d.ts +9 -0
- package/dist/terrain/ground-relief.js +26 -0
- package/dist/terrain/hidden-cells.d.ts +14 -0
- package/dist/terrain/hidden-cells.js +50 -0
- package/dist/terrain/paint-textures.d.ts +106 -0
- package/dist/terrain/paint-textures.js +953 -0
- package/dist/terrain/polygon.d.ts +8 -0
- package/dist/terrain/polygon.js +30 -0
- package/dist/terrain/ragged-outlines.d.ts +22 -0
- package/dist/terrain/ragged-outlines.js +144 -0
- package/dist/terrain/ramps.d.ts +68 -0
- package/dist/terrain/ramps.js +322 -0
- package/dist/terrain/rasterize.d.ts +121 -0
- package/dist/terrain/rasterize.js +559 -0
- package/dist/terrain/read-t3-fluff-doodad.d.ts +11 -0
- package/dist/terrain/read-t3-fluff-doodad.js +23 -0
- package/dist/terrain/read-t3-height-map.d.ts +19 -0
- package/dist/terrain/read-t3-height-map.js +25 -0
- package/dist/terrain/read-t3-sync-cliff-level.d.ts +9 -0
- package/dist/terrain/read-t3-sync-cliff-level.js +12 -0
- package/dist/terrain/read-t3-terrain-xml.d.ts +50 -0
- package/dist/terrain/read-t3-terrain-xml.js +64 -0
- package/dist/terrain/read-t3-texture-masks.d.ts +12 -0
- package/dist/terrain/read-t3-texture-masks.js +50 -0
- package/dist/terrain/read-t3-vert-col.d.ts +24 -0
- package/dist/terrain/read-t3-vert-col.js +44 -0
- package/dist/terrain/shore-banks.d.ts +22 -0
- package/dist/terrain/shore-banks.js +192 -0
- package/dist/terrain/symmetry.d.ts +42 -0
- package/dist/terrain/symmetry.js +65 -0
- package/dist/terrain/terraces.d.ts +30 -0
- package/dist/terrain/terraces.js +117 -0
- package/dist/terrain/terrain-objects.d.ts +53 -0
- package/dist/terrain/terrain-objects.js +143 -0
- package/dist/terrain/texture-grid.d.ts +17 -0
- package/dist/terrain/texture-grid.js +20 -0
- package/dist/terrain/value-noise.d.ts +4 -0
- package/dist/terrain/value-noise.js +28 -0
- package/dist/terrain/write-cell-attribute.d.ts +18 -0
- package/dist/terrain/write-cell-attribute.js +40 -0
- package/dist/terrain/write-map-info.d.ts +42 -0
- package/dist/terrain/write-map-info.js +170 -0
- package/dist/terrain/write-t3-cell-flags.d.ts +7 -0
- package/dist/terrain/write-t3-cell-flags.js +20 -0
- package/dist/terrain/write-t3-height-map.d.ts +29 -0
- package/dist/terrain/write-t3-height-map.js +73 -0
- package/dist/terrain/write-t3-sync-cliff-level.d.ts +8 -0
- package/dist/terrain/write-t3-sync-cliff-level.js +18 -0
- package/dist/terrain/write-t3-sync-height-map.d.ts +8 -0
- package/dist/terrain/write-t3-sync-height-map.js +29 -0
- package/dist/terrain/write-t3-sync-texture-info.d.ts +10 -0
- package/dist/terrain/write-t3-sync-texture-info.js +26 -0
- package/dist/terrain/write-t3-terrain-xml.d.ts +25 -0
- package/dist/terrain/write-t3-terrain-xml.js +79 -0
- package/dist/terrain/write-t3-texture-masks.d.ts +12 -0
- package/dist/terrain/write-t3-texture-masks.js +65 -0
- package/dist/triggers/author-trigger.d.ts +218 -0
- package/dist/triggers/author-trigger.js +1075 -0
- package/dist/triggers/authoring-outline.d.ts +27 -0
- package/dist/triggers/authoring-outline.js +388 -0
- package/dist/triggers/beat-bounds.d.ts +95 -0
- package/dist/triggers/beat-bounds.js +187 -0
- package/dist/triggers/beat-order.d.ts +12 -0
- package/dist/triggers/beat-order.js +77 -0
- package/dist/triggers/beat-reveals.d.ts +71 -0
- package/dist/triggers/beat-reveals.js +214 -0
- package/dist/triggers/beat-start.d.ts +8 -0
- package/dist/triggers/beat-start.js +14 -0
- package/dist/triggers/blueprint-triggers.d.ts +155 -0
- package/dist/triggers/blueprint-triggers.js +980 -0
- package/dist/triggers/build-lighting-preview.d.ts +8 -0
- package/dist/triggers/build-lighting-preview.js +54 -0
- package/dist/triggers/build-mission-triggers.d.ts +63 -0
- package/dist/triggers/build-mission-triggers.js +2172 -0
- package/dist/triggers/cinematic-triggers.d.ts +58 -0
- package/dist/triggers/cinematic-triggers.js +248 -0
- package/dist/triggers/cue-triggers.d.ts +73 -0
- package/dist/triggers/cue-triggers.js +475 -0
- package/dist/triggers/custom-script.d.ts +15 -0
- package/dist/triggers/custom-script.js +58 -0
- package/dist/triggers/from-beat.d.ts +40 -0
- package/dist/triggers/from-beat.js +111 -0
- package/dist/triggers/kept-holds.d.ts +55 -0
- package/dist/triggers/kept-holds.js +264 -0
- package/dist/triggers/kept-ids.d.ts +34 -0
- package/dist/triggers/kept-ids.js +62 -0
- package/dist/triggers/kept-trigger-galaxy.d.ts +227 -0
- package/dist/triggers/kept-trigger-galaxy.js +963 -0
- package/dist/triggers/map-script-drift.d.ts +21 -0
- package/dist/triggers/map-script-drift.js +79 -0
- package/dist/triggers/melee-triggers.d.ts +2 -0
- package/dist/triggers/melee-triggers.js +22 -0
- package/dist/triggers/renumber-regions.d.ts +7 -0
- package/dist/triggers/renumber-regions.js +27 -0
- package/dist/triggers/scene-chain.d.ts +91 -0
- package/dist/triggers/scene-chain.js +136 -0
- package/dist/triggers/splice-map-script.d.ts +49 -0
- package/dist/triggers/splice-map-script.js +668 -0
- package/dist/triggers/splice-triggers.d.ts +102 -0
- package/dist/triggers/splice-triggers.js +389 -0
- package/dist/triggers/transmission-hold.d.ts +52 -0
- package/dist/triggers/transmission-hold.js +98 -0
- package/dist/triggers/trigger-builders.d.ts +68 -0
- package/dist/triggers/trigger-builders.js +134 -0
- package/dist/triggers/trigger-catalog.d.ts +2947 -0
- package/dist/triggers/trigger-catalog.js +1619 -0
- package/dist/triggers/trigger-filing.d.ts +34 -0
- package/dist/triggers/trigger-filing.js +92 -0
- package/dist/triggers/trigger-model.d.ts +224 -0
- package/dist/triggers/trigger-model.js +88 -0
- package/dist/triggers/trigger-scene-triggers.d.ts +85 -0
- package/dist/triggers/trigger-scene-triggers.js +1041 -0
- package/dist/triggers/trigger-scene-world.d.ts +24 -0
- package/dist/triggers/trigger-scene-world.js +91 -0
- package/dist/triggers/triggers-file.d.ts +49 -0
- package/dist/triggers/triggers-file.js +94 -0
- package/dist/triggers/wave-triggers.d.ts +39 -0
- package/dist/triggers/wave-triggers.js +618 -0
- package/dist/triggers/write-map-script.d.ts +30 -0
- package/dist/triggers/write-map-script.js +372 -0
- package/dist/triggers/write-trigger-strings.d.ts +11 -0
- package/dist/triggers/write-trigger-strings.js +46 -0
- package/dist/triggers/write-triggers-xml.d.ts +8 -0
- package/dist/triggers/write-triggers-xml.js +199 -0
- package/dist/ui/boss-bar.d.ts +3 -0
- package/dist/ui/boss-bar.js +332 -0
- package/dist/ui/choice-picker.d.ts +5 -0
- package/dist/ui/choice-picker.js +528 -0
- package/dist/ui/components.d.ts +91 -0
- package/dist/ui/components.js +212 -0
- package/dist/ui/core-components.d.ts +3 -0
- package/dist/ui/core-components.js +7 -0
- package/dist/ui/frame-path-check.d.ts +91 -0
- package/dist/ui/frame-path-check.js +316 -0
- package/dist/ui/frame-paths.d.ts +102 -0
- package/dist/ui/frame-paths.js +345 -0
- package/dist/ui/hero-moment.d.ts +24 -0
- package/dist/ui/hero-moment.js +590 -0
- package/dist/ui/layout-writer.d.ts +25 -0
- package/dist/ui/layout-writer.js +56 -0
- package/dist/ui/toast.d.ts +14 -0
- package/dist/ui/toast.js +350 -0
- package/dist/ui/ui-component.d.ts +141 -0
- package/dist/ui/ui-component.js +80 -0
- package/dist/util/format-issues.d.ts +3 -0
- package/dist/util/format-issues.js +4 -0
- package/dist/util/inside.d.ts +11 -0
- package/dist/util/inside.js +31 -0
- package/dist/util/main-checkout.d.ts +4 -0
- package/dist/util/main-checkout.js +38 -0
- package/dist/util/package-file-mode.d.ts +13 -0
- package/dist/util/package-file-mode.js +56 -0
- package/dist/util/replace-file.d.ts +15 -0
- package/dist/util/replace-file.js +60 -0
- package/dist/util/same-list.d.ts +2 -0
- package/dist/util/same-list.js +2 -0
- package/dist/util/xml.d.ts +70 -0
- package/dist/util/xml.js +202 -0
- package/dist/util/zip.d.ts +2 -0
- package/dist/util/zip.js +51 -0
- package/examples/example-campaign/README.md +129 -0
- package/examples/example-campaign/missions/ashfall-relay/ashfall-relay.md +21 -0
- package/examples/example-campaign/missions/ashfall-relay/audio/Ch1_ashfall_relay_1_01.wav +0 -0
- package/examples/example-campaign/missions/ashfall-relay/audio/Ch1_ashfall_relay_1_02.wav +0 -0
- package/examples/example-campaign/missions/ashfall-relay/audio/Ch1_ashfall_relay_1_03.wav +0 -0
- package/examples/example-campaign/missions/ashfall-relay/audio/Ch1_ashfall_relay_2_01.wav +0 -0
- package/examples/example-campaign/missions/ashfall-relay/audio/Ch1_ashfall_relay_2_02.wav +0 -0
- package/examples/example-campaign/missions/ashfall-relay/blueprint.json +128 -0
- package/examples/example-campaign/missions/ashfall-relay/triggers/ash-tremors.json +69 -0
- package/examples/example-campaign/missions/ashfall-relay/triggers/start-ash-tremors.json +31 -0
- package/examples/example-campaign/mods/example/Example.SC2Mod/Base.SC2Data/GameData/CharacterData.xml +12 -0
- package/examples/example-campaign/mods/example/Example.SC2Mod/ComponentList.SC2Components +6 -0
- package/examples/example-campaign/mods/example/Example.SC2Mod/DocumentHeader +0 -0
- package/examples/example-campaign/mods/example/Example.SC2Mod/DocumentInfo +6 -0
- package/examples/example-campaign/mods/example/Example.SC2Mod/DocumentInfo.version +0 -0
- package/examples/example-campaign/mods/example/Example.SC2Mod/GameData.version +0 -0
- package/examples/example-campaign/mods/example/blueprint.json +10 -0
- package/examples/example-campaign/mods/example/compile-record.json +13 -0
- package/examples/example-campaign/plugins/campaign-example/index.ts +36 -0
- package/examples/example-campaign/plugins/campaign-example/package.json +4 -0
- package/examples/example-campaign/plugins/campaign-example/sc2-adjutant-plugin.json +11 -0
- package/examples/example-campaign/sc2-adjutant.workspace.json +7 -0
- package/examples/test-fields/README.md +18 -0
- package/examples/test-fields/missions/bridge-connections/blueprint.json +204 -0
- package/examples/test-fields/missions/lighting-preview/blueprint.json +121 -0
- package/examples/test-fields/missions/terrain-objects/blueprint.json +211 -0
- package/examples/test-fields/sc2-adjutant.workspace.json +5 -0
- package/package.json +58 -4
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
// Co-design Stage tracking (#116): which of the four Stages each Mission is at, and the author's
|
|
2
|
+
// sign-offs so far. The record is `co-design.json` in the Mission's folder, beside its Blueprint,
|
|
3
|
+
// so it is part of the Workspace and survives a restart. A Mission without one is at Stage 1 with
|
|
4
|
+
// nothing signed off. The current Stage is always the one after the last sign-off, and signing
|
|
5
|
+
// off is the only way to advance, one Stage at a time. Reopening (#673) takes a Mission back to an
|
|
6
|
+
// earlier Stage: the sign-offs of that Stage and every later one leave `signedOff` and are kept,
|
|
7
|
+
// superseded, in `co-design-history.json` beside it, with when and why. The history has its own
|
|
8
|
+
// file so `co-design.json` keeps the shape a core from before reopening reads.
|
|
9
|
+
import { readFile } from "node:fs/promises";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
import { formatIssues } from "../util/format-issues.js";
|
|
13
|
+
import { CoveredFileSchema, coverageOf, isStale, stalenessOf } from "./evidence-coverage.js";
|
|
14
|
+
import { replaceFile } from "../util/replace-file.js";
|
|
15
|
+
/** The four Co-design Stages, in order, by name. Stage `n` is at index `n - 1`. */
|
|
16
|
+
export const CO_DESIGN_STAGES = ["Beats and Mechanics", "Geography sketch", "Palette and placement", "Dialogue and compilation"];
|
|
17
|
+
export const STAGE_FILE = "co-design.json";
|
|
18
|
+
/** The reopenings and the sign-offs they superseded, beside the Stage record. */
|
|
19
|
+
export const HISTORY_FILE = "co-design-history.json";
|
|
20
|
+
/** A Stage's number, from 1 to the number of Stages. */
|
|
21
|
+
export const StageNumberSchema = z.number().int().min(1).max(CO_DESIGN_STAGES.length);
|
|
22
|
+
/**
|
|
23
|
+
* One sign-off as recorded: the Stage, when, what the author agreed, and the files it covers with
|
|
24
|
+
* their fingerprints at the time (#748). A sign-off from before `covers` has none and is never
|
|
25
|
+
* reported stale.
|
|
26
|
+
*/
|
|
27
|
+
export const SignOffSchema = z
|
|
28
|
+
.object({
|
|
29
|
+
stage: StageNumberSchema,
|
|
30
|
+
at: z.iso.datetime(),
|
|
31
|
+
note: z.string().optional(),
|
|
32
|
+
covers: z.array(CoveredFileSchema).optional(),
|
|
33
|
+
})
|
|
34
|
+
.strict();
|
|
35
|
+
/** The standing sign-offs of the Mission at `blueprintPath` that are stale now. Reads only; nothing is rewritten. */
|
|
36
|
+
export async function staleSignOffs(blueprintPath, signedOff) {
|
|
37
|
+
const stale = [];
|
|
38
|
+
for (const signOff of signedOff) {
|
|
39
|
+
if (!signOff.covers)
|
|
40
|
+
continue;
|
|
41
|
+
const staleness = await stalenessOf(blueprintPath, signOff.stage, signOff.covers);
|
|
42
|
+
if (isStale(staleness))
|
|
43
|
+
stale.push({ stage: signOff.stage, ...staleness });
|
|
44
|
+
}
|
|
45
|
+
return stale;
|
|
46
|
+
}
|
|
47
|
+
/** One reopening as recorded: the Stage reopened, when, why, and the sign-offs it superseded. */
|
|
48
|
+
export const ReopeningSchema = z
|
|
49
|
+
.object({
|
|
50
|
+
stage: StageNumberSchema,
|
|
51
|
+
at: z.iso.datetime(),
|
|
52
|
+
note: z.string().refine((note) => note.trim().length > 0, "say why the Stage was reopened"),
|
|
53
|
+
superseded: z.array(SignOffSchema).min(1),
|
|
54
|
+
})
|
|
55
|
+
.strict()
|
|
56
|
+
.superRefine(({ stage, superseded }, context) => {
|
|
57
|
+
superseded.forEach((signOff, index) => {
|
|
58
|
+
if (signOff.stage !== stage + index) {
|
|
59
|
+
context.addIssue({ code: "custom", path: ["superseded", index, "stage"], message: `expected Stage ${stage + index}, got Stage ${signOff.stage}` });
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
const StageRecordSchema = z
|
|
64
|
+
.object({
|
|
65
|
+
signedOff: z.array(SignOffSchema),
|
|
66
|
+
})
|
|
67
|
+
.strict()
|
|
68
|
+
.superRefine(({ signedOff }, context) => {
|
|
69
|
+
signedOff.forEach((signOff, index) => {
|
|
70
|
+
if (signOff.stage !== index + 1) {
|
|
71
|
+
context.addIssue({ code: "custom", path: ["signedOff", index, "stage"], message: `expected Stage ${index + 1}, got Stage ${signOff.stage}` });
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
/** The reopenings, in their own file so that a core from before them still reads `co-design.json`. */
|
|
76
|
+
const HistorySchema = z.object({ reopened: z.array(ReopeningSchema) }).strict();
|
|
77
|
+
/**
|
|
78
|
+
* What's wrong with a history against the sign-offs that stand, replayed from the record alone and
|
|
79
|
+
* never from the times in it, which clocks on two machines needn't agree on. A sign-off is
|
|
80
|
+
* superseded at most once and never stands after it is; and since sign-offs only add Stages
|
|
81
|
+
* between reopenings, each reopening's Stage is at most one past what stood after the reopening
|
|
82
|
+
* before it, and what stands now reaches at least to before the last one's Stage. A record merged
|
|
83
|
+
* by hand from two branches, or a write cut short between the two files, fails these.
|
|
84
|
+
*/
|
|
85
|
+
function historyIssues(signedOff, reopened) {
|
|
86
|
+
const issues = [];
|
|
87
|
+
const seen = new Map();
|
|
88
|
+
const note = (signOff, where) => {
|
|
89
|
+
const key = `${signOff.stage}@${signOff.at}`;
|
|
90
|
+
const first = seen.get(key);
|
|
91
|
+
if (first)
|
|
92
|
+
issues.push(`${where}: the sign-off of Stage ${signOff.stage} at ${signOff.at} is also ${first}; a sign-off is superseded once at most, and doesn't stand after it is`);
|
|
93
|
+
else
|
|
94
|
+
seen.set(key, where);
|
|
95
|
+
};
|
|
96
|
+
reopened.forEach((reopening, index) => {
|
|
97
|
+
reopening.superseded.forEach((signOff, inner) => note(signOff, `reopened.${index}.superseded.${inner}`));
|
|
98
|
+
const before = reopened[index - 1];
|
|
99
|
+
// What stood when this Stage was reopened: its Stage less one, plus what it superseded.
|
|
100
|
+
const stood = reopening.stage - 1 + reopening.superseded.length;
|
|
101
|
+
if (before && stood < before.stage - 1) {
|
|
102
|
+
issues.push(`reopened.${index}: Stage ${reopening.stage} was reopened with Stages 1 to ${stood} signed off, fewer than the ${before.stage - 1} that stood after the reopening before it`);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
signedOff.forEach((signOff, index) => note(signOff, `signedOff.${index}`));
|
|
106
|
+
const last = reopened.at(-1);
|
|
107
|
+
if (last && signedOff.length < last.stage - 1) {
|
|
108
|
+
issues.push(`signedOff: Stages 1 to ${last.stage - 1} stood after Stage ${last.stage} was reopened, but only ${signedOff.length} stand now`);
|
|
109
|
+
}
|
|
110
|
+
return issues;
|
|
111
|
+
}
|
|
112
|
+
/** "Stage 2 (Geography sketch)". */
|
|
113
|
+
export const stageLabel = (stage) => `Stage ${stage} (${CO_DESIGN_STAGES[stage - 1]})`;
|
|
114
|
+
/** The Stage record of the Mission whose Blueprint is at `blueprintPath`. */
|
|
115
|
+
export const stageFilePath = (blueprintPath) => path.join(path.dirname(blueprintPath), STAGE_FILE);
|
|
116
|
+
/** The history of the Mission whose Blueprint is at `blueprintPath`, beside its Stage record. */
|
|
117
|
+
export const historyFilePath = (blueprintPath) => path.join(path.dirname(blueprintPath), HISTORY_FILE);
|
|
118
|
+
/** One of the two files parsed with `schema`, or undefined when it isn't there. */
|
|
119
|
+
async function readJson(file, schema, what) {
|
|
120
|
+
let raw;
|
|
121
|
+
try {
|
|
122
|
+
raw = JSON.parse(await readFile(file, "utf8"));
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
if (error.code === "ENOENT")
|
|
126
|
+
return undefined;
|
|
127
|
+
throw new Error(`Can't read the Co-design ${what} ${file}: ${error.message}`, { cause: error });
|
|
128
|
+
}
|
|
129
|
+
const parsed = schema.safeParse(raw);
|
|
130
|
+
if (!parsed.success)
|
|
131
|
+
throw new Error(`Invalid Co-design ${what} ${file}: ${formatIssues(parsed.error, "(record)")}`);
|
|
132
|
+
return parsed.data;
|
|
133
|
+
}
|
|
134
|
+
/** Reads a Mission's Stage state; a Mission with no record yet is at Stage 1 with nothing signed off. */
|
|
135
|
+
export async function readStageState(blueprintPath) {
|
|
136
|
+
const record = await readJson(stageFilePath(blueprintPath), StageRecordSchema, "Stage record");
|
|
137
|
+
const history = await readJson(historyFilePath(blueprintPath), HistorySchema, "Stage history");
|
|
138
|
+
const signedOff = record?.signedOff ?? [];
|
|
139
|
+
const reopened = history?.reopened ?? [];
|
|
140
|
+
const issues = historyIssues(signedOff, reopened);
|
|
141
|
+
if (issues.length) {
|
|
142
|
+
throw new Error(`The Co-design Stage history ${historyFilePath(blueprintPath)} doesn't agree with the Stage record ${stageFilePath(blueprintPath)}: ${issues.join("; ")}`);
|
|
143
|
+
}
|
|
144
|
+
return stateOf(signedOff, reopened);
|
|
145
|
+
}
|
|
146
|
+
const stateOf = (signedOff, reopened) => ({
|
|
147
|
+
stage: signedOff.length < CO_DESIGN_STAGES.length ? signedOff.length + 1 : null,
|
|
148
|
+
signedOff,
|
|
149
|
+
reopened,
|
|
150
|
+
});
|
|
151
|
+
const json = (value) => `${JSON.stringify(value, null, 2)}\n`;
|
|
152
|
+
/**
|
|
153
|
+
* Checks `next` as a read would, so the tools never write what the server would refuse, then saves
|
|
154
|
+
* it: the history first, then the record, so a write cut short between them is caught on the next
|
|
155
|
+
* read (the superseded sign-offs still standing) rather than losing them.
|
|
156
|
+
*/
|
|
157
|
+
async function writeState(blueprintPath, next, { history }) {
|
|
158
|
+
const issues = historyIssues(next.signedOff, next.reopened);
|
|
159
|
+
if (issues.length)
|
|
160
|
+
throw new Error(`Not saved, since the Co-design Stage record would be refused: ${issues.join("; ")}`);
|
|
161
|
+
if (history)
|
|
162
|
+
await replaceFile(historyFilePath(blueprintPath), json({ reopened: next.reopened }));
|
|
163
|
+
await replaceFile(stageFilePath(blueprintPath), json({ signedOff: next.signedOff }));
|
|
164
|
+
return stateOf(next.signedOff, next.reopened);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The Mission's Stage state for a change to `stage`, or the refusal of a Stage number out of
|
|
168
|
+
* range. The number is checked before the record is read, so a bad number is refused as such.
|
|
169
|
+
*/
|
|
170
|
+
async function readForChange(blueprintPath, stage) {
|
|
171
|
+
const noSuchStage = !StageNumberSchema.safeParse(stage).success;
|
|
172
|
+
const state = await readStageState(blueprintPath);
|
|
173
|
+
return noSuchStage ? { state, refusal: `there is no Stage ${stage}; the Stages are 1 to ${CO_DESIGN_STAGES.length}.` } : { state };
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Signs off `stage` of the Mission at `blueprintPath` and saves the record. Refused unless `stage`
|
|
177
|
+
* is the Stage the Mission is at: Stages can't be skipped or signed off twice. The caller makes
|
|
178
|
+
* sure two sign-offs of one Mission don't run at once.
|
|
179
|
+
*/
|
|
180
|
+
export async function signOffStage(mission, blueprintPath, stage, { note, at = new Date() } = {}) {
|
|
181
|
+
const { state, refusal: outOfRange } = await readForChange(blueprintPath, stage);
|
|
182
|
+
const refuse = (reason) => ({ signed: false, reason: `Refused: ${reason}`, state });
|
|
183
|
+
if (outOfRange)
|
|
184
|
+
return refuse(outOfRange);
|
|
185
|
+
if (state.stage === null || stage < state.stage) {
|
|
186
|
+
const now = state.stage === null ? "Every Stage is signed off." : `It is at ${stageLabel(state.stage)}.`;
|
|
187
|
+
return refuse(`${stageLabel(stage)} of ${mission} is already signed off. ${now} To redo it, reopen it with reopen_stage, only if the author asks.`);
|
|
188
|
+
}
|
|
189
|
+
if (stage > state.stage) {
|
|
190
|
+
return refuse(`${mission} is at ${stageLabel(state.stage)}. Sign off Stage ${state.stage} before Stage ${stage}; Stages can't be skipped.`);
|
|
191
|
+
}
|
|
192
|
+
const covers = await coverageOf(blueprintPath, stage);
|
|
193
|
+
const signedOff = [...state.signedOff, { stage, at: at.toISOString(), ...(note ? { note } : {}), covers }];
|
|
194
|
+
return { signed: true, state: await writeState(blueprintPath, { signedOff, reopened: state.reopened }, { history: false }) };
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Reopens `stage` of the Mission at `blueprintPath`, an earlier Stage that is signed off, and saves
|
|
198
|
+
* the record: its sign-off and every later one are superseded, kept in the history with `note`, and
|
|
199
|
+
* the Mission is at `stage` again. Refused for the Stage the Mission is at and for a Stage it hasn't
|
|
200
|
+
* reached. The caller makes sure two changes to one Mission's record don't run at once.
|
|
201
|
+
*/
|
|
202
|
+
export async function reopenStage(mission, blueprintPath, stage, { note, at = new Date() }) {
|
|
203
|
+
const { state, refusal: outOfRange } = await readForChange(blueprintPath, stage);
|
|
204
|
+
const refuse = (reason) => ({ reopened: false, reason: `Refused: ${reason}`, state });
|
|
205
|
+
if (outOfRange)
|
|
206
|
+
return refuse(outOfRange);
|
|
207
|
+
const why = note.trim();
|
|
208
|
+
if (!why)
|
|
209
|
+
return refuse("say why the Stage is reopened, in the note.");
|
|
210
|
+
if (state.stage !== null && stage >= state.stage) {
|
|
211
|
+
const where = stage === state.stage ? `${mission} is at ${stageLabel(stage)} already, and it isn't signed off` : `${mission} is at ${stageLabel(state.stage)} and hasn't reached Stage ${stage}`;
|
|
212
|
+
return refuse(`${where}. Only a signed-off Stage can be reopened.`);
|
|
213
|
+
}
|
|
214
|
+
const reopening = { stage, at: at.toISOString(), note: why, superseded: state.signedOff.slice(stage - 1) };
|
|
215
|
+
const next = { signedOff: state.signedOff.slice(0, stage - 1), reopened: [...state.reopened, reopening] };
|
|
216
|
+
return { reopened: true, state: await writeState(blueprintPath, next, { history: true }) };
|
|
217
|
+
}
|
|
218
|
+
/** What to do next at a Mission's Stage, as one line for a tool reply. */
|
|
219
|
+
export function nextStepHint({ stage }) {
|
|
220
|
+
switch (stage) {
|
|
221
|
+
case 1:
|
|
222
|
+
return "Next (Stage 1): agree the Beats, Objectives and Mechanics with the author and write them with patch_blueprint, then sign_off_stage 1 once the author agrees.";
|
|
223
|
+
case 2:
|
|
224
|
+
return "Next (Stage 2): shape the Zones and Connections (set_zone_polygon, move_zone, patch_blueprint), share them with preview and critique them with check_layout, then sign_off_stage 2 once the author agrees the sketch. Terrain waits for that sign-off.";
|
|
225
|
+
case 3:
|
|
226
|
+
return "Next (Stage 3): choose the tileset, textures, lighting and doodads, place the Anchors and Placements (patch_blueprint, move_anchor), and compile_map for the author to look at in the Editor, then sign_off_stage 3 once the author agrees.";
|
|
227
|
+
case 4:
|
|
228
|
+
return "Next (Stage 4): wire the dialogue and cutscenes, then play the Mission with test_mission (it runs Test Document, or hands it to the author when the Host Adapter can't), then sign_off_stage 4 once the Mission plays as agreed.";
|
|
229
|
+
default:
|
|
230
|
+
return "Next (every Stage signed off): take any change back to the Stage it belongs to with the author; reopen_stage that Stage only if the author asks.";
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A covered file as a record stores it. */
|
|
3
|
+
export declare const CoveredFileSchema: z.ZodObject<{
|
|
4
|
+
path: z.ZodString;
|
|
5
|
+
fingerprint: z.ZodString;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
/** One covered file: its path from the Mission's folder, with forward slashes, and its fingerprint. */
|
|
8
|
+
export type CoveredFile = {
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly fingerprint: string;
|
|
11
|
+
};
|
|
12
|
+
/** What differs now from what a record covered, as paths from the Mission's folder. Empty arrays mean it still stands. */
|
|
13
|
+
export type Staleness = {
|
|
14
|
+
readonly changed: readonly string[];
|
|
15
|
+
readonly missing: readonly string[];
|
|
16
|
+
readonly added: readonly string[];
|
|
17
|
+
};
|
|
18
|
+
/** The first Stage whose sign-off covers the Map Package; Stages 1 and 2 are about the Blueprint alone. */
|
|
19
|
+
export declare const FIRST_PACKAGE_STAGE = 3;
|
|
20
|
+
/**
|
|
21
|
+
* The files a sign-off of `stage` covers now: the Blueprint, and from Stage 3 on every file of the
|
|
22
|
+
* Mission's Map Package except its `Assets` folder, its minimap and the two files the Editor rewrites on a save (its component list and document header). Sorted by path.
|
|
23
|
+
*/
|
|
24
|
+
export declare function coverageOf(blueprintPath: string, stage: number): Promise<CoveredFile[]>;
|
|
25
|
+
/** How `covers`, as recorded, differs from the files now: what changed, what is gone, and what a covered folder gained. */
|
|
26
|
+
export declare function stalenessOf(blueprintPath: string, stage: number, covers: readonly CoveredFile[]): Promise<Staleness>;
|
|
27
|
+
export declare const isStale: ({ changed, missing, added }: Staleness) => boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether a capture's manifest (`shots.json`, `views.json`) still stands (#748). A capture shows
|
|
30
|
+
* the Mission's map as it was, so it covers what a Stage 3 sign-off does: the Blueprint and the Map
|
|
31
|
+
* Package. Undefined when the manifest records no `covers` (a capture from before, or one of a map
|
|
32
|
+
* that is no Mission's) or can't be read: such a capture is never reported stale.
|
|
33
|
+
*/
|
|
34
|
+
export declare function captureStaleness(blueprintPath: string, manifestPath: string): Promise<Staleness | undefined>;
|
|
35
|
+
/** The Mission's `output/shots/<name>/` captures that are stale now, by folder name, with what differs. Reads only. */
|
|
36
|
+
export declare function staleShotCaptures(blueprintPath: string): Promise<Array<{
|
|
37
|
+
name: string;
|
|
38
|
+
} & Staleness>>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// What an evidence record covers (#748). A sign-off vouches for the files it was given over, so it
|
|
2
|
+
// records them, each with a fingerprint, and reports itself stale once one of them differs. The
|
|
3
|
+
// check is on read and changes nothing: a stale record is still the author's word, and the answer to
|
|
4
|
+
// "does it still stand?" is theirs. Only the record's own `covers` is compared, so a record from
|
|
5
|
+
// before this existed (no `covers`) is "unrecorded", never stale.
|
|
6
|
+
import { existsSync } from "node:fs";
|
|
7
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
import { fingerprint } from "../domain/compile-record.js";
|
|
11
|
+
import { missionMapPackage } from "../map/mission-package.js";
|
|
12
|
+
/** A covered file as a record stores it. */
|
|
13
|
+
export const CoveredFileSchema = z.object({ path: z.string().min(1), fingerprint: z.string().regex(/^[0-9a-f]{16}$/, "A fingerprint is 16 hex digits") }).strict();
|
|
14
|
+
/** The first Stage whose sign-off covers the Map Package; Stages 1 and 2 are about the Blueprint alone. */
|
|
15
|
+
export const FIRST_PACKAGE_STAGE = 3;
|
|
16
|
+
/** A package folder that differs per machine without the author changing the map (community and placeholder files): left out of coverage. */
|
|
17
|
+
const NOT_COVERED_FOLDERS = new Set(["Assets"]);
|
|
18
|
+
/** Package files the Editor regenerates or rewrites on every save, with no edit (the minimap; the component list and document header, seen on an unchanged save 2026-11-21, docs/reference/editor-saves.md). */
|
|
19
|
+
const NOT_COVERED_FILES = new Set(["Minimap.tga", "ComponentList.SC2Components", "DocumentHeader"]);
|
|
20
|
+
const slashed = (relative) => relative.split(path.sep).join("/");
|
|
21
|
+
async function filesUnder(dir, from) {
|
|
22
|
+
const found = [];
|
|
23
|
+
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
|
24
|
+
const full = path.join(dir, entry.name);
|
|
25
|
+
if (entry.isDirectory()) {
|
|
26
|
+
if (!NOT_COVERED_FOLDERS.has(entry.name))
|
|
27
|
+
found.push(...(await filesUnder(full, from)));
|
|
28
|
+
}
|
|
29
|
+
else if (entry.isFile() && !NOT_COVERED_FILES.has(entry.name)) {
|
|
30
|
+
found.push(slashed(path.relative(from, full)));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return found;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The files a sign-off of `stage` covers now: the Blueprint, and from Stage 3 on every file of the
|
|
37
|
+
* Mission's Map Package except its `Assets` folder, its minimap and the two files the Editor rewrites on a save (its component list and document header). Sorted by path.
|
|
38
|
+
*/
|
|
39
|
+
export async function coverageOf(blueprintPath, stage) {
|
|
40
|
+
const missionDir = path.dirname(blueprintPath);
|
|
41
|
+
const relative = [slashed(path.relative(missionDir, blueprintPath))];
|
|
42
|
+
if (stage >= FIRST_PACKAGE_STAGE) {
|
|
43
|
+
const pack = await missionMapPackage(blueprintPath);
|
|
44
|
+
if (existsSync(pack))
|
|
45
|
+
relative.push(...(await filesUnder(pack, missionDir)));
|
|
46
|
+
}
|
|
47
|
+
relative.sort();
|
|
48
|
+
return Promise.all(relative.map(async (file) => ({ path: file, fingerprint: fingerprint(await readFile(path.join(missionDir, file))) })));
|
|
49
|
+
}
|
|
50
|
+
/** How `covers`, as recorded, differs from the files now: what changed, what is gone, and what a covered folder gained. */
|
|
51
|
+
export async function stalenessOf(blueprintPath, stage, covers) {
|
|
52
|
+
const now = new Map((await coverageOf(blueprintPath, stage)).map((file) => [file.path, file.fingerprint]));
|
|
53
|
+
const then = new Set(covers.map((file) => file.path));
|
|
54
|
+
return {
|
|
55
|
+
changed: covers.filter((file) => now.has(file.path) && now.get(file.path) !== file.fingerprint).map((file) => file.path),
|
|
56
|
+
missing: covers.filter((file) => !now.has(file.path)).map((file) => file.path),
|
|
57
|
+
added: [...now.keys()].filter((file) => !then.has(file)),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export const isStale = ({ changed, missing, added }) => changed.length + missing.length + added.length > 0;
|
|
61
|
+
/**
|
|
62
|
+
* Whether a capture's manifest (`shots.json`, `views.json`) still stands (#748). A capture shows
|
|
63
|
+
* the Mission's map as it was, so it covers what a Stage 3 sign-off does: the Blueprint and the Map
|
|
64
|
+
* Package. Undefined when the manifest records no `covers` (a capture from before, or one of a map
|
|
65
|
+
* that is no Mission's) or can't be read: such a capture is never reported stale.
|
|
66
|
+
*/
|
|
67
|
+
export async function captureStaleness(blueprintPath, manifestPath) {
|
|
68
|
+
let covers;
|
|
69
|
+
try {
|
|
70
|
+
covers = z.object({ covers: z.array(CoveredFileSchema) }).safeParse(JSON.parse(await readFile(manifestPath, "utf8"))).data?.covers;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
return covers ? stalenessOf(blueprintPath, FIRST_PACKAGE_STAGE, covers) : undefined;
|
|
76
|
+
}
|
|
77
|
+
/** The Mission's `output/shots/<name>/` captures that are stale now, by folder name, with what differs. Reads only. */
|
|
78
|
+
export async function staleShotCaptures(blueprintPath) {
|
|
79
|
+
const dir = path.join(path.dirname(blueprintPath), "output", "shots");
|
|
80
|
+
if (!existsSync(dir))
|
|
81
|
+
return [];
|
|
82
|
+
const stale = [];
|
|
83
|
+
for (const entry of (await readdir(dir, { withFileTypes: true })).filter((e) => e.isDirectory()).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
84
|
+
const staleness = await captureStaleness(blueprintPath, path.join(dir, entry.name, "shots.json"));
|
|
85
|
+
if (staleness && isStale(staleness))
|
|
86
|
+
stale.push({ name: entry.name, ...staleness });
|
|
87
|
+
}
|
|
88
|
+
return stale;
|
|
89
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type MapMeasures, type MeasureId } from "./measures.js";
|
|
2
|
+
export declare const BLIZZARD_CAMPAIGNS: readonly ["Wings of Liberty", "Heart of the Swarm", "Legacy of the Void", "Nova Covert Ops"];
|
|
3
|
+
export type BlizzardCampaign = (typeof BLIZZARD_CAMPAIGNS)[number];
|
|
4
|
+
/** A campaign mission's map: its id (the map file's name), campaign, and folder in the game's storage. */
|
|
5
|
+
export type BlizzardMission = {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly campaign: BlizzardCampaign;
|
|
8
|
+
readonly storagePath: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Every map a campaign mission plays on: the main missions with each branch's alternative and the
|
|
12
|
+
* secret mission, Heart of the Swarm's evolution missions, Legacy of the Void's prologue (Whispers of
|
|
13
|
+
* Oblivion, shipped in the Swarm campaign's folder) and epilogue. Left out: the story rooms between
|
|
14
|
+
* missions, the tutorials, the test map, the Lost Viking arcade and the challenge maps, none of
|
|
15
|
+
* which is a mission's battlefield.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BLIZZARD_CAMPAIGN_MISSIONS: readonly BlizzardMission[];
|
|
18
|
+
/** How a measure's values spread over the maps that have one: percentiles interpolate between neighbouring values. */
|
|
19
|
+
export type MeasureSpread = {
|
|
20
|
+
readonly maps: number;
|
|
21
|
+
readonly min: number;
|
|
22
|
+
readonly p10: number;
|
|
23
|
+
readonly p25: number;
|
|
24
|
+
readonly median: number;
|
|
25
|
+
readonly p75: number;
|
|
26
|
+
readonly p90: number;
|
|
27
|
+
readonly max: number;
|
|
28
|
+
readonly mean: number;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The spread of `values`, nulls left out; null when none has a value. Unlike a Map Study's
|
|
32
|
+
* quantiles (stats.ts, nearest rank, for reading one map's numbers), the percentiles interpolate:
|
|
33
|
+
* a consistency report compares a mapper's few maps against them, where a step from one map's
|
|
34
|
+
* value to the next would move the edge of the spread.
|
|
35
|
+
*/
|
|
36
|
+
export declare function measureSpread(values: readonly (number | null)[]): MeasureSpread | null;
|
|
37
|
+
/** One map the baseline measured. */
|
|
38
|
+
export type BaselineMap = {
|
|
39
|
+
readonly id: string;
|
|
40
|
+
readonly campaign: BlizzardCampaign;
|
|
41
|
+
readonly name?: string;
|
|
42
|
+
};
|
|
43
|
+
/** One measure across the baseline's maps. */
|
|
44
|
+
export type BaselineMeasure = {
|
|
45
|
+
/** What it measures, as MEASURES says. */
|
|
46
|
+
readonly description: string;
|
|
47
|
+
readonly spread: MeasureSpread | null;
|
|
48
|
+
/** Every map's value by its id; null where the map has nothing to measure. */
|
|
49
|
+
readonly maps: Readonly<Record<string, number | null>>;
|
|
50
|
+
};
|
|
51
|
+
/** A campaign mission the install the baseline was built from didn't hold, and why. */
|
|
52
|
+
export type UnavailableMap = {
|
|
53
|
+
readonly id: string;
|
|
54
|
+
readonly campaign: BlizzardCampaign;
|
|
55
|
+
readonly reason: string;
|
|
56
|
+
};
|
|
57
|
+
export type BlizzardBaseline = {
|
|
58
|
+
readonly baselineVersion: number;
|
|
59
|
+
readonly note: string;
|
|
60
|
+
readonly maps: readonly BaselineMap[];
|
|
61
|
+
/** Missions left out because the install held no data for them; a rebuild from a fuller install measures them. */
|
|
62
|
+
readonly unavailable: readonly UnavailableMap[];
|
|
63
|
+
readonly measures: Readonly<Record<MeasureId, BaselineMeasure>>;
|
|
64
|
+
};
|
|
65
|
+
export declare const BLIZZARD_BASELINE_VERSION = 1;
|
|
66
|
+
/** The baseline over `maps`, each with its measures, naming the missions it couldn't measure. */
|
|
67
|
+
export declare function buildBlizzardBaseline(maps: readonly (BaselineMap & {
|
|
68
|
+
readonly measures: MapMeasures;
|
|
69
|
+
})[], unavailable?: readonly UnavailableMap[]): BlizzardBaseline;
|
|
70
|
+
export declare const BLIZZARD_BASELINE_PATH: string;
|
|
71
|
+
/**
|
|
72
|
+
* The shipped baseline. Refused when its file doesn't parse, or its measures aren't the ones core
|
|
73
|
+
* gives (one missing, or one core no longer has), which means core's measures changed without
|
|
74
|
+
* the maintainer rebuilding it.
|
|
75
|
+
*/
|
|
76
|
+
export declare function readBlizzardBaseline(file?: string): BlizzardBaseline;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// The Blizzard baseline: core's lesson-neutral measures (measures.ts) over every campaign mission of
|
|
2
|
+
// Wings of Liberty, Heart of the Swarm, Legacy of the Void and Nova Covert Ops, so a Style Pack's
|
|
3
|
+
// consistency report can tell a mapper's taste from what every SC2 campaign map does. The
|
|
4
|
+
// maintainer builds it once from the game's storage (scripts/build-blizzard-baseline.mjs); it
|
|
5
|
+
// ships as data/blizzard-baseline.json, with no maps and no frames, and mappers never extract anything.
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
import { MEASURES } from "./measures.js";
|
|
11
|
+
import { round } from "./stats.js";
|
|
12
|
+
export const BLIZZARD_CAMPAIGNS = ["Wings of Liberty", "Heart of the Swarm", "Legacy of the Void", "Nova Covert Ops"];
|
|
13
|
+
const missions = (campaign, folder, ids) => ids.map((id) => ({ id, campaign, storagePath: `${folder}/${id}.sc2map` }));
|
|
14
|
+
const LIBERTY = "campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign";
|
|
15
|
+
const SWARM = "campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign";
|
|
16
|
+
const VOID = "campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void";
|
|
17
|
+
const NOVA = "mods/novastoryassets.sc2mod";
|
|
18
|
+
/**
|
|
19
|
+
* Every map a campaign mission plays on: the main missions with each branch's alternative and the
|
|
20
|
+
* secret mission, Heart of the Swarm's evolution missions, Legacy of the Void's prologue (Whispers of
|
|
21
|
+
* Oblivion, shipped in the Swarm campaign's folder) and epilogue. Left out: the story rooms between
|
|
22
|
+
* missions, the tutorials, the test map, the Lost Viking arcade and the challenge maps, none of
|
|
23
|
+
* which is a mission's battlefield.
|
|
24
|
+
*/
|
|
25
|
+
export const BLIZZARD_CAMPAIGN_MISSIONS = [
|
|
26
|
+
...missions("Wings of Liberty", LIBERTY, [
|
|
27
|
+
"thanson01", "thanson02", "thanson03a", "thanson03b",
|
|
28
|
+
"thorner01", "thorner02", "thorner03", "thorner04", "thorner05s",
|
|
29
|
+
"traynor01", "traynor02", "traynor03",
|
|
30
|
+
"ttosh01", "ttosh02", "ttosh03a", "ttosh03b",
|
|
31
|
+
"ttychus01", "ttychus02", "ttychus03", "ttychus04", "ttychus05",
|
|
32
|
+
"tvalerian01", "tvalerian02a", "tvalerian02b", "tvalerian03",
|
|
33
|
+
"tzeratul01", "tzeratul02", "tzeratul03", "tzeratul04",
|
|
34
|
+
]),
|
|
35
|
+
...missions("Heart of the Swarm", `${SWARM}/swarm`, [
|
|
36
|
+
"zchar01", "zchar02", "zchar03",
|
|
37
|
+
"zexpedition01", "zexpedition02", "zexpedition03",
|
|
38
|
+
"zhybrid01", "zhybrid02", "zhybrid03",
|
|
39
|
+
"zkorhal01", "zkorhal02", "zkorhal03",
|
|
40
|
+
"zlab01", "zlab02", "zlab03",
|
|
41
|
+
"zspace01", "zspace02",
|
|
42
|
+
"zzerus01", "zzerus02", "zzerus03",
|
|
43
|
+
]),
|
|
44
|
+
...missions("Heart of the Swarm", `${SWARM}/swarm/evolution`, [
|
|
45
|
+
"zevolutionbaneling", "zevolutionhydralisk", "zevolutionmutalisk", "zevolutionroach", "zevolutionswarmhost", "zevolutionultralisk", "zevolutionzergling",
|
|
46
|
+
]),
|
|
47
|
+
...missions("Legacy of the Void", `${SWARM}/voidprologue`, ["voidprologue01", "voidprologue02", "voidprologue03"]),
|
|
48
|
+
...missions("Legacy of the Void", VOID, [
|
|
49
|
+
"paiur01", "paiur02", "paiur03", "paiur04", "paiur05", "paiur06",
|
|
50
|
+
"pkorhal01", "pkorhal02",
|
|
51
|
+
"pmoebius01",
|
|
52
|
+
"ppurifier01", "ppurifier02", "ppurifier03",
|
|
53
|
+
"pshakuras01", "pshakuras02",
|
|
54
|
+
"ptaldarim01", "ptaldarim02",
|
|
55
|
+
"pulnar01", "pulnar02", "pulnar03",
|
|
56
|
+
"sc2epilogue01", "sc2epilogue02", "sc2epilogue03",
|
|
57
|
+
]),
|
|
58
|
+
...missions("Nova Covert Ops", `${NOVA}/base.sc2maps/maps/campaign/nova`, ["nova01", "nova02", "nova03"]),
|
|
59
|
+
...missions("Nova Covert Ops", `${NOVA}/base2.sc2maps/maps/campaign/nova`, ["nova04", "nova05", "nova06"]),
|
|
60
|
+
...missions("Nova Covert Ops", `${NOVA}/base3.sc2maps/maps/campaign/nova`, ["nova07", "nova08", "nova09"]),
|
|
61
|
+
];
|
|
62
|
+
/**
|
|
63
|
+
* The spread of `values`, nulls left out; null when none has a value. Unlike a Map Study's
|
|
64
|
+
* quantiles (stats.ts, nearest rank, for reading one map's numbers), the percentiles interpolate:
|
|
65
|
+
* a consistency report compares a mapper's few maps against them, where a step from one map's
|
|
66
|
+
* value to the next would move the edge of the spread.
|
|
67
|
+
*/
|
|
68
|
+
export function measureSpread(values) {
|
|
69
|
+
const sorted = values.filter((v) => v !== null).sort((a, b) => a - b);
|
|
70
|
+
if (!sorted.length)
|
|
71
|
+
return null;
|
|
72
|
+
const at = (q) => {
|
|
73
|
+
const position = q * (sorted.length - 1);
|
|
74
|
+
const below = Math.floor(position);
|
|
75
|
+
const above = Math.min(sorted.length - 1, below + 1);
|
|
76
|
+
return round(sorted[below] + (sorted[above] - sorted[below]) * (position - below));
|
|
77
|
+
};
|
|
78
|
+
const mean = sorted.reduce((a, b) => a + b, 0) / sorted.length;
|
|
79
|
+
return { maps: sorted.length, min: sorted[0], p10: at(0.1), p25: at(0.25), median: at(0.5), p75: at(0.75), p90: at(0.9), max: sorted.at(-1), mean: round(mean) };
|
|
80
|
+
}
|
|
81
|
+
export const BLIZZARD_BASELINE_VERSION = 1;
|
|
82
|
+
/** The baseline over `maps`, each with its measures, naming the missions it couldn't measure. */
|
|
83
|
+
export function buildBlizzardBaseline(maps, unavailable = []) {
|
|
84
|
+
const measures = Object.fromEntries(MEASURES.map(({ id, description }) => {
|
|
85
|
+
const values = maps.map((m) => m.measures[id]);
|
|
86
|
+
return [id, { description, spread: measureSpread(values), maps: Object.fromEntries(maps.map((m, k) => [m.id, values[k]])) }];
|
|
87
|
+
}));
|
|
88
|
+
return {
|
|
89
|
+
baselineVersion: BLIZZARD_BASELINE_VERSION,
|
|
90
|
+
note: "Core's lesson-neutral measures (src/study/measures.ts) over every campaign mission of Wings of Liberty, Heart of the Swarm, Legacy of the Void and Nova Covert Ops: per measure, its spread over the maps with a value and each map's value. Built by scripts/build-blizzard-baseline.mjs; data/README.md says why it ships.",
|
|
91
|
+
maps: maps.map(({ id, campaign, name }) => ({ id, campaign, ...(name ? { name } : {}) })),
|
|
92
|
+
unavailable: [...unavailable],
|
|
93
|
+
measures,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const spreadSchema = z.object({
|
|
97
|
+
maps: z.number().int().positive(),
|
|
98
|
+
min: z.number(),
|
|
99
|
+
p10: z.number(),
|
|
100
|
+
p25: z.number(),
|
|
101
|
+
median: z.number(),
|
|
102
|
+
p75: z.number(),
|
|
103
|
+
p90: z.number(),
|
|
104
|
+
max: z.number(),
|
|
105
|
+
mean: z.number(),
|
|
106
|
+
});
|
|
107
|
+
const baselineSchema = z.object({
|
|
108
|
+
baselineVersion: z.literal(BLIZZARD_BASELINE_VERSION),
|
|
109
|
+
note: z.string(),
|
|
110
|
+
maps: z.array(z.object({ id: z.string(), campaign: z.enum(BLIZZARD_CAMPAIGNS), name: z.string().optional() })),
|
|
111
|
+
unavailable: z.array(z.object({ id: z.string(), campaign: z.enum(BLIZZARD_CAMPAIGNS), reason: z.string() })),
|
|
112
|
+
measures: z.record(z.string(), z.object({ description: z.string(), spread: spreadSchema.nullable(), maps: z.record(z.string(), z.number().nullable()) })),
|
|
113
|
+
});
|
|
114
|
+
export const BLIZZARD_BASELINE_PATH = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../data/blizzard-baseline.json");
|
|
115
|
+
let cached;
|
|
116
|
+
/**
|
|
117
|
+
* The shipped baseline. Refused when its file doesn't parse, or its measures aren't the ones core
|
|
118
|
+
* gives (one missing, or one core no longer has), which means core's measures changed without
|
|
119
|
+
* the maintainer rebuilding it.
|
|
120
|
+
*/
|
|
121
|
+
export function readBlizzardBaseline(file = BLIZZARD_BASELINE_PATH) {
|
|
122
|
+
if (file === BLIZZARD_BASELINE_PATH && cached)
|
|
123
|
+
return cached;
|
|
124
|
+
const parsed = baselineSchema.parse(JSON.parse(readFileSync(file, "utf8")));
|
|
125
|
+
const ids = new Set(MEASURES.map(({ id }) => id));
|
|
126
|
+
const missing = [...ids].filter((id) => !parsed.measures[id]);
|
|
127
|
+
const stale = Object.keys(parsed.measures).filter((id) => !ids.has(id));
|
|
128
|
+
if (missing.length || stale.length) {
|
|
129
|
+
const problems = [missing.length ? `has no ${missing.join(", ")}` : "", stale.length ? `has ${stale.join(", ")}, which core doesn't measure` : ""].filter(Boolean);
|
|
130
|
+
throw new Error(`${file} ${problems.join(" and ")}: rebuild it with scripts/build-blizzard-baseline.mjs`);
|
|
131
|
+
}
|
|
132
|
+
// Its measures are exactly core's, checked above, which is what the schema's string keys can't say.
|
|
133
|
+
const baseline = parsed;
|
|
134
|
+
if (file === BLIZZARD_BASELINE_PATH)
|
|
135
|
+
cached = baseline;
|
|
136
|
+
return baseline;
|
|
137
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ExemplarProvenance } from "../plugins/plugin-api.js";
|
|
2
|
+
import { type Workspace } from "../plugins/workspace.js";
|
|
3
|
+
import { type BlizzardBaseline, type MeasureSpread } from "./blizzard-baseline.js";
|
|
4
|
+
import { type MeasureId } from "./measures.js";
|
|
5
|
+
/** How much a map's evidence weighs, by its provenance: a map its author made most. */
|
|
6
|
+
export declare const PROVENANCE_WEIGHT: Readonly<Record<ExemplarProvenance, number>>;
|
|
7
|
+
/**
|
|
8
|
+
* - distinctive: the maps agree, outside Blizzard's spread
|
|
9
|
+
* - common practice: the maps agree, and Blizzard's maps do the same
|
|
10
|
+
* - question: the maps don't agree
|
|
11
|
+
* - no baseline: the maps agree, but no Blizzard map has a value to compare
|
|
12
|
+
* - too few maps: fewer than two maps have a value
|
|
13
|
+
*/
|
|
14
|
+
export declare const VERDICTS: readonly ["distinctive", "common practice", "question", "no baseline", "too few maps"];
|
|
15
|
+
export type Verdict = (typeof VERDICTS)[number];
|
|
16
|
+
/** One map's value of a measure. */
|
|
17
|
+
export type MapValue = {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly value: number;
|
|
20
|
+
};
|
|
21
|
+
/** Blizzard's spread of a measure, as the report places the maps against it. */
|
|
22
|
+
export type BlizzardSpread = Pick<MeasureSpread, "maps" | "p10" | "p25" | "median" | "p75" | "p90">;
|
|
23
|
+
export type ReportMeasure = {
|
|
24
|
+
readonly id: MeasureId;
|
|
25
|
+
readonly description: string;
|
|
26
|
+
readonly verdict: Verdict;
|
|
27
|
+
/** Where the agreeing maps sit against Blizzard's spread (p10 to p90); absent without agreement and a baseline. */
|
|
28
|
+
readonly side?: "above" | "below" | "within";
|
|
29
|
+
/** The agreeing maps' values (every map's with a value, for a question); null when no map has one. */
|
|
30
|
+
readonly spread: {
|
|
31
|
+
readonly min: number;
|
|
32
|
+
readonly max: number;
|
|
33
|
+
readonly median: number;
|
|
34
|
+
} | null;
|
|
35
|
+
/** The maps in the spread, by id; for a question, the largest group, which falls short of agreeing. */
|
|
36
|
+
readonly agreeing: readonly string[];
|
|
37
|
+
/** The maps with a value outside the spread. */
|
|
38
|
+
readonly outliers: readonly MapValue[];
|
|
39
|
+
/** The maps with nothing to measure (no pit, no props of a kind). */
|
|
40
|
+
readonly unmeasured: readonly string[];
|
|
41
|
+
/** The agreeing maps' provenance weight (made 3, edited 2, approved 1), every map's for a question. */
|
|
42
|
+
readonly evidence: number;
|
|
43
|
+
readonly blizzard: BlizzardSpread | null;
|
|
44
|
+
/** The share of Blizzard's maps below the spread's median (ties counting half); null without a baseline. */
|
|
45
|
+
readonly percentile: number | null;
|
|
46
|
+
};
|
|
47
|
+
export type ExemplarReport = {
|
|
48
|
+
readonly maps: readonly {
|
|
49
|
+
readonly id: string;
|
|
50
|
+
readonly provenance: ExemplarProvenance;
|
|
51
|
+
}[];
|
|
52
|
+
/** The Blizzard maps the baseline measured, and the campaign missions it couldn't. */
|
|
53
|
+
readonly baseline: {
|
|
54
|
+
readonly maps: number;
|
|
55
|
+
readonly unavailable: readonly string[];
|
|
56
|
+
};
|
|
57
|
+
/** Every measure, distinctive first, then common practice, questions, and those it can't place. */
|
|
58
|
+
readonly measures: readonly ReportMeasure[];
|
|
59
|
+
};
|
|
60
|
+
export type ExemplarReportOptions = {
|
|
61
|
+
/** The Exemplar Maps to report on, by id; every one the pack lists when not given. */
|
|
62
|
+
readonly ids?: readonly string[];
|
|
63
|
+
/** The baseline to compare with; the shipped one by default. */
|
|
64
|
+
readonly baseline?: Pick<BlizzardBaseline, "maps" | "unavailable" | "measures">;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The consistency report of the active Style Pack's Exemplar Maps (`ids`, every one when not given),
|
|
68
|
+
* from their Map Studies. Refused, naming them, when a map has no study yet or one from before its
|
|
69
|
+
* measures, and for an id the pack doesn't list.
|
|
70
|
+
*/
|
|
71
|
+
export declare function exemplarReport(workspace: Workspace, { ids, baseline }?: ExemplarReportOptions): Promise<ExemplarReport>;
|