@wildshard/engine 0.0.1 → 0.1.15
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/CHANGELOG.md +128 -0
- package/budgets/calibration/m5-2026-10-01T08-07-18-573Z.json +3985 -0
- package/budgets/calibration/m5-2026-10-01T22-02-53-510Z.json +4473 -0
- package/budgets/calibration-reports/README.md +25 -0
- package/budgets/calibration-reports/_template.desktop.json +1994 -0
- package/budgets/calibration-reports/_template.phone.json +2069 -0
- package/budgets/calibration-reports/assessment.json +571 -0
- package/budgets/calibration-reports/driftwood-isle.phone.json +72 -0
- package/budgets/calibration-reports/far-reach.desktop.json +73158 -0
- package/budgets/calibration-reports/far-reach.phone.json +73086 -0
- package/budgets/calibration-reports/nalati-grasslands-x22.desktop.json +19525 -0
- package/budgets/calibration-reports/nalati-grasslands.phone.json +72 -0
- package/budgets/calibration-reports/nine-dragon-stack-g224.desktop.json +146 -0
- package/budgets/calibration-reports/nine-dragon-stack.phone.json +89 -0
- package/budgets/calibration-reports/pine-hollow.desktop.json +54949 -0
- package/budgets/calibration-reports/pine-hollow.phone.json +72 -0
- package/budgets/calibration-reports/sunscar-dunes.desktop.json +7788 -0
- package/budgets/calibration-reports/sunscar-dunes.phone.json +9378 -0
- package/budgets/calibration.json +4473 -0
- package/budgets/ceiling-re-records.json +71 -0
- package/budgets/ceiling-sources.json +5985 -0
- package/budgets/desktop-reference.json +7 -0
- package/budgets/g224-ceiling-re-record.json +15 -0
- package/budgets/grid-strip-room.json +9 -0
- package/budgets/nalati-ceiling-sources.json +44 -0
- package/budgets/shard-size-baseline.json +552 -0
- package/budgets/x22-ceiling-re-record.json +15 -0
- package/budgets/x7-ceiling-sources.json +41 -0
- package/index.html +622 -0
- package/lint/api-undocumented.json +7 -0
- package/lint/authored-html.d.mts +4 -0
- package/lint/authored-html.mjs +313 -0
- package/lint/base64-debt.json +18 -0
- package/lint/class-moves.json +4 -0
- package/lint/client-plan-boundary.d.mts +2 -0
- package/lint/client-plan-boundary.mjs +102 -0
- package/lint/debug-flags.d.mts +5 -0
- package/lint/debug-flags.mjs +190 -0
- package/lint/declaration-config.d.mts +2 -0
- package/lint/declaration-config.mjs +19 -0
- package/lint/edge-exemptions.json +6 -0
- package/lint/engine-internal.json +26 -0
- package/lint/engine-side-edges.json +5 -0
- package/lint/engine-sides.d.mts +30 -0
- package/lint/engine-sides.json +1794 -0
- package/lint/engine-sides.mjs +269 -0
- package/lint/engine-words.json +7 -0
- package/lint/exec-max-buffer.mjs +88 -0
- package/lint/generated-import-debt.json +117 -0
- package/lint/generated-source-debt.json +1029 -0
- package/lint/host-callback-syntax.d.mts +4 -0
- package/lint/host-callback-syntax.mjs +62 -0
- package/lint/host-callbacks.d.mts +6 -0
- package/lint/host-callbacks.mjs +123 -0
- package/lint/host-files.d.mts +1 -0
- package/lint/host-files.mjs +7 -0
- package/lint/host-reviews.json +14 -0
- package/lint/layer-edges.json +15 -0
- package/lint/layer-exports.d.mts +2 -0
- package/lint/layer-exports.mjs +23 -0
- package/lint/legacy-line-basis.json +995 -0
- package/lint/listed-view-code.json +13 -0
- package/lint/manifest-closure-budget.json +6 -0
- package/lint/nine-tiling-baseline.json +35 -0
- package/lint/no-base64.d.mts +19 -0
- package/lint/no-base64.mjs +112 -0
- package/lint/no-binary-json.json +174 -0
- package/lint/no-generated-import.d.mts +22 -0
- package/lint/no-generated-import.mjs +114 -0
- package/lint/page-events.json +895 -0
- package/lint/platform-pending-users.json +2520 -0
- package/lint/platform-pending-users.md +18 -0
- package/lint/ratchet-files.d.mts +2 -0
- package/lint/ratchet-files.mjs +45 -0
- package/lint/ratchet.json +230 -0
- package/lint/ratchet.mjs +212 -0
- package/lint/recorded-debt.mjs +24 -0
- package/lint/row-functions.json +173 -0
- package/lint/runtime-files.d.mts +12 -0
- package/lint/runtime-files.json +16 -0
- package/lint/runtime-files.mjs +69 -0
- package/lint/runtime-performance.d.mts +6 -0
- package/lint/runtime-performance.json +14 -0
- package/lint/runtime-performance.mjs +184 -0
- package/lint/schema-types.d.mts +9 -0
- package/lint/schema-types.mjs +114 -0
- package/lint/shard-coupling.json +333 -0
- package/lint/shard-imports.d.mts +5 -0
- package/lint/shard-imports.mjs +43 -0
- package/lint/shard-layout.json +64 -0
- package/lint/shard-platform.json +24 -0
- package/lint/shard-words.pin.json +421 -0
- package/lint/shardfile-boundaries.d.mts +10 -0
- package/lint/shardfile-boundaries.mjs +122 -0
- package/lint/sim-closure.d.mts +3 -0
- package/lint/sim-closure.json +3 -0
- package/lint/sim-closure.mjs +112 -0
- package/lint/sim-players.json +17 -0
- package/lint/sim-schema-leaves.json +1 -0
- package/lint/source-stamps.mjs +12 -0
- package/lint/syntax-values.mjs +299 -0
- package/lint/tile-bake-debt.json +556 -0
- package/lint/url-params.json +48 -0
- package/lint/weapon-subclasses.json +4 -0
- package/lint/wildshard-plugin.d.ts +13 -0
- package/lint/wildshard-plugin.js +1196 -0
- package/package.json +1298 -3
- package/scripts/agent-parity.mjs +1524 -0
- package/scripts/agent-sync.mjs +518 -0
- package/scripts/agent-time.py +475 -0
- package/scripts/apfs-clone.mjs +67 -0
- package/scripts/api-origin.d.mts +3 -0
- package/scripts/api-origin.mjs +38 -0
- package/scripts/app-build/appCook.ts +19 -0
- package/scripts/app-build/assetHashes.ts +57 -0
- package/scripts/app-build/assetLimits.d.mts +15 -0
- package/scripts/app-build/assetLimits.mjs +61 -0
- package/scripts/app-build/assetTables.d.mts +19 -0
- package/scripts/app-build/assetTables.mjs +68 -0
- package/scripts/app-build/audioPacks.ts +41 -0
- package/scripts/app-build/bakedTextures.d.mts +2 -0
- package/scripts/app-build/bakedTextures.mjs +59 -0
- package/scripts/app-build/basis.ts +25 -0
- package/scripts/app-build/bootExtras.ts +127 -0
- package/scripts/app-build/bootModules.ts +271 -0
- package/scripts/app-build/bootProductTiers.ts +48 -0
- package/scripts/app-build/bootProducts.ts +67 -0
- package/scripts/app-build/buildIdentity.d.mts +16 -0
- package/scripts/app-build/buildIdentity.mjs +89 -0
- package/scripts/app-build/catalogue.ts +216 -0
- package/scripts/app-build/chunkReport.d.mts +3 -0
- package/scripts/app-build/chunkReport.mjs +29 -0
- package/scripts/app-build/contentBase.d.mts +2 -0
- package/scripts/app-build/contentBase.mjs +34 -0
- package/scripts/app-build/controlChunks.ts +106 -0
- package/scripts/app-build/crossroadsRig.ts +17 -0
- package/scripts/app-build/doctorOutput.mjs +19 -0
- package/scripts/app-build/finalChunkNames.d.mts +3 -0
- package/scripts/app-build/finalChunkNames.mjs +94 -0
- package/scripts/app-build/gen.ts +100 -0
- package/scripts/app-build/gridSeams.d.mts +16 -0
- package/scripts/app-build/gridSeams.mjs +95 -0
- package/scripts/app-build/homeIcons.d.mts +20 -0
- package/scripts/app-build/homeIcons.mjs +64 -0
- package/scripts/app-build/importMap.d.mts +7 -0
- package/scripts/app-build/importMap.mjs +102 -0
- package/scripts/app-build/noTopLevelAwait.d.mts +4 -0
- package/scripts/app-build/noTopLevelAwait.mjs +36 -0
- package/scripts/app-build/outputProducts.d.mts +10 -0
- package/scripts/app-build/outputProducts.mjs +114 -0
- package/scripts/app-build/previousDeploy.d.mts +24 -0
- package/scripts/app-build/previousDeploy.mjs +245 -0
- package/scripts/app-build/serviceWorker.ts +145 -0
- package/scripts/app-build/splitOutput.d.mts +6 -0
- package/scripts/app-build/splitOutput.mjs +98 -0
- package/scripts/app-build/standaloneOutput.d.mts +4 -0
- package/scripts/app-build/standaloneOutput.mjs +31 -0
- package/scripts/app-build/validationReceipts.d.mts +2 -0
- package/scripts/app-build/validationReceipts.mjs +25 -0
- package/scripts/app-build/versionFiles.ts +20 -0
- package/scripts/app-build/worldMapAtlas.ts +62 -0
- package/scripts/app-build/writtenBundle.ts +51 -0
- package/scripts/app-build-pipeline-proof.mjs +67 -0
- package/scripts/app-build-pipeline.mjs +274 -0
- package/scripts/assert-store-layout.mjs +17 -0
- package/scripts/author-bundle-cache.d.mts +1 -0
- package/scripts/author-bundle-cache.mjs +137 -0
- package/scripts/author-bundle-usage.d.mts +3 -0
- package/scripts/author-bundle-usage.mjs +20 -0
- package/scripts/authored-manifest.d.mts +7 -0
- package/scripts/authored-manifest.mjs +217 -0
- package/scripts/authoring-inputs.d.mts +8 -0
- package/scripts/authoring-inputs.mjs +104 -0
- package/scripts/bake-grid-seams.mjs +110 -0
- package/scripts/bake-input-hashes.d.mts +6 -0
- package/scripts/bake-input-hashes.mjs +59 -0
- package/scripts/bake-loader.mjs +105 -0
- package/scripts/bake-output.d.mts +29 -0
- package/scripts/bake-output.mjs +84 -0
- package/scripts/bench-load.mjs +391 -0
- package/scripts/boot-dist-plan.mjs +47 -0
- package/scripts/boot-dist.py +251 -0
- package/scripts/boot-pack-parts.d.mts +2 -0
- package/scripts/boot-pack-parts.mjs +51 -0
- package/scripts/boot-publication-proof.d.mts +2 -0
- package/scripts/boot-publication-proof.mjs +64 -0
- package/scripts/boot-publication.d.mts +19 -0
- package/scripts/boot-publication.generated.json +3684 -0
- package/scripts/boot-publication.mjs +100 -0
- package/scripts/boot-temp-warn.sh +70 -0
- package/scripts/boot-timing-proof.mjs +264 -0
- package/scripts/browser-lane.sh +288 -0
- package/scripts/browser-slot-lock.py +49 -0
- package/scripts/budget-ceilings.mjs +88 -0
- package/scripts/budget-ratchet.d.mts +1 -0
- package/scripts/budget-ratchet.mjs +8 -0
- package/scripts/build-app.mjs +49 -0
- package/scripts/build-cache-report.d.mts +20 -0
- package/scripts/build-cache-report.mjs +104 -0
- package/scripts/build-mirror.d.mts +24 -0
- package/scripts/build-mirror.mjs +387 -0
- package/scripts/build-server.mjs +47 -0
- package/scripts/build-without-browser.mjs +14 -0
- package/scripts/built-product.d.mts +22 -0
- package/scripts/built-product.mjs +187 -0
- package/scripts/calibrate.mjs +43 -0
- package/scripts/capture-main-menu-hero.mjs +457 -0
- package/scripts/catalogue-all-heads.ts +35 -0
- package/scripts/changelog.d.mts +18 -0
- package/scripts/changelog.mjs +129 -0
- package/scripts/chaos-proxy-core.mjs +978 -0
- package/scripts/chaos-proxy-proof.mjs +1130 -0
- package/scripts/chaos-proxy.mjs +68 -0
- package/scripts/chaos-router.mjs +107 -0
- package/scripts/chaos-rules.mjs +197 -0
- package/scripts/check-chunks.d.mts +8 -0
- package/scripts/check-chunks.mjs +143 -0
- package/scripts/check-closed-components.d.mts +7 -0
- package/scripts/check-closed-components.mjs +87 -0
- package/scripts/check-css.mjs +235 -0
- package/scripts/check-custom-sections-zero.d.mts +2 -0
- package/scripts/check-custom-sections-zero.mjs +43 -0
- package/scripts/check-devserver.d.mts +2 -0
- package/scripts/check-devserver.mjs +29 -0
- package/scripts/check-engine-sides.mjs +85 -0
- package/scripts/check-graph.d.mts +9 -0
- package/scripts/check-graph.mjs +217 -0
- package/scripts/check-listeners.mjs +122 -0
- package/scripts/check-model-sources.mjs +106 -0
- package/scripts/check-models.d.mts +22 -0
- package/scripts/check-models.mjs +367 -0
- package/scripts/check-page-events.mjs +386 -0
- package/scripts/check-paths.allow.json +1282 -0
- package/scripts/check-paths.mjs +97 -0
- package/scripts/check-platform-ratchets.d.mts +7 -0
- package/scripts/check-platform-ratchets.mjs +297 -0
- package/scripts/check-shards.d.mts +5 -0
- package/scripts/check-shards.mjs +101 -0
- package/scripts/check-sim-players.mjs +82 -0
- package/scripts/check-spelled-paths.d.mts +1 -0
- package/scripts/check-spelled-paths.mjs +34 -0
- package/scripts/chromium-keychain-check.mjs +140 -0
- package/scripts/chromium-keychain.d.mts +1 -0
- package/scripts/chromium-keychain.mjs +5 -0
- package/scripts/chromium-memory-browser.d.mts +4 -0
- package/scripts/chromium-memory-browser.mjs +52 -0
- package/scripts/ci-bisect.py +91 -0
- package/scripts/ci-browser.sh +45 -0
- package/scripts/ci-checks.d.mts +2 -0
- package/scripts/ci-checks.mjs +94 -0
- package/scripts/ci-disk-census.py +58 -0
- package/scripts/ci-docs-proof.mjs +84 -0
- package/scripts/ci-exact-reuse.d.mts +3 -0
- package/scripts/ci-exact-reuse.mjs +73 -0
- package/scripts/ci-generated-manifest.sh +18 -0
- package/scripts/ci-native-fixtures.mjs +36 -0
- package/scripts/ci-pack.d.mts +14 -0
- package/scripts/ci-pack.mjs +231 -0
- package/scripts/ci-playwright-install.sh +11 -0
- package/scripts/ci-product-cache.d.mts +2 -0
- package/scripts/ci-product-cache.mjs +57 -0
- package/scripts/ci-products.py +285 -0
- package/scripts/ci-proof-jobs.d.mts +3 -0
- package/scripts/ci-proof-jobs.mjs +34 -0
- package/scripts/ci-selection.mjs +63 -0
- package/scripts/ci-shard-wall-proof.mjs +26 -0
- package/scripts/ci-shard-wall.mjs +35 -0
- package/scripts/ci-static.sh +63 -0
- package/scripts/commit.sh +305 -0
- package/scripts/commit_lane.py +42 -0
- package/scripts/committed-fast-checks.mjs +262 -0
- package/scripts/committed-source-tables.mjs +47 -0
- package/scripts/compare-platform-steps.mjs +15 -0
- package/scripts/compiler-code.d.mts +3 -0
- package/scripts/compiler-code.mjs +69 -0
- package/scripts/complete-at-control-snapshot.mjs +297 -0
- package/scripts/complete-at-control.mjs +580 -0
- package/scripts/content-base-proof.mjs +158 -0
- package/scripts/content-sw-proof.mjs +215 -0
- package/scripts/cook-admission-proof.mjs +42 -0
- package/scripts/cook-audit.ts +57 -0
- package/scripts/cook-job.mjs +32 -0
- package/scripts/cook-parts-report.mjs +34 -0
- package/scripts/cook-revision.ts +60 -0
- package/scripts/cook-to-play.mjs +96 -0
- package/scripts/cook-worker.mjs +78 -0
- package/scripts/cook-worker.service +5 -0
- package/scripts/cook.mjs +19 -0
- package/scripts/core-heap-diagnostic.d.mts +21 -0
- package/scripts/core-heap-diagnostic.mjs +52 -0
- package/scripts/cpu-admission-proof.mjs +55 -0
- package/scripts/cpu-admission.mjs +32 -0
- package/scripts/cpu-admission.py +243 -0
- package/scripts/cpu-broker-proof.mjs +96 -0
- package/scripts/cpu-broker.mjs +56 -0
- package/scripts/cpu-broker.py +119 -0
- package/scripts/cpu-census-proof.py +193 -0
- package/scripts/cpu-census.py +374 -0
- package/scripts/crossroads-proof.mjs +32 -0
- package/scripts/crossroads-rig/core.d.ts +16 -0
- package/scripts/crossroads-rig/core.js +417 -0
- package/scripts/crossroads-rig/desktop-probe.mjs +163 -0
- package/scripts/crossroads-rig/index.html +21 -0
- package/scripts/crossroads-rig/phone.js +74 -0
- package/scripts/crossroads-rig/production-probe.mjs +160 -0
- package/scripts/crossroads-rig/production.html +23 -0
- package/scripts/crossroads-rig/production.md +28 -0
- package/scripts/crossroads-rig/rig.js +36 -0
- package/scripts/crossroads-rig/sim-probe.mjs +217 -0
- package/scripts/crossroads-rig/stage.sh +11 -0
- package/scripts/crossroads-smoke.mjs +83 -0
- package/scripts/debug-settings.d.mts +24 -0
- package/scripts/debug-settings.mjs +80 -0
- package/scripts/decision-legacy-lines.d.mts +4 -0
- package/scripts/decision-legacy-lines.mjs +30 -0
- package/scripts/deck-skip-proof.mjs +63 -0
- package/scripts/deny-browser.mjs +11 -0
- package/scripts/docs-inputs-proof.mjs +31 -0
- package/scripts/doctor-proof.mjs +186 -0
- package/scripts/dome-cameras.d.mts +27 -0
- package/scripts/dome-cameras.mjs +77 -0
- package/scripts/download-bench/link.mjs +101 -0
- package/scripts/e2e-client.mjs +153 -0
- package/scripts/e2e-offline.sh +9 -0
- package/scripts/e2e-paths.mjs +31 -0
- package/scripts/e2e-watcher.mjs +191 -0
- package/scripts/e7-doctor-proof.mjs +61 -0
- package/scripts/e7-doctor-request-proof.mjs +179 -0
- package/scripts/e7-doctor-worker-proof.mjs +221 -0
- package/scripts/e7-live-staging-proof.mjs +72 -0
- package/scripts/e7-playtest-table.mjs +67 -0
- package/scripts/e7-records-proof.mjs +17 -0
- package/scripts/e7-voice-staging-proof.mjs +94 -0
- package/scripts/engine-ci-budget.ts +39 -0
- package/scripts/engine-ci-membership-proof.ts +26 -0
- package/scripts/engine-ci-plan.ts +120 -0
- package/scripts/engine-ci-proof.mjs +41 -0
- package/scripts/engine-ci-sequencer.ts +18 -0
- package/scripts/engine-ci-shard.mjs +28 -0
- package/scripts/engine-ci.config.ts +17 -0
- package/scripts/engine-order-proof.mjs +41 -0
- package/scripts/environment-boundary-proof.mjs +28 -0
- package/scripts/fetch-assets.mjs +76 -0
- package/scripts/format-hook.mjs +20 -0
- package/scripts/format-lock.d.mts +6 -0
- package/scripts/format-lock.mjs +120 -0
- package/scripts/format-package.d.mts +4 -0
- package/scripts/format-package.mjs +12 -0
- package/scripts/frame-cost-report.ts +85 -0
- package/scripts/frame-floor-args.d.mts +14 -0
- package/scripts/frame-floor-args.mjs +156 -0
- package/scripts/frame-floor-buffer-pressure.d.mts +3 -0
- package/scripts/frame-floor-buffer-pressure.mjs +91 -0
- package/scripts/frame-floor-draw-report.d.mts +38 -0
- package/scripts/frame-floor-draw-report.mjs +112 -0
- package/scripts/frame-floor-gl-time.d.mts +4 -0
- package/scripts/frame-floor-gl-time.mjs +104 -0
- package/scripts/frame-floor-gpu-bisect.mjs +120 -0
- package/scripts/frame-floor-grid.d.mts +67 -0
- package/scripts/frame-floor-grid.mjs +552 -0
- package/scripts/frame-floor-inventory.d.mts +2 -0
- package/scripts/frame-floor-inventory.mjs +10 -0
- package/scripts/frame-floor-jsc-gc.d.mts +15 -0
- package/scripts/frame-floor-jsc-gc.mjs +122 -0
- package/scripts/frame-floor-native-pressure.d.mts +4 -0
- package/scripts/frame-floor-native-pressure.mjs +78 -0
- package/scripts/frame-floor-native.mjs +108 -0
- package/scripts/frame-floor-navigation.d.mts +12 -0
- package/scripts/frame-floor-navigation.mjs +41 -0
- package/scripts/frame-floor-pause-ablation.d.mts +15 -0
- package/scripts/frame-floor-pause-ablation.mjs +90 -0
- package/scripts/frame-floor-pending.d.mts +16 -0
- package/scripts/frame-floor-pending.mjs +29 -0
- package/scripts/frame-floor-programs.mjs +39 -0
- package/scripts/frame-floor-report-phase.d.mts +10 -0
- package/scripts/frame-floor-report-phase.mjs +41 -0
- package/scripts/frame-floor-script-profile.d.mts +20 -0
- package/scripts/frame-floor-script-profile.mjs +159 -0
- package/scripts/frame-floor-settings.d.mts +6 -0
- package/scripts/frame-floor-settings.mjs +118 -0
- package/scripts/frame-floor-standing.d.mts +4 -0
- package/scripts/frame-floor-standing.mjs +20 -0
- package/scripts/frame-floor-task-clock.d.mts +4 -0
- package/scripts/frame-floor-task-clock.mjs +284 -0
- package/scripts/frame-floor-timeline-session.ts +76 -0
- package/scripts/frame-floor-wasm-constructors.d.mts +6 -0
- package/scripts/frame-floor-wasm-constructors.mjs +37 -0
- package/scripts/frame-floor-wasm-probe.d.mts +2 -0
- package/scripts/frame-floor-wasm-probe.mjs +51 -0
- package/scripts/frame-floor-webkit-timeline.d.mts +26 -0
- package/scripts/frame-floor-webkit-timeline.mjs +285 -0
- package/scripts/frame-floor.mjs +1290 -0
- package/scripts/full-test-log-proof.py +191 -0
- package/scripts/full-test-report.py +154 -0
- package/scripts/function-source.d.mts +3 -0
- package/scripts/function-source.mjs +48 -0
- package/scripts/g571-hosts.d.mts +3 -0
- package/scripts/g571-hosts.mjs +54 -0
- package/scripts/game-plugins.d.mts +22 -0
- package/scripts/gate-related-tests.d.mts +7 -0
- package/scripts/gate-related-tests.mjs +178 -0
- package/scripts/gen-api.d.mts +10 -0
- package/scripts/gen-api.mjs +134 -0
- package/scripts/gen-boot-cache.d.mts +2 -0
- package/scripts/gen-boot-cache.mjs +146 -0
- package/scripts/gen-budget-derivations.d.mts +1 -0
- package/scripts/gen-budget-derivations.mjs +43 -0
- package/scripts/gen-programs.d.mts +8 -0
- package/scripts/gen-programs.mjs +82 -0
- package/scripts/gen-shard-words.d.mts +4 -0
- package/scripts/gen-shard-words.mjs +188 -0
- package/scripts/gen-source.d.mts +4 -0
- package/scripts/gen-source.mjs +73 -0
- package/scripts/gen-starter-arm-clips.d.mts +4 -0
- package/scripts/gen-starter-arm-clips.mjs +17 -0
- package/scripts/gen-starter-bag.d.mts +4 -0
- package/scripts/gen-starter-bag.mjs +16 -0
- package/scripts/gen-starter-effects.d.mts +4 -0
- package/scripts/gen-starter-effects.mjs +16 -0
- package/scripts/gen-starter-weapons.d.mts +4 -0
- package/scripts/gen-starter-weapons.mjs +16 -0
- package/scripts/gen.mjs +6 -0
- package/scripts/generate-title-launch.mjs +55 -0
- package/scripts/generated-files.d.mts +6 -0
- package/scripts/generated-files.mjs +86 -0
- package/scripts/generated-input-reading.d.mts +3 -0
- package/scripts/generated-input-reading.mjs +89 -0
- package/scripts/generated-policy.d.mts +13 -0
- package/scripts/generated-policy.mjs +113 -0
- package/scripts/generated-source.d.mts +11 -0
- package/scripts/generated-source.mjs +214 -0
- package/scripts/generation-cache-prune.d.mts +10 -0
- package/scripts/generation-cache-prune.mjs +128 -0
- package/scripts/gfx-toggle/compare.mjs +133 -0
- package/scripts/git-common.d.mts +1 -0
- package/scripts/git-common.mjs +13 -0
- package/scripts/git-rule-counts.mjs +16 -0
- package/scripts/git-source-view.mjs +225 -0
- package/scripts/goldens/board.py +176 -0
- package/scripts/goldens/capture-inputs.d.mts +4 -0
- package/scripts/goldens/capture-inputs.mjs +35 -0
- package/scripts/goldens/capture.mjs +214 -0
- package/scripts/goldens/colour_shift.py +27 -0
- package/scripts/goldens/native-residency.d.mts +10 -0
- package/scripts/goldens/native-residency.mjs +104 -0
- package/scripts/goldens/plot-inputs.d.mts +12 -0
- package/scripts/goldens/plot-inputs.mjs +46 -0
- package/scripts/gpu-gate/matrix.d.mts +3 -0
- package/scripts/gpu-gate/matrix.mjs +48 -0
- package/scripts/gpu-gate/probe.mjs +30 -0
- package/scripts/gpu-gate/status.d.mts +4 -0
- package/scripts/gpu-gate/status.mjs +112 -0
- package/scripts/gpu-perf/com.wildshard.gpu-perf.plist +11 -0
- package/scripts/gpu-perf/install.sh +31 -0
- package/scripts/gpu-perf/nightly.mjs +216 -0
- package/scripts/gpu-perf/nightly.sh +7 -0
- package/scripts/gpu-perf/report.d.mts +18 -0
- package/scripts/gpu-perf/report.mjs +109 -0
- package/scripts/gpu-perf/timing.sh +17 -0
- package/scripts/gpu-trace-frames.mjs +113 -0
- package/scripts/grid-crossing-walk-proof.mjs +172 -0
- package/scripts/grid-gate-proof.mjs +126 -0
- package/scripts/grid-ready-latches.d.mts +7 -0
- package/scripts/grid-ready-latches.mjs +44 -0
- package/scripts/grid-ready-memory.d.mts +3 -0
- package/scripts/grid-ready-memory.mjs +86 -0
- package/scripts/grid-runtime-evidence.d.mts +4 -0
- package/scripts/grid-runtime-evidence.mjs +107 -0
- package/scripts/grid-spawn-proof.mjs +317 -0
- package/scripts/guard-counts.d.mts +8 -0
- package/scripts/guard-counts.mjs +136 -0
- package/scripts/guard-index-tree.d.mts +2 -0
- package/scripts/guard-index-tree.mjs +19 -0
- package/scripts/heavy-lane-lease.d.mts +2 -0
- package/scripts/heavy-lane-lease.mjs +33 -0
- package/scripts/heavy-lane.py +652 -0
- package/scripts/herdr-prompt.sh +13 -0
- package/scripts/herdr-question-open.sh +22 -0
- package/scripts/hero-shots.mjs +168 -0
- package/scripts/home-icons.mjs +27 -0
- package/scripts/host-activity.ts +41 -0
- package/scripts/hud-worst/chat.ts +33 -0
- package/scripts/hud-worst.mjs +344 -0
- package/scripts/inbox-pull.mjs +129 -0
- package/scripts/inline-shell-css.mjs +30 -0
- package/scripts/input-hash-memo.d.mts +16 -0
- package/scripts/input-hash-memo.mjs +109 -0
- package/scripts/input-snapshot.d.mts +2 -0
- package/scripts/input-snapshot.mjs +45 -0
- package/scripts/ios-memory-watchdog.py +339 -0
- package/scripts/iphone-mem-reading.sh +40 -0
- package/scripts/js-entry-census.mjs +54 -0
- package/scripts/js-payload-heap.mjs +23 -0
- package/scripts/json-declarations.d.mts +3 -0
- package/scripts/json-declarations.mjs +101 -0
- package/scripts/json-output-guard.d.mts +6 -0
- package/scripts/json-output-guard.mjs +50 -0
- package/scripts/ktx2-engine-map.json +156 -0
- package/scripts/ktx2-tables.d.mts +5 -0
- package/scripts/ktx2-tables.mjs +103 -0
- package/scripts/land.d.mts +17 -0
- package/scripts/land.mjs +888 -0
- package/scripts/lane-watchdog.d.mts +11 -0
- package/scripts/lane-watchdog.mjs +256 -0
- package/scripts/latch-grid-evidence.d.mts +1 -0
- package/scripts/latch-grid-evidence.mjs +68 -0
- package/scripts/lift-pending-batches-proof.mjs +135 -0
- package/scripts/lift-pending-batches.mjs +124 -0
- package/scripts/lift-pending-history-proof.mjs +41 -0
- package/scripts/lift-pending-proof.mjs +27 -0
- package/scripts/lift-pending-schedule.mjs +23 -0
- package/scripts/lift-pending.d.mts +1 -0
- package/scripts/lift-pending.mjs +78 -0
- package/scripts/link-node-modules.d.mts +1 -0
- package/scripts/link-node-modules.mjs +291 -0
- package/scripts/lint-all.mjs +50 -0
- package/scripts/lint-cli.mjs +10 -0
- package/scripts/lint-fast.mjs +30 -0
- package/scripts/lint-game-selection-proof.mjs +27 -0
- package/scripts/lint-game.mjs +26 -0
- package/scripts/lint-tools.d.mts +4 -0
- package/scripts/lint-tools.mjs +28 -0
- package/scripts/listed-view-code.d.mts +7 -0
- package/scripts/listed-view-code.mjs +93 -0
- package/scripts/live-prepush.py +352 -0
- package/scripts/load-mem-probe.mjs +248 -0
- package/scripts/loading-bar-rule.mjs +107 -0
- package/scripts/loading-benchmark/accuracy-data.d.mts +12 -0
- package/scripts/loading-benchmark/accuracy-data.mjs +92 -0
- package/scripts/loading-benchmark/cache-bodies.d.mts +14 -0
- package/scripts/loading-benchmark/cache-bodies.mjs +103 -0
- package/scripts/loading-benchmark/catalogue.d.mts +8 -0
- package/scripts/loading-benchmark/catalogue.mjs +41 -0
- package/scripts/loading-benchmark/sim-shard.d.mts +60 -0
- package/scripts/loading-benchmark/sim-shard.mjs +289 -0
- package/scripts/loading-benchmark/transport.d.mts +9 -0
- package/scripts/loading-benchmark/transport.mjs +109 -0
- package/scripts/loading-card-proof.mjs +298 -0
- package/scripts/loading-fence-proof.mjs +67 -0
- package/scripts/loading-flow/analyse.mjs +280 -0
- package/scripts/loading-flow/benchmax.mjs +179 -0
- package/scripts/loading-flow/board.py +104 -0
- package/scripts/loading-flow/drive.mjs +283 -0
- package/scripts/loading-flow/layer-parity-proof.mjs +69 -0
- package/scripts/loading-flow/link-probe.mjs +99 -0
- package/scripts/loading-flow/profile.mjs +54 -0
- package/scripts/loading-flow/run.sh +51 -0
- package/scripts/loading-flow/source-maps-proof.mjs +86 -0
- package/scripts/loading-flow/source-maps.mjs +73 -0
- package/scripts/loading-flow/stalls.d.mts +39 -0
- package/scripts/loading-flow/stalls.mjs +141 -0
- package/scripts/loading-flow/sweep-input-proof.mjs +127 -0
- package/scripts/loading-flow/sweep-input.mjs +70 -0
- package/scripts/loading-flow/sweep-report.mjs +112 -0
- package/scripts/loading-flow/sweep.sh +101 -0
- package/scripts/loading-flow/target-proof.mjs +56 -0
- package/scripts/loading-flow/target.mjs +39 -0
- package/scripts/loading-time-left-proof.mjs +121 -0
- package/scripts/loading-time-left-rule.mjs +49 -0
- package/scripts/look-loop/cameras.d.mts +18 -0
- package/scripts/look-loop/cameras.mjs +109 -0
- package/scripts/look-loop/fit-lut.py +142 -0
- package/scripts/look-loop/palette-delta.py +183 -0
- package/scripts/look-loop/regions/driftwood-isle.json +25 -0
- package/scripts/look-loop/regions/far-reach.json +225 -0
- package/scripts/look-loop/regions/open-plot-night-market.json +855 -0
- package/scripts/look-loop/regions/pine-hollow.json +22 -0
- package/scripts/look-loop/regions/sunscar-dunes.json +281 -0
- package/scripts/look-loop/targets.py +229 -0
- package/scripts/look-loop/test_look_loop.py +133 -0
- package/scripts/look-loop/views.mjs +176 -0
- package/scripts/main-menu-aerial-plan.mjs +8 -0
- package/scripts/main-menu-aerial-poses.ts +292 -0
- package/scripts/main-pull.mjs +84 -0
- package/scripts/main-watch.d.mts +19 -0
- package/scripts/main-watch.mjs +248 -0
- package/scripts/manifest-art-inputs.json +4 -0
- package/scripts/manifest-budget.mjs +44 -0
- package/scripts/manifest-declaration.d.mts +3 -0
- package/scripts/manifest-declaration.mjs +40 -0
- package/scripts/manifest-spawns.mjs +38 -0
- package/scripts/manifest-static-imports.d.mts +2 -0
- package/scripts/manifest-static-imports.mjs +83 -0
- package/scripts/map-hash.d.mts +20 -0
- package/scripts/map-hash.mjs +155 -0
- package/scripts/map-painter.d.mts +13 -0
- package/scripts/map-painter.mjs +97 -0
- package/scripts/map-stylize.py +241 -0
- package/scripts/memory/cpuOwners.d.mts +4 -0
- package/scripts/memory/cpuOwners.mjs +51 -0
- package/scripts/memory/heapReader.d.mts +3 -0
- package/scripts/memory/heapReader.mjs +59 -0
- package/scripts/memory/js-heap-ratchet.json +17 -0
- package/scripts/memory/jsHeap.d.mts +6 -0
- package/scripts/memory/jsHeap.mjs +52 -0
- package/scripts/memory-report-blocks.d.mts +28 -0
- package/scripts/memory-report-blocks.mjs +60 -0
- package/scripts/memory-report-data.d.mts +25 -0
- package/scripts/memory-report-data.mjs +222 -0
- package/scripts/memory-report-graphic.d.mts +5 -0
- package/scripts/memory-report-graphic.mjs +90 -0
- package/scripts/memory-report-snapshot.d.mts +4 -0
- package/scripts/memory-report-snapshot.mjs +13 -0
- package/scripts/memory-report.d.mts +5 -0
- package/scripts/memory-report.mjs +94 -0
- package/scripts/mmo-bots.mjs +241 -0
- package/scripts/mobile-graphics-proof.mjs +120 -0
- package/scripts/model-spin-recording.d.mts +4 -0
- package/scripts/model-spin-recording.mjs +25 -0
- package/scripts/model-spin.mjs +327 -0
- package/scripts/module-cache-proof.mjs +43 -0
- package/scripts/name-prompt-proof.mjs +136 -0
- package/scripts/native-recorder-cache.d.mts +33 -0
- package/scripts/native-recorder-cache.mjs +287 -0
- package/scripts/native-retention-proof.mjs +79 -0
- package/scripts/night-market-kit-budget.d.mts +12 -0
- package/scripts/night-market-kit-budget.mjs +80 -0
- package/scripts/nightly-heads.ts +176 -0
- package/scripts/nightly-model.ts +127 -0
- package/scripts/nightly-tag.d.mts +1 -0
- package/scripts/nightly-tag.mjs +32 -0
- package/scripts/nightly.proof.ts +105 -0
- package/scripts/nightly.ts +43 -0
- package/scripts/nine-sim-memory.mjs +353 -0
- package/scripts/no-binary-json.d.mts +12 -0
- package/scripts/no-binary-json.mjs +270 -0
- package/scripts/non-engine-admission-proof.mjs +27 -0
- package/scripts/number-path-probe.d.mts +7 -0
- package/scripts/number-path-probe.mjs +57 -0
- package/scripts/offline-proof-rules.d.mts +23 -0
- package/scripts/offline-proof-rules.mjs +123 -0
- package/scripts/offline-proof.mjs +498 -0
- package/scripts/online-phone-proof.mjs +330 -0
- package/scripts/online-proof.mjs +150 -0
- package/scripts/online-ride-proof.mjs +74 -0
- package/scripts/online-rig.mjs +114 -0
- package/scripts/page-parity.mjs +99 -0
- package/scripts/page-release/content.d.mts +30 -0
- package/scripts/page-release/content.mjs +299 -0
- package/scripts/page-release/flow.d.mts +60 -0
- package/scripts/page-release/flow.mjs +365 -0
- package/scripts/page-release/hosts/workers.d.mts +8 -0
- package/scripts/page-release/hosts/workers.mjs +160 -0
- package/scripts/page-release/packs.mjs +108 -0
- package/scripts/page-release/redact.d.mts +1 -0
- package/scripts/page-release/redact.mjs +19 -0
- package/scripts/page-release.mjs +101 -0
- package/scripts/page-size.d.mts +13 -0
- package/scripts/page-size.mjs +198 -0
- package/scripts/parallel-fast-lint.d.mts +1 -0
- package/scripts/parallel-fast-lint.mjs +54 -0
- package/scripts/parity/audio-diagnostics.d.mts +5 -0
- package/scripts/parity/audio-diagnostics.mjs +63 -0
- package/scripts/parity/audio-settle.mjs +111 -0
- package/scripts/parity/black-frame.d.mts +11 -0
- package/scripts/parity/black-frame.mjs +58 -0
- package/scripts/parity/boot-smoke.d.mts +47 -0
- package/scripts/parity/boot-smoke.mjs +585 -0
- package/scripts/parity/boot-timing-delay.mjs +54 -0
- package/scripts/parity/browser-escape.d.mts +2 -0
- package/scripts/parity/browser-escape.mjs +50 -0
- package/scripts/parity/budgetCeilings.d.mts +3 -0
- package/scripts/parity/budgetCeilings.mjs +30 -0
- package/scripts/parity/budgets.d.mts +7 -0
- package/scripts/parity/budgets.mjs +73 -0
- package/scripts/parity/cache.d.mts +1 -0
- package/scripts/parity/cache.mjs +40 -0
- package/scripts/parity/canvas-bytes.d.mts +13 -0
- package/scripts/parity/canvas-bytes.mjs +96 -0
- package/scripts/parity/capture-rpc.d.mts +2 -0
- package/scripts/parity/capture-rpc.mjs +41 -0
- package/scripts/parity/capture-trace.d.mts +6 -0
- package/scripts/parity/capture-trace.mjs +63 -0
- package/scripts/parity/clock.d.mts +1 -0
- package/scripts/parity/clock.mjs +89 -0
- package/scripts/parity/combat.d.mts +14 -0
- package/scripts/parity/combat.mjs +81 -0
- package/scripts/parity/compare.d.mts +10 -0
- package/scripts/parity/compare.mjs +177 -0
- package/scripts/parity/explorer-smoke.d.mts +21 -0
- package/scripts/parity/explorer-smoke.mjs +310 -0
- package/scripts/parity/fast-png.d.mts +18 -0
- package/scripts/parity/fast-png.mjs +68 -0
- package/scripts/parity/fingerprint.mjs +8 -0
- package/scripts/parity/fixed-render.d.mts +11 -0
- package/scripts/parity/fixed-render.mjs +79 -0
- package/scripts/parity/frame-budget.d.mts +3 -0
- package/scripts/parity/frame-budget.mjs +39 -0
- package/scripts/parity/frame-bytes.d.mts +8 -0
- package/scripts/parity/frame-bytes.mjs +45 -0
- package/scripts/parity/frames.mjs +8 -0
- package/scripts/parity/glbytes.d.mts +8 -0
- package/scripts/parity/glbytes.mjs +148 -0
- package/scripts/parity/grid-boot-waits.d.mts +13 -0
- package/scripts/parity/grid-boot-waits.mjs +43 -0
- package/scripts/parity/heat-bytes.d.mts +5 -0
- package/scripts/parity/heat-bytes.mjs +32 -0
- package/scripts/parity/hover-touch.mjs +153 -0
- package/scripts/parity/hud.d.mts +4 -0
- package/scripts/parity/hud.mjs +17 -0
- package/scripts/parity/image-routes.d.mts +5 -0
- package/scripts/parity/image-routes.mjs +29 -0
- package/scripts/parity/init.d.mts +15 -0
- package/scripts/parity/init.mjs +63 -0
- package/scripts/parity/lane-browser.mjs +14 -0
- package/scripts/parity/offline.d.mts +5 -0
- package/scripts/parity/offline.mjs +24 -0
- package/scripts/parity/phone-route-browser.d.mts +20 -0
- package/scripts/parity/phone-route-browser.mjs +241 -0
- package/scripts/parity/phone-route-page.d.mts +10 -0
- package/scripts/parity/phone-route-page.mjs +245 -0
- package/scripts/parity/phone-route-runner.d.mts +2 -0
- package/scripts/parity/phone-route-runner.mjs +39 -0
- package/scripts/parity/phone-route.d.mts +43 -0
- package/scripts/parity/phone-route.mjs +212 -0
- package/scripts/parity/pool.d.mts +4 -0
- package/scripts/parity/pool.mjs +74 -0
- package/scripts/parity/poses.d.mts +6 -0
- package/scripts/parity/poses.mjs +57 -0
- package/scripts/parity/probe.d.mts +2 -0
- package/scripts/parity/probe.mjs +13 -0
- package/scripts/parity/profile.d.mts +2 -0
- package/scripts/parity/profile.mjs +52 -0
- package/scripts/parity/record.d.mts +8 -0
- package/scripts/parity/record.mjs +102 -0
- package/scripts/parity/resources.mjs +58 -0
- package/scripts/parity/saves.d.mts +1 -0
- package/scripts/parity/saves.mjs +14 -0
- package/scripts/parity/serve.d.mts +9 -0
- package/scripts/parity/serve.mjs +125 -0
- package/scripts/parity/shader-code.d.mts +2 -0
- package/scripts/parity/shader-code.mjs +10 -0
- package/scripts/parity/ssim.d.mts +4 -0
- package/scripts/parity/ssim.mjs +44 -0
- package/scripts/parity/telemetry.d.mts +1 -0
- package/scripts/parity/telemetry.mjs +19 -0
- package/scripts/parity/timeout.mjs +7 -0
- package/scripts/parity/title-trace.d.mts +13 -0
- package/scripts/parity/title-trace.mjs +59 -0
- package/scripts/parity/value.d.mts +11 -0
- package/scripts/parity/value.mjs +50 -0
- package/scripts/parity/walk.d.mts +10 -0
- package/scripts/parity/walk.mjs +109 -0
- package/scripts/parity.mjs +310 -0
- package/scripts/perf/README.md +47 -0
- package/scripts/perf/cameras24.json +2963 -0
- package/scripts/perf/draw-census-page.d.mts +10 -0
- package/scripts/perf/draw-census-page.mjs +162 -0
- package/scripts/perf/draw-census-poses.d.mts +14 -0
- package/scripts/perf/draw-census-poses.mjs +44 -0
- package/scripts/perf/draw-census-report.d.mts +24 -0
- package/scripts/perf/draw-census-report.mjs +86 -0
- package/scripts/perf/draw-census.mjs +156 -0
- package/scripts/perf/exact-world-capture.mjs +167 -0
- package/scripts/perf/gpu-census-coverage.d.mts +6 -0
- package/scripts/perf/gpu-census-coverage.mjs +47 -0
- package/scripts/perf/gpu-census-overdraw.mjs +105 -0
- package/scripts/perf/gpu-census-page.d.mts +11 -0
- package/scripts/perf/gpu-census-page.mjs +53 -0
- package/scripts/perf/gpu-census-report.d.mts +3 -0
- package/scripts/perf/gpu-census-report.mjs +15 -0
- package/scripts/perf/gpu-census.d.mts +6 -0
- package/scripts/perf/gpu-census.mjs +95 -0
- package/scripts/perf/material-program-loan.d.mts +18 -0
- package/scripts/perf/material-program-loan.mjs +88 -0
- package/scripts/perf/world-pixel-difference.d.mts +5 -0
- package/scripts/perf/world-pixel-difference.mjs +22 -0
- package/scripts/phone-loading/chromium.ts +113 -0
- package/scripts/phone-loading/cpu-profile.ts +47 -0
- package/scripts/phone-loading/fixtures.ts +18 -0
- package/scripts/phone-loading/instrument.ts +219 -0
- package/scripts/phone-loading/link.ts +115 -0
- package/scripts/phone-loading/main.ts +261 -0
- package/scripts/phone-loading/model.ts +123 -0
- package/scripts/phone-loading/native-body.ts +40 -0
- package/scripts/phone-loading/native-sizes.ts +194 -0
- package/scripts/phone-loading/network.ts +167 -0
- package/scripts/phone-loading/play.ts +132 -0
- package/scripts/phone-loading/post-control.ts +22 -0
- package/scripts/phone-loading/recording.ts +28 -0
- package/scripts/phone-loading/shaped-preview.ts +37 -0
- package/scripts/phone-loading/tsconfig.json +11 -0
- package/scripts/physics-baseline.mjs +433 -0
- package/scripts/physics-grid-entry.d.mts +15 -0
- package/scripts/physics-grid-entry.mjs +62 -0
- package/scripts/physics-grid.d.mts +10 -0
- package/scripts/physics-grid.mjs +102 -0
- package/scripts/physics-native.d.mts +6 -0
- package/scripts/physics-native.mjs +81 -0
- package/scripts/physics-route.json +4400 -0
- package/scripts/physics-walk.d.mts +16 -0
- package/scripts/physics-walk.mjs +79 -0
- package/scripts/pid-lock.d.mts +1 -0
- package/scripts/pid-lock.mjs +63 -0
- package/scripts/pin-assets.ts +94 -0
- package/scripts/pin-format.ts +43 -0
- package/scripts/pin-packs.ts +17 -0
- package/scripts/pins-exclude.d.mts +3 -0
- package/scripts/pins-exclude.mjs +54 -0
- package/scripts/pins-reuse.d.mts +27 -0
- package/scripts/pins-reuse.mjs +321 -0
- package/scripts/pins.ts +468 -0
- package/scripts/platform-chargebacks.d.mts +9 -0
- package/scripts/platform-chargebacks.mjs +135 -0
- package/scripts/playground-grapple.mjs +154 -0
- package/scripts/playground-harness.mjs +137 -0
- package/scripts/playground-horse.mjs +106 -0
- package/scripts/prebuilt-output.py +322 -0
- package/scripts/precommit-checks.d.mts +3 -0
- package/scripts/precommit-checks.mjs +115 -0
- package/scripts/precommit-inputs.d.mts +5 -0
- package/scripts/precommit-inputs.mjs +73 -0
- package/scripts/precommit-jobs.d.mts +5 -0
- package/scripts/precommit-jobs.mjs +85 -0
- package/scripts/precommit-source.py +493 -0
- package/scripts/preparation-cache-key.d.mts +2 -0
- package/scripts/preparation-cache-key.mjs +70 -0
- package/scripts/prepush-proof.mjs +36 -0
- package/scripts/preview-encoded-cache.d.mts +7 -0
- package/scripts/preview-encoded-cache.mjs +64 -0
- package/scripts/preview-lag.mjs +80 -0
- package/scripts/preview-server.mjs +256 -0
- package/scripts/preview-telemetry.d.mts +4 -0
- package/scripts/preview-telemetry.mjs +56 -0
- package/scripts/product-build-times.d.mts +3 -0
- package/scripts/product-build-times.mjs +42 -0
- package/scripts/program-discovery.d.mts +5 -0
- package/scripts/program-discovery.mjs +42 -0
- package/scripts/progress-recording.d.mts +6 -0
- package/scripts/progress-recording.mjs +26 -0
- package/scripts/progress-video.sh +27 -0
- package/scripts/proof-run.sh +69 -0
- package/scripts/prune-local-caches.mjs +10 -0
- package/scripts/public-grid.d.mts +11 -0
- package/scripts/public-grid.mjs +56 -0
- package/scripts/push-budget.d.mts +3 -0
- package/scripts/push-budget.mjs +5 -0
- package/scripts/push-cache-git-proof.mjs +32 -0
- package/scripts/push-cache-lease-proof.mjs +22 -0
- package/scripts/push-cache-proof.mjs +29 -0
- package/scripts/push-checks.d.mts +2 -0
- package/scripts/push-checks.mjs +116 -0
- package/scripts/push-cohort-proof.mjs +15 -0
- package/scripts/push-dependencies.mjs +97 -0
- package/scripts/push-dependency-proof.mjs +53 -0
- package/scripts/push-duration-sequencer.ts +26 -0
- package/scripts/push-environment.mjs +21 -0
- package/scripts/push-exclusion-proof.mjs +81 -0
- package/scripts/push-gate-copy.mjs +168 -0
- package/scripts/push-inputs.d.mts +4 -0
- package/scripts/push-inputs.mjs +99 -0
- package/scripts/push-lint-config.d.mts +4 -0
- package/scripts/push-lint-config.mjs +26 -0
- package/scripts/push-local-split.d.mts +15 -0
- package/scripts/push-local-split.mjs +116 -0
- package/scripts/push-loop.py +317 -0
- package/scripts/push-proof-cache.mjs +131 -0
- package/scripts/push-ref-tree-proof.mjs +63 -0
- package/scripts/push-related.mjs +29 -0
- package/scripts/push-selection-dev-proof.mjs +57 -0
- package/scripts/push-selection-proof.mjs +45 -0
- package/scripts/push-selection.d.mts +2 -0
- package/scripts/push-selection.mjs +65 -0
- package/scripts/push-vitest.config.ts +20 -0
- package/scripts/push_input_cache.py +306 -0
- package/scripts/quarantine-placement-proof.mjs +28 -0
- package/scripts/quarantine-renewal-proof.mjs +34 -0
- package/scripts/quarantine-window-proof.mjs +26 -0
- package/scripts/quest-complete-proof.mjs +78 -0
- package/scripts/quiet-cli.mjs +13 -0
- package/scripts/quiet_logs.py +79 -0
- package/scripts/ratchet-approval.d.mts +3 -0
- package/scripts/ratchet-approval.mjs +70 -0
- package/scripts/record-fence-reads.mjs +115 -0
- package/scripts/release-check.mjs +22 -0
- package/scripts/release-proof-proof.mjs +71 -0
- package/scripts/reload-title-proof.mjs +100 -0
- package/scripts/remote-air-proof.mjs +137 -0
- package/scripts/remote-bar-proof.mjs +75 -0
- package/scripts/remote-board-proof.mjs +129 -0
- package/scripts/remote-body-proof.mjs +101 -0
- package/scripts/remote-death-proof.mjs +134 -0
- package/scripts/remote-gait-proof.mjs +139 -0
- package/scripts/remote-held-proof.mjs +155 -0
- package/scripts/remote-hurt-proof.mjs +121 -0
- package/scripts/remote-map-proof.mjs +103 -0
- package/scripts/remote-name-proof.mjs +123 -0
- package/scripts/remote-players-proof.mjs +214 -0
- package/scripts/remote-room.mjs +75 -0
- package/scripts/remote-strike-proof.mjs +148 -0
- package/scripts/renderer-revision-replay.mjs +49 -0
- package/scripts/renderer-revision.d.mts +12 -0
- package/scripts/renderer-revision.mjs +101 -0
- package/scripts/renderer-revision.proof.mjs +71 -0
- package/scripts/repo-size.d.mts +43 -0
- package/scripts/repo-size.mjs +540 -0
- package/scripts/ring-cook.mjs +51 -0
- package/scripts/ring-step.ts +112 -0
- package/scripts/ring1.sh +79 -0
- package/scripts/room-deploy.mjs +130 -0
- package/scripts/room-soak.mjs +40 -0
- package/scripts/runtime_input_copies.py +49 -0
- package/scripts/scorecard.mjs +1156 -0
- package/scripts/script-scenario-metrics.d.mts +10 -0
- package/scripts/script-scenario-metrics.mjs +75 -0
- package/scripts/section-types.d.mts +3 -0
- package/scripts/section-types.mjs +35 -0
- package/scripts/sentry-maps.d.mts +9 -0
- package/scripts/sentry-maps.mjs +94 -0
- package/scripts/serialize-asset-tables.mjs +13 -0
- package/scripts/serve-build.sh +392 -0
- package/scripts/serve-port-lease.py +100 -0
- package/scripts/serve-shared-preview.py +295 -0
- package/scripts/server-origin.mjs +10 -0
- package/scripts/server-release/github.mjs +142 -0
- package/scripts/server-release/publish.d.mts +19 -0
- package/scripts/server-release/publish.mjs +143 -0
- package/scripts/server-release/sign.d.mts +10 -0
- package/scripts/server-release/sign.mjs +75 -0
- package/scripts/shard-component-spans.d.mts +15 -0
- package/scripts/shard-component-spans.mjs +18 -0
- package/scripts/shard-components.d.mts +16 -0
- package/scripts/shard-components.mjs +365 -0
- package/scripts/shard-coupling.d.mts +11 -0
- package/scripts/shard-coupling.mjs +238 -0
- package/scripts/shard-folders.mjs +14 -0
- package/scripts/shard-net-lines.d.mts +13 -0
- package/scripts/shard-net-lines.mjs +62 -0
- package/scripts/shard-output-content.d.mts +4 -0
- package/scripts/shard-output-content.mjs +27 -0
- package/scripts/shard-outputs.d.mts +12 -0
- package/scripts/shard-outputs.mjs +64 -0
- package/scripts/shard-phone-memory.d.mts +37 -0
- package/scripts/shard-phone-memory.mjs +556 -0
- package/scripts/shard-platform-format.d.mts +10 -0
- package/scripts/shard-platform-format.mjs +7 -0
- package/scripts/shard-platform-hosts.d.mts +2 -0
- package/scripts/shard-platform-hosts.mjs +93 -0
- package/scripts/shard-platform-output.d.mts +12 -0
- package/scripts/shard-platform-output.mjs +74 -0
- package/scripts/shard-platform-sections.d.mts +2 -0
- package/scripts/shard-platform-sections.mjs +9 -0
- package/scripts/shard-platform.d.mts +76 -0
- package/scripts/shard-platform.mjs +1072 -0
- package/scripts/shard-public.d.mts +3 -0
- package/scripts/shard-public.mjs +36 -0
- package/scripts/shard-runtime-closure.d.mts +3 -0
- package/scripts/shard-runtime-closure.mjs +30 -0
- package/scripts/shard-size-gate.d.mts +13 -0
- package/scripts/shard-size-gate.mjs +135 -0
- package/scripts/shard-size-watch.d.mts +7 -0
- package/scripts/shard-size-watch.mjs +70 -0
- package/scripts/shard-wire-meter.mjs +107 -0
- package/scripts/shardfile-cache.d.mts +17 -0
- package/scripts/shardfile-cache.mjs +268 -0
- package/scripts/shardfile-inputs.d.mts +19 -0
- package/scripts/shardfile-inputs.mjs +452 -0
- package/scripts/shardfile-validation-revision.d.mts +1 -0
- package/scripts/shardfile-validation-revision.mjs +30 -0
- package/scripts/shards.d.mts +7 -0
- package/scripts/shards.mjs +16 -0
- package/scripts/side-parity.d.mts +8 -0
- package/scripts/side-parity.mjs +220 -0
- package/scripts/sim-boost-lap.mjs +198 -0
- package/scripts/sim-grid-entry.mjs +534 -0
- package/scripts/sim-in-runtime.d.mts +6 -0
- package/scripts/sim-in-runtime.mjs +146 -0
- package/scripts/sim-lane.sh +351 -0
- package/scripts/sim-mem-phases.py +195 -0
- package/scripts/sim-memory.mjs +414 -0
- package/scripts/sim-node-loader.mjs +37 -0
- package/scripts/sim-presentation-proof.py +37 -0
- package/scripts/sim-quiet.py +160 -0
- package/scripts/sim-safari-ready.py +896 -0
- package/scripts/sim-transport.c +93 -0
- package/scripts/slice-inputs.ts +31 -0
- package/scripts/smoke-timings.py +34 -0
- package/scripts/snapshot-admission-proof.mjs +55 -0
- package/scripts/soak/boundary.mjs +110 -0
- package/scripts/soak/inspector.d.mts +18 -0
- package/scripts/soak/inspector.mjs +74 -0
- package/scripts/soak/memory-categories.d.mts +12 -0
- package/scripts/soak/memory-categories.mjs +28 -0
- package/scripts/socket-smoke.mjs +20 -0
- package/scripts/sort-sides.d.mts +33 -0
- package/scripts/sort-sides.mjs +919 -0
- package/scripts/source-generation-outputs.json +11 -0
- package/scripts/source-generators.d.mts +11 -0
- package/scripts/source-generators.mjs +59 -0
- package/scripts/source-input-proof.d.mts +12 -0
- package/scripts/source-input-proof.mjs +106 -0
- package/scripts/source-table-cache.d.mts +2 -0
- package/scripts/source-table-cache.mjs +102 -0
- package/scripts/sp-tools.py +150 -0
- package/scripts/sp-tools.sh +6 -0
- package/scripts/split-repair-data-shard.mjs +98 -0
- package/scripts/split-repair-guardian.mjs +26 -0
- package/scripts/split-repair-hare.mjs +54 -0
- package/scripts/split-repair-held-melee.mjs +41 -0
- package/scripts/split-repair-horse-panic.mjs +45 -0
- package/scripts/split-repair-movers.mjs +92 -0
- package/scripts/split-repair-nalati-signals.mjs +94 -0
- package/scripts/split-repair-perks.mjs +73 -0
- package/scripts/split-repair-pine-writes.mjs +76 -0
- package/scripts/split-repair-proof.mjs +24 -0
- package/scripts/split-repair-sky-trails.mjs +110 -0
- package/scripts/split-repair-stun.mjs +37 -0
- package/scripts/split-repair-wake-loss.mjs +35 -0
- package/scripts/split-repair-whip.mjs +44 -0
- package/scripts/staging-proof-lines.d.mts +8 -0
- package/scripts/staging-proof-lines.mjs +85 -0
- package/scripts/standalone-smoke.mjs +116 -0
- package/scripts/storage-policy.json +89 -0
- package/scripts/temp-janitor.d.mts +6 -0
- package/scripts/temp-janitor.mjs +40 -0
- package/scripts/template-format-proof.mjs +44 -0
- package/scripts/test-amber.d.mts +11 -0
- package/scripts/test-amber.mjs +90 -0
- package/scripts/test-build-tools.ts +24 -0
- package/scripts/test-facade-instancing.mjs +53 -0
- package/scripts/test-ios-memory-watchdog.py +107 -0
- package/scripts/test-products.json +389 -0
- package/scripts/test-quarantine.d.mts +6 -0
- package/scripts/test-quarantine.mjs +132 -0
- package/scripts/test-shard-plan.ts +66 -0
- package/scripts/test-timings.d.mts +14 -0
- package/scripts/test-timings.mjs +174 -0
- package/scripts/test_agent_time.py +155 -0
- package/scripts/test_browser_lane.py +239 -0
- package/scripts/test_lease_order.py +142 -0
- package/scripts/test_partition.py +23 -0
- package/scripts/test_prebuilt_output.py +258 -0
- package/scripts/test_products.py +20 -0
- package/scripts/test_serve_ports.py +645 -0
- package/scripts/test_sim_lane.py +1661 -0
- package/scripts/test_sim_quiet.py +140 -0
- package/scripts/texture-inputs.d.mts +4 -0
- package/scripts/texture-inputs.mjs +16 -0
- package/scripts/tile-bake-policy.d.mts +4 -0
- package/scripts/tile-bake-policy.mjs +43 -0
- package/scripts/tile-bake-report.d.mts +17 -0
- package/scripts/tile-bake-report.mjs +161 -0
- package/scripts/tile-bakes.d.mts +13 -0
- package/scripts/tile-bakes.mjs +100 -0
- package/scripts/timelapse.sh +44 -0
- package/scripts/title-assets.d.mts +6 -0
- package/scripts/title-assets.generated.json +9 -0
- package/scripts/title-assets.mjs +46 -0
- package/scripts/title-exit-proof.mjs +132 -0
- package/scripts/tsconfig.json +576 -0
- package/scripts/typecheck-lint.sh +21 -0
- package/scripts/typecheck-root.d.mts +2 -0
- package/scripts/typecheck-root.mjs +18 -0
- package/scripts/types/wildshard-probe.d.ts +29 -0
- package/scripts/types/worker-page.d.ts +55 -0
- package/scripts/uncatalogued-shard-proof.mjs +48 -0
- package/scripts/vite-tmp.d.mts +23 -0
- package/scripts/vite-tmp.mjs +157 -0
- package/scripts/vitest-bench.py +800 -0
- package/scripts/vitest-ci-files.ts +90 -0
- package/scripts/vitest-ci.config.ts +15 -0
- package/scripts/vitest-cpu.ts +46 -0
- package/scripts/vitest-environments.ts +41 -0
- package/scripts/vitest-fixture-snapshots.config.ts +8 -0
- package/scripts/vitest-lane.ts +53 -0
- package/scripts/vitest-module-cache.ts +49 -0
- package/scripts/vitest-native-escape.config.ts +9 -0
- package/scripts/vitest-plan.ts +94 -0
- package/scripts/vitest-push-guards.config.ts +13 -0
- package/scripts/vitest-push.config.ts +19 -0
- package/scripts/vitest-shard.ts +109 -0
- package/scripts/vitest-timings.ts +32 -0
- package/scripts/vitest-tmp.ts +83 -0
- package/scripts/vitest.sh +5 -0
- package/scripts/vps/dump.sh +50 -0
- package/scripts/vps/harden-apply.sh +490 -0
- package/scripts/vps/harden-caddy.sh +215 -0
- package/scripts/vps/harden.sh +358 -0
- package/scripts/vps/health-stub.mjs +11 -0
- package/scripts/vps/pull.mjs +156 -0
- package/scripts/vps/rebuild.sh +531 -0
- package/scripts/vps/restore-check.sh +35 -0
- package/scripts/vps/setup-state.mjs +121 -0
- package/scripts/vps/setup.sh +442 -0
- package/scripts/vps/uptime.sh +26 -0
- package/scripts/vps/wildshard-agent.pub +1 -0
- package/scripts/vps/wildshard-apply.mjs +127 -0
- package/scripts/vps/wildshard-config +211 -0
- package/scripts/vps-harden-proof.sh +117 -0
- package/scripts/vps-rebuild-proof.sh +170 -0
- package/scripts/warm-native-chrome.d.mts +6 -0
- package/scripts/warm-native-chrome.mjs +75 -0
- package/scripts/webkit-mem-reading.mjs +157 -0
- package/scripts/webkit-render-smoke.mjs +145 -0
- package/scripts/worker-bootstrap-proof.mjs +79 -0
- package/scripts/worker-client-death-return.mjs +97 -0
- package/scripts/worker-client-death.mjs +67 -0
- package/scripts/worker-client-fights.mjs +1438 -0
- package/scripts/worker-client-grid-entry.mjs +239 -0
- package/scripts/worker-client-hurt.mjs +92 -0
- package/scripts/worker-client-moments.mjs +340 -0
- package/scripts/worker-client-partner.mjs +93 -0
- package/scripts/worker-client-pine-durable.mjs +102 -0
- package/scripts/worker-client-pine-grid.mjs +77 -0
- package/scripts/worker-client-pine-import.mjs +93 -0
- package/scripts/worker-client-pine.mjs +114 -0
- package/scripts/worker-client-play.mjs +572 -0
- package/scripts/worker-client-proof.mjs +201 -0
- package/scripts/worker-client-repairs.mjs +108 -0
- package/scripts/worker-client-returns.mjs +51 -0
- package/scripts/worker-client-saves.mjs +146 -0
- package/scripts/worker-client-windup.mjs +50 -0
- package/scripts/worktree-ignore.d.mts +4 -0
- package/scripts/worktree-ignore.mjs +36 -0
- package/scripts/worktree-reap.mjs +214 -0
- package/scripts/worktree.mjs +339 -0
- package/src/.oxfmtrc.json +48 -0
- package/src/.oxlintrc.json +190 -0
- package/src/cli/main.ts +112 -0
- package/src/cli/version.ts +13 -0
- package/src/client/app/assetTables.ts +68 -0
- package/src/client/app/bootDownloads.ts +43 -0
- package/src/client/app/bootRoute.ts +27 -0
- package/src/client/app/calibrate.ts +9 -0
- package/src/client/app/dropModal.ts +99 -0
- package/src/client/app/entry.ts +439 -0
- package/src/client/app/failScreens.ts +561 -0
- package/src/client/app/identity.ts +10 -0
- package/src/client/app/main.ts +3 -0
- package/src/client/app/pageServices.ts +20 -0
- package/src/client/app/selectedManifests.ts +31 -0
- package/src/client/app/shardSelection.ts +46 -0
- package/src/client/app/titleSettings.ts +15 -0
- package/src/client/app.tsx +53 -0
- package/src/client/engine/ai/view/eliteController.ts +148 -0
- package/src/client/engine/ai/view/eliteEntry.ts +464 -0
- package/src/client/engine/aliasFixture.webp +0 -0
- package/src/client/engine/anim/channel.ts +58 -0
- package/src/client/engine/anim/machine.ts +77 -0
- package/src/client/engine/anim/rig.ts +150 -0
- package/src/client/engine/anim/rigAtlas.ts +73 -0
- package/src/client/engine/anim/rigParser.ts +59 -0
- package/src/client/engine/app/app.ts +262 -0
- package/src/client/engine/app/assets.ts +122 -0
- package/src/client/engine/app/cachedAssets.ts +116 -0
- package/src/client/engine/app/disposalCache.ts +30 -0
- package/src/client/engine/app/runtime.ts +16 -0
- package/src/client/engine/app/sceneOwnership.ts +317 -0
- package/src/client/engine/app/services.ts +20 -0
- package/src/client/engine/app/systems.ts +71 -0
- package/src/client/engine/app/ui.ts +33 -0
- package/src/client/engine/app/view/frameScheduler.ts +65 -0
- package/src/client/engine/app/view/pageActivity.ts +12 -0
- package/src/client/engine/app/view/presentation.ts +41 -0
- package/src/client/engine/app/view/presentationLoop.ts +56 -0
- package/src/client/engine/app/view/scopeEnvironment.ts +39 -0
- package/src/client/engine/app/workerScope.js +20 -0
- package/src/client/engine/audio/AmbienceBeds.ts +197 -0
- package/src/client/engine/audio/Audio.ts +634 -0
- package/src/client/engine/audio/Cues.ts +153 -0
- package/src/client/engine/audio/Music.ts +958 -0
- package/src/client/engine/audio/SetScore.ts +297 -0
- package/src/client/engine/audio/Stems.ts +277 -0
- package/src/client/engine/audio/Voices.ts +299 -0
- package/src/client/engine/audio/aacNative.ts +46 -0
- package/src/client/engine/audio/aacPull.ts +166 -0
- package/src/client/engine/audio/aacSource.ts +122 -0
- package/src/client/engine/audio/aacTrack.ts +115 -0
- package/src/client/engine/audio/aacWindows.ts +66 -0
- package/src/client/engine/audio/activity.ts +70 -0
- package/src/client/engine/audio/activityTimers.ts +37 -0
- package/src/client/engine/audio/ambience.ts +549 -0
- package/src/client/engine/audio/audioLog.ts +22 -0
- package/src/client/engine/audio/codecs.merge.d.ts +9 -0
- package/src/client/engine/audio/credits.ts +48 -0
- package/src/client/engine/audio/cueRouting.ts +93 -0
- package/src/client/engine/audio/declared.ts +95 -0
- package/src/client/engine/audio/declaredAmbience.ts +113 -0
- package/src/client/engine/audio/declaredBank.ts +104 -0
- package/src/client/engine/audio/declaredGameplay.ts +82 -0
- package/src/client/engine/audio/dsp.ts +164 -0
- package/src/client/engine/audio/gen.ts +538 -0
- package/src/client/engine/audio/interactSfx.ts +95 -0
- package/src/client/engine/audio/levelAudio.ts +131 -0
- package/src/client/engine/audio/loopWindow.ts +24 -0
- package/src/client/engine/audio/ownership.ts +16 -0
- package/src/client/engine/audio/playerVoices.ts +278 -0
- package/src/client/engine/audio/preload.ts +166 -0
- package/src/client/engine/audio/score/score.ts +60 -0
- package/src/client/engine/audio/scoreSelection.ts +19 -0
- package/src/client/engine/audio/surface.ts +71 -0
- package/src/client/engine/audio/synth.ts +301 -0
- package/src/client/engine/audio/unlock.ts +104 -0
- package/src/client/engine/audio/util.ts +95 -0
- package/src/client/engine/blocks.ts +6 -0
- package/src/client/engine/boot/audioFiles.ts +9 -0
- package/src/client/engine/boot/audioInventory.ts +34 -0
- package/src/client/engine/boot/audioPack.ts +54 -0
- package/src/client/engine/boot/bakedApi.ts +46 -0
- package/src/client/engine/boot/bakedTextures.ts +114 -0
- package/src/client/engine/boot/bootCache.ts +16 -0
- package/src/client/engine/boot/bootTrace.ts +362 -0
- package/src/client/engine/boot/browserChunkRecovery.ts +136 -0
- package/src/client/engine/boot/bytes.ts +272 -0
- package/src/client/engine/boot/catalog.ts +35 -0
- package/src/client/engine/boot/chunkRecovery.ts +41 -0
- package/src/client/engine/boot/clearDownloads.ts +128 -0
- package/src/client/engine/boot/contentBase.ts +77 -0
- package/src/client/engine/boot/contentRead.ts +151 -0
- package/src/client/engine/boot/diagnostics.ts +195 -0
- package/src/client/engine/boot/download.ts +112 -0
- package/src/client/engine/boot/dropNotice.ts +260 -0
- package/src/client/engine/boot/earlyPrograms.ts +123 -0
- package/src/client/engine/boot/extras.ts +324 -0
- package/src/client/engine/boot/filePolicy.ts +126 -0
- package/src/client/engine/boot/firstPlayMark.ts +43 -0
- package/src/client/engine/boot/gpuFiles.ts +176 -0
- package/src/client/engine/boot/gpuTrace.ts +42 -0
- package/src/client/engine/boot/idle.ts +52 -0
- package/src/client/engine/boot/imageDecode.ts +95 -0
- package/src/client/engine/boot/imageDecode.worker.ts +69 -0
- package/src/client/engine/boot/ktx2.generated.ts +157 -0
- package/src/client/engine/boot/lastEnd.ts +312 -0
- package/src/client/engine/boot/leaveAfterPaint.ts +16 -0
- package/src/client/engine/boot/liveJsonParser.ts +124 -0
- package/src/client/engine/boot/liveJsonParser.worker.ts +22 -0
- package/src/client/engine/boot/loadingDownloadText.ts +54 -0
- package/src/client/engine/boot/loadingPacks.ts +18 -0
- package/src/client/engine/boot/lowPower.ts +96 -0
- package/src/client/engine/boot/manifest.ts +12 -0
- package/src/client/engine/boot/pack.ts +180 -0
- package/src/client/engine/boot/parsedPages.ts +115 -0
- package/src/client/engine/boot/perflog.ts +15 -0
- package/src/client/engine/boot/plan.ts +256 -0
- package/src/client/engine/boot/prefetch.ts +188 -0
- package/src/client/engine/boot/prefetchQuota.ts +84 -0
- package/src/client/engine/boot/readContentResponse.ts +17 -0
- package/src/client/engine/boot/retry.ts +14 -0
- package/src/client/engine/boot/runtime.ts +21 -0
- package/src/client/engine/boot/shardPrefetch.ts +278 -0
- package/src/client/engine/boot/shell.ts +135 -0
- package/src/client/engine/boot/stuck.ts +106 -0
- package/src/client/engine/boot/stuckStep.ts +99 -0
- package/src/client/engine/boot/sw.ts +385 -0
- package/src/client/engine/boot/swGlobal.d.ts +9 -0
- package/src/client/engine/boot/texturePack.ts +182 -0
- package/src/client/engine/boot/timeLeft.ts +106 -0
- package/src/client/engine/boot/titleArrival.ts +101 -0
- package/src/client/engine/boot/weights.ts +21 -0
- package/src/client/engine/boot.ts +51 -0
- package/src/client/engine/build.d.ts +2 -0
- package/src/client/engine/calibrate/entry.ts +29 -0
- package/src/client/engine/calibrate/js.ts +39 -0
- package/src/client/engine/calibrate/math.ts +23 -0
- package/src/client/engine/calibrate/run.ts +93 -0
- package/src/client/engine/calibrate/wasm.ts +154 -0
- package/src/client/engine/combat/EquipmentService.ts +412 -0
- package/src/client/engine/combat/cues.ts +46 -0
- package/src/client/engine/combat/types.ts +21 -0
- package/src/client/engine/combat/view/Bow.ts +462 -0
- package/src/client/engine/combat/view/DropArc.ts +64 -0
- package/src/client/engine/combat/view/EquipmentHost.ts +15 -0
- package/src/client/engine/combat/view/SweptMelee.ts +691 -0
- package/src/client/engine/combat/view/bowProfile.ts +182 -0
- package/src/client/engine/combat/view/brass.ts +65 -0
- package/src/client/engine/combat/view/firearmFx.ts +25 -0
- package/src/client/engine/combat/view/hitscan.ts +29 -0
- package/src/client/engine/combat/view/melee.ts +67 -0
- package/src/client/engine/combat/view/projectedTrail.ts +42 -0
- package/src/client/engine/combat/view/projectile.ts +315 -0
- package/src/client/engine/combat/view/ranged.ts +460 -0
- package/src/client/engine/combat/view/rangedFeel.ts +39 -0
- package/src/client/engine/combat/view/slashTrail.ts +151 -0
- package/src/client/engine/core/Game.ts +1833 -0
- package/src/client/engine/core/GpuRecovery.ts +200 -0
- package/src/client/engine/core/Grade.ts +109 -0
- package/src/client/engine/core/KeepAlive.ts +32 -0
- package/src/client/engine/core/Tour.ts +46 -0
- package/src/client/engine/core/Volumetrics.ts +260 -0
- package/src/client/engine/core/apiOrigin.ts +12 -0
- package/src/client/engine/core/assets.ts +292 -0
- package/src/client/engine/core/bootstrap.ts +175 -0
- package/src/client/engine/core/crashFlag.ts +32 -0
- package/src/client/engine/core/crossroads.ts +4 -0
- package/src/client/engine/core/deflate.ts +110 -0
- package/src/client/engine/core/devMode.ts +49 -0
- package/src/client/engine/core/devPixels.ts +62 -0
- package/src/client/engine/core/drawBudget.ts +48 -0
- package/src/client/engine/core/errorReport.ts +248 -0
- package/src/client/engine/core/gpuOnly.ts +139 -0
- package/src/client/engine/core/graphicsMode.ts +62 -0
- package/src/client/engine/core/graphicsQuality.ts +117 -0
- package/src/client/engine/core/heldTiming.ts +24 -0
- package/src/client/engine/core/ktx2.ts +511 -0
- package/src/client/engine/core/ktx2Sources.ts +22 -0
- package/src/client/engine/core/ktx2Zstd.ts +151 -0
- package/src/client/engine/core/ktx2Zstd.worker.ts +31 -0
- package/src/client/engine/core/practiceRoom.ts +16 -0
- package/src/client/engine/core/reloadGuard.ts +21 -0
- package/src/client/engine/core/scopedCpu.ts +49 -0
- package/src/client/engine/core/scopedWorkerPool.ts +55 -0
- package/src/client/engine/core/shadowLayer.ts +8 -0
- package/src/client/engine/core/slowGpuPacing.ts +118 -0
- package/src/client/engine/core/sustainedFrames.ts +73 -0
- package/src/client/engine/core/tier.ts +126 -0
- package/src/client/engine/core/viewport.ts +130 -0
- package/src/client/engine/core/webglStartup.ts +50 -0
- package/src/client/engine/core/worldDepth.ts +183 -0
- package/src/client/engine/core/zstdFrame.ts +38 -0
- package/src/client/engine/debug/probe.ts +560 -0
- package/src/client/engine/debug/timerBaseline.ts +14 -0
- package/src/client/engine/entities/AnimalFactory.ts +766 -0
- package/src/client/engine/entities/AnimalHerdView.ts +413 -0
- package/src/client/engine/entities/AnimalView.ts +583 -0
- package/src/client/engine/entities/RowBodies.ts +276 -0
- package/src/client/engine/entities/animalMatrices.ts +179 -0
- package/src/client/engine/entities/animalShadow.ts +58 -0
- package/src/client/engine/entities/animalShells.ts +14 -0
- package/src/client/engine/entities/farHerd.ts +469 -0
- package/src/client/engine/entities/lowpoly.ts +155 -0
- package/src/client/engine/entities/species/loft.ts +253 -0
- package/src/client/engine/entities/species/look.ts +122 -0
- package/src/client/engine/events/maps.ts +58 -0
- package/src/client/engine/explore/Compare.ts +126 -0
- package/src/client/engine/explore/Explore.ts +648 -0
- package/src/client/engine/explore/FreeCam.ts +280 -0
- package/src/client/engine/explore/MiniMap.ts +283 -0
- package/src/client/engine/explore/ModelExplorer.ts +1155 -0
- package/src/client/engine/explore/Select.ts +176 -0
- package/src/client/engine/explore/SetExplorer.ts +553 -0
- package/src/client/engine/explore/TouchFly.ts +236 -0
- package/src/client/engine/explore/catalog.ts +159 -0
- package/src/client/engine/explore/diorama.ts +245 -0
- package/src/client/engine/explore/fatLines.ts +47 -0
- package/src/client/engine/explore/img/mockups/nalati-camp-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-camp-target.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-gully-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-gully-target.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-rail-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-rail-target.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nine-gate-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nine-gate-target.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nine-stair-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nine-stair-target.jpg +0 -0
- package/src/client/engine/explore/pick.ts +120 -0
- package/src/client/engine/explore/registry.ts +16 -0
- package/src/client/engine/explore/setView.ts +222 -0
- package/src/client/engine/explore/tiers.ts +27 -0
- package/src/client/engine/explore/viewPoint.ts +100 -0
- package/src/client/engine/fx/Impacts.ts +154 -0
- package/src/client/engine/fx/LightPool.ts +188 -0
- package/src/client/engine/fx/ParticlePool.ts +76 -0
- package/src/client/engine/fx/SiteLights.ts +119 -0
- package/src/client/engine/fx/effectField.ts +91 -0
- package/src/client/engine/fx/groundFx.ts +144 -0
- package/src/client/engine/fx/groundTell.ts +101 -0
- package/src/client/engine/fx/lightEmitters.ts +35 -0
- package/src/client/engine/input/ControlsPanel.ts +108 -0
- package/src/client/engine/input/InputService.ts +394 -0
- package/src/client/engine/input/bindingTable.ts +124 -0
- package/src/client/engine/input/bindings.ts +101 -0
- package/src/client/engine/input/dom.ts +62 -0
- package/src/client/engine/input/equipmentInput.ts +4 -0
- package/src/client/engine/input/gameplay.ts +36 -0
- package/src/client/engine/input/keycap.ts +25 -0
- package/src/client/engine/input/menuInput.ts +7 -0
- package/src/client/engine/input/platform.ts +36 -0
- package/src/client/engine/input/weaponActions.ts +8 -0
- package/src/client/engine/level/frame.ts +95 -0
- package/src/client/engine/level/installation.ts +107 -0
- package/src/client/engine/level/load.ts +97 -0
- package/src/client/engine/level/registrations.ts +59 -0
- package/src/client/engine/math/color.ts +6 -0
- package/src/client/engine/models/animalGeometry.ts +29 -0
- package/src/client/engine/models/castawayBody.ts +257 -0
- package/src/client/engine/models/colliders.ts +186 -0
- package/src/client/engine/models/creature.ts +66 -0
- package/src/client/engine/models/cull.ts +953 -0
- package/src/client/engine/models/gear.ts +87 -0
- package/src/client/engine/models/geometryPack.ts +14 -0
- package/src/client/engine/models/hoverboard.ts +29 -0
- package/src/client/engine/models/instancedBatch.ts +324 -0
- package/src/client/engine/models/interact.ts +26 -0
- package/src/client/engine/models/live.ts +174 -0
- package/src/client/engine/models/model.ts +449 -0
- package/src/client/engine/models/modelPose.ts +14 -0
- package/src/client/engine/models/nativeGeometry.ts +114 -0
- package/src/client/engine/models/ownedGeometry.ts +294 -0
- package/src/client/engine/models/place.ts +1476 -0
- package/src/client/engine/models/roster.ts +44 -0
- package/src/client/engine/models/sets.ts +74 -0
- package/src/client/engine/models/slots.ts +69 -0
- package/src/client/engine/models/staticSets.ts +119 -0
- package/src/client/engine/models/swimHands.ts +44 -0
- package/src/client/engine/models/trainingDummy.ts +46 -0
- package/src/client/engine/models/trainingDummyFigure.ts +16 -0
- package/src/client/engine/models/weld.ts +260 -0
- package/src/client/engine/net/attackPrediction.ts +38 -0
- package/src/client/engine/net/client.ts +314 -0
- package/src/client/engine/net/heldOnOthers.ts +167 -0
- package/src/client/engine/net/hurtOther.ts +12 -0
- package/src/client/engine/net/interpolator.ts +179 -0
- package/src/client/engine/net/nameTag.ts +88 -0
- package/src/client/engine/net/netClock.ts +90 -0
- package/src/client/engine/net/netPlayer.ts +265 -0
- package/src/client/engine/net/netRecord.ts +43 -0
- package/src/client/engine/net/onRep.ts +75 -0
- package/src/client/engine/net/otherPlayers.ts +239 -0
- package/src/client/engine/net/othersOnMap.ts +80 -0
- package/src/client/engine/net/predictionWorld.ts +100 -0
- package/src/client/engine/net/predictor.ts +233 -0
- package/src/client/engine/net/redial.ts +179 -0
- package/src/client/engine/net/remoteAir.ts +134 -0
- package/src/client/engine/net/remoteBoard.ts +128 -0
- package/src/client/engine/net/remoteDeath.ts +140 -0
- package/src/client/engine/net/remoteGait.ts +114 -0
- package/src/client/engine/net/remoteHurt.ts +123 -0
- package/src/client/engine/net/remoteStrike.ts +160 -0
- package/src/client/engine/net/voiceNear.ts +55 -0
- package/src/client/engine/net/webSocketTransport.ts +91 -0
- package/src/client/engine/physics/active.ts +15 -0
- package/src/client/engine/physics/boxFrame.ts +15 -0
- package/src/client/engine/physics/calibration.ts +31 -0
- package/src/client/engine/physics/debug.ts +68 -0
- package/src/client/engine/physics/navmeshLoad.ts +86 -0
- package/src/client/engine/physics/ragdoll.ts +513 -0
- package/src/client/engine/physics/ropeDeck.ts +112 -0
- package/src/client/engine/player/AimAssist.ts +183 -0
- package/src/client/engine/player/AimTargets.ts +55 -0
- package/src/client/engine/player/CameraFX.ts +89 -0
- package/src/client/engine/player/Hands.ts +216 -0
- package/src/client/engine/player/LockOnTarget.ts +395 -0
- package/src/client/engine/player/Player.ts +678 -0
- package/src/client/engine/player/Skins.ts +109 -0
- package/src/client/engine/player/TouchControls.ts +564 -0
- package/src/client/engine/player/WaterLine.ts +94 -0
- package/src/client/engine/player/WeaponPickup.ts +465 -0
- package/src/client/engine/player/bladeGlow.ts +120 -0
- package/src/client/engine/player/firstPersonArms.ts +384 -0
- package/src/client/engine/player/heldHandParts.ts +91 -0
- package/src/client/engine/player/viewmodelSources.ts +25 -0
- package/src/client/engine/player/viewmodelTextures.ts +261 -0
- package/src/client/engine/player/viewmodelTextures.worker.ts +28 -0
- package/src/client/engine/practice/DummyClips.ts +100 -0
- package/src/client/engine/practice/DummyMotion.ts +287 -0
- package/src/client/engine/practice/DummyStudio.ts +137 -0
- package/src/client/engine/practice/TrainingArena.ts +463 -0
- package/src/client/engine/practice/TrainingDummy.ts +160 -0
- package/src/client/engine/practice/TrainingDummyAssets.ts +80 -0
- package/src/client/engine/practice/arena.css +20 -0
- package/src/client/engine/practice/dummyMetadata.ts +12 -0
- package/src/client/engine/practice/lineup.ts +17 -0
- package/src/client/engine/practice/playground/Playground.ts +52 -0
- package/src/client/engine/practice/playground/catalog.ts +44 -0
- package/src/client/engine/practice/playground/devGrid.ts +173 -0
- package/src/client/engine/practice/playground/hud.ts +80 -0
- package/src/client/engine/practice/playground/load.ts +24 -0
- package/src/client/engine/practice/practiceLoan.ts +52 -0
- package/src/client/engine/practice/targets.ts +15 -0
- package/src/client/engine/pwa/cacheNames.ts +2 -0
- package/src/client/engine/pwa/sw.js +401 -0
- package/src/client/engine/quest/view/replica.ts +88 -0
- package/src/client/engine/quest/view/ui.ts +221 -0
- package/src/client/engine/quest/view.ts +209 -0
- package/src/client/engine/render/allocationBytes.ts +16 -0
- package/src/client/engine/render/allocationJournal.ts +125 -0
- package/src/client/engine/render/aoTransparency.ts +225 -0
- package/src/client/engine/render/budgetReport.ts +53 -0
- package/src/client/engine/render/budgets.ts +72 -0
- package/src/client/engine/render/calibration.ts +32 -0
- package/src/client/engine/render/calibrationGpu.ts +84 -0
- package/src/client/engine/render/changedTextureUploads.ts +118 -0
- package/src/client/engine/render/compileLights.ts +75 -0
- package/src/client/engine/render/compileShadows.ts +29 -0
- package/src/client/engine/render/composerDepth.ts +26 -0
- package/src/client/engine/render/compressedMipmaps.ts +59 -0
- package/src/client/engine/render/compressedTextureRetirement.ts +71 -0
- package/src/client/engine/render/compressedUpload.ts +107 -0
- package/src/client/engine/render/contextErrors.ts +14 -0
- package/src/client/engine/render/dataLook.ts +691 -0
- package/src/client/engine/render/desktopReference.ts +5 -0
- package/src/client/engine/render/diagnosticJournal.ts +23 -0
- package/src/client/engine/render/displayColour.ts +55 -0
- package/src/client/engine/render/doubleElements.ts +33 -0
- package/src/client/engine/render/drawGuards.ts +47 -0
- package/src/client/engine/render/drawHooks.ts +265 -0
- package/src/client/engine/render/drawNeutral.ts +19 -0
- package/src/client/engine/render/drawnEnvironment.ts +35 -0
- package/src/client/engine/render/entryWarmupBound.ts +19 -0
- package/src/client/engine/render/families/emissive.ts +224 -0
- package/src/client/engine/render/families/ground.ts +291 -0
- package/src/client/engine/render/families/measure.ts +191 -0
- package/src/client/engine/render/families/paintedTerrain.ts +388 -0
- package/src/client/engine/render/families/painterly.ts +288 -0
- package/src/client/engine/render/families/pbr.ts +67 -0
- package/src/client/engine/render/families/registry.ts +140 -0
- package/src/client/engine/render/families/toon.ts +193 -0
- package/src/client/engine/render/fencedUnits.ts +115 -0
- package/src/client/engine/render/firstFrameParts.ts +95 -0
- package/src/client/engine/render/fogPatches.ts +56 -0
- package/src/client/engine/render/frameCounter.ts +47 -0
- package/src/client/engine/render/frameDrawRange.ts +120 -0
- package/src/client/engine/render/gltfMaterialOrder.ts +83 -0
- package/src/client/engine/render/gpuClasses.ts +29 -0
- package/src/client/engine/render/gpuLabels.ts +437 -0
- package/src/client/engine/render/graph/colourFunction.ts +83 -0
- package/src/client/engine/render/graph/glsl.ts +1056 -0
- package/src/client/engine/render/graph/glslCodec.ts +48 -0
- package/src/client/engine/render/graph/glslMaterial.ts +463 -0
- package/src/client/engine/render/graph/glslPost.ts +79 -0
- package/src/client/engine/render/graph/glslProgram.ts +698 -0
- package/src/client/engine/render/graph/presets.ts +812 -0
- package/src/client/engine/render/graph/viewRay.ts +28 -0
- package/src/client/engine/render/graphBackend.ts +176 -0
- package/src/client/engine/render/hoverboardGeometry.ts +54 -0
- package/src/client/engine/render/instancedGeometry.ts +28 -0
- package/src/client/engine/render/instancedTwin.ts +40 -0
- package/src/client/engine/render/ktx2Probe.ts +299 -0
- package/src/client/engine/render/layeredMaps.ts +64 -0
- package/src/client/engine/render/lightUniforms.ts +22 -0
- package/src/client/engine/render/lighterTargets.ts +47 -0
- package/src/client/engine/render/lightmaps.ts +36 -0
- package/src/client/engine/render/look.ts +406 -0
- package/src/client/engine/render/lookLight.ts +107 -0
- package/src/client/engine/render/lut.ts +23 -0
- package/src/client/engine/render/memoryImages.ts +31 -0
- package/src/client/engine/render/memorySaver.ts +262 -0
- package/src/client/engine/render/offscreenBuild.ts +184 -0
- package/src/client/engine/render/offscreenPreparation.ts +41 -0
- package/src/client/engine/render/parkedDraws.ts +920 -0
- package/src/client/engine/render/pmremSize.ts +21 -0
- package/src/client/engine/render/postPreparation.ts +67 -0
- package/src/client/engine/render/precompile.ts +1833 -0
- package/src/client/engine/render/programRetention.ts +125 -0
- package/src/client/engine/render/readbackPreparation.ts +23 -0
- package/src/client/engine/render/regionCinematic.ts +212 -0
- package/src/client/engine/render/regionLook.ts +301 -0
- package/src/client/engine/render/releasedArrays.ts +13 -0
- package/src/client/engine/render/renderer.ts +68 -0
- package/src/client/engine/render/scatterInstances.ts +139 -0
- package/src/client/engine/render/scenePreparation.ts +27 -0
- package/src/client/engine/render/shaderPatches.ts +303 -0
- package/src/client/engine/render/shaderText.ts +95 -0
- package/src/client/engine/render/shadowDepthVariants.ts +35 -0
- package/src/client/engine/render/shadowMaterialOwnership.ts +120 -0
- package/src/client/engine/render/skinnedSpheres.ts +30 -0
- package/src/client/engine/render/skyEnvironment.ts +222 -0
- package/src/client/engine/render/staticMatrices.ts +88 -0
- package/src/client/engine/render/streamedInstances.ts +184 -0
- package/src/client/engine/render/textureBytes.ts +185 -0
- package/src/client/engine/render/textureUploadEvents.ts +60 -0
- package/src/client/engine/render/tierBenchmark.ts +54 -0
- package/src/client/engine/render/tierBoot.ts +50 -0
- package/src/client/engine/render/tierSelect.ts +27 -0
- package/src/client/engine/render/tiers.ts +78 -0
- package/src/client/engine/render/uniformCaches.ts +143 -0
- package/src/client/engine/render/uploadOwnership.ts +335 -0
- package/src/client/engine/render/viewmodel.ts +114 -0
- package/src/client/engine/render/viewmodelFeel.ts +374 -0
- package/src/client/engine/saves/indexed.ts +250 -0
- package/src/client/engine/saves/slots.ts +42 -0
- package/src/client/engine/saves/view/storage.ts +11 -0
- package/src/client/engine/script/client.ts +240 -0
- package/src/client/engine/telemetry/bootInbox.ts +18 -0
- package/src/client/engine/telemetry/browserErrors.ts +173 -0
- package/src/client/engine/telemetry/crossroads.ts +26 -0
- package/src/client/engine/telemetry/health.ts +40 -0
- package/src/client/engine/telemetry/model.ts +36 -0
- package/src/client/engine/telemetry/runtime.ts +62 -0
- package/src/client/engine/types/meshopt-simplifier.d.ts +10 -0
- package/src/client/engine/types/n8ao.d.ts +52 -0
- package/src/client/engine/ui/BootSettings.ts +97 -0
- package/src/client/engine/ui/BossBar.ts +141 -0
- package/src/client/engine/ui/Combat.ts +299 -0
- package/src/client/engine/ui/DeathFade.ts +104 -0
- package/src/client/engine/ui/DebugMenu.ts +199 -0
- package/src/client/engine/ui/EliteBar.ts +219 -0
- package/src/client/engine/ui/ErrorModal.ts +309 -0
- package/src/client/engine/ui/Feedback.ts +346 -0
- package/src/client/engine/ui/FirstHints.ts +279 -0
- package/src/client/engine/ui/HUD.ts +714 -0
- package/src/client/engine/ui/HurtArc.ts +102 -0
- package/src/client/engine/ui/ItemCard.ts +95 -0
- package/src/client/engine/ui/KeyHelp.ts +59 -0
- package/src/client/engine/ui/Loading.ts +851 -0
- package/src/client/engine/ui/LockOn.ts +131 -0
- package/src/client/engine/ui/Map.ts +280 -0
- package/src/client/engine/ui/Menu.ts +438 -0
- package/src/client/engine/ui/Minimap.ts +840 -0
- package/src/client/engine/ui/Perf.ts +356 -0
- package/src/client/engine/ui/ReloadPrompt.ts +42 -0
- package/src/client/engine/ui/RotateGate.ts +40 -0
- package/src/client/engine/ui/SavePanel.ts +62 -0
- package/src/client/engine/ui/Settings.ts +277 -0
- package/src/client/engine/ui/SpeedLines.ts +46 -0
- package/src/client/engine/ui/StartTitle.ts +39 -0
- package/src/client/engine/ui/ToastStack.ts +90 -0
- package/src/client/engine/ui/Update.ts +116 -0
- package/src/client/engine/ui/WeaponStrip.ts +272 -0
- package/src/client/engine/ui/WindupWarn.ts +116 -0
- package/src/client/engine/ui/authoredDebugRows.ts +3 -0
- package/src/client/engine/ui/buildCheck.ts +72 -0
- package/src/client/engine/ui/buildRow.ts +71 -0
- package/src/client/engine/ui/cards.ts +41 -0
- package/src/client/engine/ui/debugOptions.ts +230 -0
- package/src/client/engine/ui/declared.ts +89 -0
- package/src/client/engine/ui/devSwitch.ts +48 -0
- package/src/client/engine/ui/developerBanner.ts +32 -0
- package/src/client/engine/ui/diagnosticsCopy.ts +20 -0
- package/src/client/engine/ui/drawBudgetCounter.ts +10 -0
- package/src/client/engine/ui/errorScreen.ts +109 -0
- package/src/client/engine/ui/frameWindow.ts +50 -0
- package/src/client/engine/ui/graphicsBlock.ts +156 -0
- package/src/client/engine/ui/graphicsControls.ts +47 -0
- package/src/client/engine/ui/haptics.ts +28 -0
- package/src/client/engine/ui/hoverBoost.ts +61 -0
- package/src/client/engine/ui/hudAdapters.ts +61 -0
- package/src/client/engine/ui/hudSlots.ts +130 -0
- package/src/client/engine/ui/icons.ts +62 -0
- package/src/client/engine/ui/layers.ts +134 -0
- package/src/client/engine/ui/leaveGuard.ts +64 -0
- package/src/client/engine/ui/loadProgress.ts +67 -0
- package/src/client/engine/ui/loading.css +125 -0
- package/src/client/engine/ui/lookLightOption.ts +22 -0
- package/src/client/engine/ui/mapLabel.ts +18 -0
- package/src/client/engine/ui/mapPainter.ts +395 -0
- package/src/client/engine/ui/menuSettings.ts +188 -0
- package/src/client/engine/ui/namePrompt.ts +138 -0
- package/src/client/engine/ui/offlineDownload.ts +83 -0
- package/src/client/engine/ui/ownership.ts +14 -0
- package/src/client/engine/ui/panel.ts +166 -0
- package/src/client/engine/ui/perf.css +93 -0
- package/src/client/engine/ui/perfDock.ts +61 -0
- package/src/client/engine/ui/perfHud.ts +332 -0
- package/src/client/engine/ui/perfLap.ts +206 -0
- package/src/client/engine/ui/perfLapSummary.ts +92 -0
- package/src/client/engine/ui/perfProbe.ts +280 -0
- package/src/client/engine/ui/pinKeepOut.ts +59 -0
- package/src/client/engine/ui/playerDeath.ts +16 -0
- package/src/client/engine/ui/playerHurt.ts +70 -0
- package/src/client/engine/ui/playerReload.ts +55 -0
- package/src/client/engine/ui/reloadChip.ts +24 -0
- package/src/client/engine/ui/reloadCover.ts +110 -0
- package/src/client/engine/ui/review.ts +158 -0
- package/src/client/engine/ui/roomMap.ts +109 -0
- package/src/client/engine/ui/saveStrings.ts +9 -0
- package/src/client/engine/ui/settingsTabs.ts +249 -0
- package/src/client/engine/ui/styles/base.css +92 -0
- package/src/client/engine/ui/styles/boss.css +97 -0
- package/src/client/engine/ui/styles/combat.css +100 -0
- package/src/client/engine/ui/styles/debug.css +22 -0
- package/src/client/engine/ui/styles/elite.css +87 -0
- package/src/client/engine/ui/styles/explore.css +435 -0
- package/src/client/engine/ui/styles/feedback.css +63 -0
- package/src/client/engine/ui/styles/game.css +290 -0
- package/src/client/engine/ui/styles/gmenu.css +407 -0
- package/src/client/engine/ui/styles/hints.css +26 -0
- package/src/client/engine/ui/styles/itemcard.css +38 -0
- package/src/client/engine/ui/styles/menu.css +129 -0
- package/src/client/engine/ui/styles/minimap.css +87 -0
- package/src/client/engine/ui/styles/namePrompt.css +27 -0
- package/src/client/engine/ui/styles/playgrounds.css +18 -0
- package/src/client/engine/ui/styles/quest.css +65 -0
- package/src/client/engine/ui/styles/rotate.css +55 -0
- package/src/client/engine/ui/styles/touch.css +303 -0
- package/src/client/engine/ui/styles/update.css +27 -0
- package/src/client/engine/ui/tabs.ts +27 -0
- package/src/client/engine/ui/unstuck.ts +38 -0
- package/src/client/engine/ui/voiceSettings.ts +135 -0
- package/src/client/engine/world/Atmosphere.ts +333 -0
- package/src/client/engine/world/BakedSky.ts +155 -0
- package/src/client/engine/world/Boundary.ts +234 -0
- package/src/client/engine/world/Grass.ts +664 -0
- package/src/client/engine/world/Horizon.ts +237 -0
- package/src/client/engine/world/HorizonMatte.ts +399 -0
- package/src/client/engine/world/Terrain.ts +560 -0
- package/src/client/engine/world/TreeFactory.ts +128 -0
- package/src/client/engine/world/backdropLayer.ts +580 -0
- package/src/client/engine/world/blenderArea.ts +23 -0
- package/src/client/engine/world/bounds.ts +57 -0
- package/src/client/engine/world/cascadeCull.ts +251 -0
- package/src/client/engine/world/cascadeLights.ts +29 -0
- package/src/client/engine/world/cloudField.ts +29 -0
- package/src/client/engine/world/coarseTileMask.ts +100 -0
- package/src/client/engine/world/csmLightBlock.ts +23 -0
- package/src/client/engine/world/declaredProps.ts +226 -0
- package/src/client/engine/world/forest/Forest.ts +378 -0
- package/src/client/engine/world/forest/treeSet.ts +140 -0
- package/src/client/engine/world/forest/treeSpecies.ts +17 -0
- package/src/client/engine/world/frameCamera.ts +58 -0
- package/src/client/engine/world/geometryBake.ts +272 -0
- package/src/client/engine/world/geometryBounds.ts +77 -0
- package/src/client/engine/world/geometryKit.ts +163 -0
- package/src/client/engine/world/hiddenFaces.ts +153 -0
- package/src/client/engine/world/interact/Interactables.ts +690 -0
- package/src/client/engine/world/interact/kit.ts +6 -0
- package/src/client/engine/world/lookFlags.ts +15 -0
- package/src/client/engine/world/lowpolyKit.ts +270 -0
- package/src/client/engine/world/lut.ts +45 -0
- package/src/client/engine/world/painterly.ts +109 -0
- package/src/client/engine/world/pointLightSkip.ts +31 -0
- package/src/client/engine/world/pond.ts +184 -0
- package/src/client/engine/world/pondGrid.ts +5 -0
- package/src/client/engine/world/registry.ts +348 -0
- package/src/client/engine/world/shadowCadence.ts +14 -0
- package/src/client/engine/world/shadowChunks.ts +193 -0
- package/src/client/engine/world/shadowFade.ts +190 -0
- package/src/client/engine/world/shadowFilter.ts +117 -0
- package/src/client/engine/world/shadowVariants.ts +115 -0
- package/src/client/engine/world/skyBackdrop.ts +526 -0
- package/src/client/engine/world/skyRig.ts +577 -0
- package/src/client/engine/world/skyTextures.ts +103 -0
- package/src/client/engine/world/terrainTileView.ts +164 -0
- package/src/client/engine/world/tileStreamer.ts +823 -0
- package/src/client/engine/world/voxelAO.ts +338 -0
- package/src/client/engine/world/water/ripplePixels.ts +51 -0
- package/src/client/engine/world/water/ripples.ts +102 -0
- package/src/client/engine/world/weakShaderMap.ts +58 -0
- package/src/client/engine/world/wind.ts +112 -0
- package/src/client/game/Boss.ts +354 -0
- package/src/client/game/Elite.ts +529 -0
- package/src/client/game/Inventory.ts +123 -0
- package/src/client/game/Progress.ts +166 -0
- package/src/client/game/ambient/ambientFlock.ts +71 -0
- package/src/client/game/ambient/crowdDraw.ts +85 -0
- package/src/client/game/ambient/foragerDraw.ts +56 -0
- package/src/client/game/ambient/pageCrowds.ts +81 -0
- package/src/client/game/ambient/wingField.ts +46 -0
- package/src/client/game/animation/limbCollision.ts +46 -0
- package/src/client/game/animation/limbQueryPose.ts +141 -0
- package/src/client/game/animation/limbQueryView.ts +53 -0
- package/src/client/game/animation/limbView.ts +28 -0
- package/src/client/game/audio/cueDirector.ts +157 -0
- package/src/client/game/audio/forestPage.ts +30 -0
- package/src/client/game/audio/sceneDirector.ts +239 -0
- package/src/client/game/audio/sceneEvents.merge.d.ts +9 -0
- package/src/client/game/audio/theme.ts +229 -0
- package/src/client/game/audio/voicePatches.ts +108 -0
- package/src/client/game/bag/BagButton.ts +85 -0
- package/src/client/game/bag/bag.ts +239 -0
- package/src/client/game/bag/equipment.ts +18 -0
- package/src/client/game/bag/tabs.ts +194 -0
- package/src/client/game/boot/audio.generated.ts +9258 -0
- package/src/client/game/boot/bytes.generated.ts +1643 -0
- package/src/client/game/boot/loadingPaths.ts +121 -0
- package/src/client/game/boot/packs.generated.ts +5 -0
- package/src/client/game/boot/spawnDownload.ts +999 -0
- package/src/client/game/boot/versions.generated.ts +868 -0
- package/src/client/game/boss/arenaFire.ts +135 -0
- package/src/client/game/boss/arenaRoom.ts +715 -0
- package/src/client/game/boss/arenaRoomView.ts +530 -0
- package/src/client/game/boss/barFeed.ts +253 -0
- package/src/client/game/boss/encounterView.ts +463 -0
- package/src/client/game/boss/presentation.ts +18 -0
- package/src/client/game/boss/roamingProjection.ts +255 -0
- package/src/client/game/boss/slotRowsView.ts +95 -0
- package/src/client/game/boss/socketRig.ts +129 -0
- package/src/client/game/boss/timedEncounters.ts +83 -0
- package/src/client/game/combat/roamingSession.ts +107 -0
- package/src/client/game/compendium/Journal.ts +85 -0
- package/src/client/game/compendium/compendium.css +135 -0
- package/src/client/game/compendium/install.ts +181 -0
- package/src/client/game/compendium/journalView.ts +224 -0
- package/src/client/game/compendium/keepsakes.ts +169 -0
- package/src/client/game/compendium/keepsakesView.ts +70 -0
- package/src/client/game/complete/ShardComplete.ts +148 -0
- package/src/client/game/complete/complete.css +71 -0
- package/src/client/game/complete/declared.ts +111 -0
- package/src/client/game/cosmetics/bodyShadow.ts +148 -0
- package/src/client/game/cosmetics/cosmetics.ts +119 -0
- package/src/client/game/cosmetics/locker.ts +88 -0
- package/src/client/game/data/pickupCatalogue.json +1008 -0
- package/src/client/game/debug/browser.d.ts +10 -0
- package/src/client/game/draftTitles.ts +26 -0
- package/src/client/game/eliteView.ts +246 -0
- package/src/client/game/engineStrings.ts +12 -0
- package/src/client/game/equipmentTypes.merge.d.ts +10 -0
- package/src/client/game/firstPlay.css +18 -0
- package/src/client/game/firstPlay.ts +94 -0
- package/src/client/game/generators/pickups.ts +92 -0
- package/src/client/game/grapple/fontPreparation.ts +31 -0
- package/src/client/game/grapple/netClaw.ts +61 -0
- package/src/client/game/grapple/ribbon.ts +159 -0
- package/src/client/game/grapple/tool.ts +478 -0
- package/src/client/game/grid/admissionPriority.ts +41 -0
- package/src/client/game/grid/admissionYield.ts +37 -0
- package/src/client/game/grid/approachProductInputs.ts +72 -0
- package/src/client/game/grid/assetResidency.ts +188 -0
- package/src/client/game/grid/borderShimmer.ts +185 -0
- package/src/client/game/grid/budgetOverlay.css +40 -0
- package/src/client/game/grid/budgetOverlay.ts +238 -0
- package/src/client/game/grid/budgetPoints.ts +184 -0
- package/src/client/game/grid/cellChanges.ts +106 -0
- package/src/client/game/grid/cellClip.ts +611 -0
- package/src/client/game/grid/cellCover.ts +58 -0
- package/src/client/game/grid/cellLoading.ts +89 -0
- package/src/client/game/grid/cellPresence.ts +28 -0
- package/src/client/game/grid/cellScreens.ts +83 -0
- package/src/client/game/grid/copyIdentity.ts +98 -0
- package/src/client/game/grid/copyLayout.ts +153 -0
- package/src/client/game/grid/copyPrompts.ts +31 -0
- package/src/client/game/grid/edgeSources.ts +120 -0
- package/src/client/game/grid/enteredEquipment.ts +65 -0
- package/src/client/game/grid/enteredInteract.ts +43 -0
- package/src/client/game/grid/entryDownloads.ts +45 -0
- package/src/client/game/grid/entryReadPrefetch.ts +64 -0
- package/src/client/game/grid/farImpostorDecodeWorker.ts +32 -0
- package/src/client/game/grid/farImpostorPack.ts +18 -0
- package/src/client/game/grid/farImpostorView.ts +130 -0
- package/src/client/game/grid/farView.ts +235 -0
- package/src/client/game/grid/frame.ts +845 -0
- package/src/client/game/grid/frameLook.ts +215 -0
- package/src/client/game/grid/frameModel.ts +126 -0
- package/src/client/game/grid/gridHud.css +47 -0
- package/src/client/game/grid/gridHud.ts +126 -0
- package/src/client/game/grid/hazeBand.ts +77 -0
- package/src/client/game/grid/homeCheckpoint.ts +11 -0
- package/src/client/game/grid/homeMetadata.ts +40 -0
- package/src/client/game/grid/intent.ts +65 -0
- package/src/client/game/grid/live.ts +787 -0
- package/src/client/game/grid/liveSession.ts +969 -0
- package/src/client/game/grid/loadingRings.ts +49 -0
- package/src/client/game/grid/mapAtlas.build.d.ts +4 -0
- package/src/client/game/grid/mapAtlas.ts +33 -0
- package/src/client/game/grid/mapFrame.ts +81 -0
- package/src/client/game/grid/memoryRows.ts +32 -0
- package/src/client/game/grid/memoryWarning.css +11 -0
- package/src/client/game/grid/memoryWarning.ts +81 -0
- package/src/client/game/grid/menu.ts +49 -0
- package/src/client/game/grid/minimapBlend.ts +185 -0
- package/src/client/game/grid/nearGrain.ts +40 -0
- package/src/client/game/grid/nearPlaceholderPlan.ts +60 -0
- package/src/client/game/grid/nearPlaceholderView.ts +182 -0
- package/src/client/game/grid/neighbourLife.ts +151 -0
- package/src/client/game/grid/neighbourPanels.ts +84 -0
- package/src/client/game/grid/neighbourRows.ts +32 -0
- package/src/client/game/grid/oneWayIn.ts +114 -0
- package/src/client/game/grid/pageEntry.ts +234 -0
- package/src/client/game/grid/pageResidency.ts +216 -0
- package/src/client/game/grid/pageShell.ts +67 -0
- package/src/client/game/grid/prefetch.ts +344 -0
- package/src/client/game/grid/prefetchIndex.ts +28 -0
- package/src/client/game/grid/prefetchIndexCore.ts +41 -0
- package/src/client/game/grid/prelinkViews.ts +31 -0
- package/src/client/game/grid/preparationAdmission.ts +34 -0
- package/src/client/game/grid/productInputs.ts +98 -0
- package/src/client/game/grid/productLeases.ts +76 -0
- package/src/client/game/grid/products.ts +350 -0
- package/src/client/game/grid/refusal.ts +73 -0
- package/src/client/game/grid/regionLight.ts +102 -0
- package/src/client/game/grid/regionShell.ts +58 -0
- package/src/client/game/grid/regionSky.ts +104 -0
- package/src/client/game/grid/regionalBuildCheckpoint.ts +19 -0
- package/src/client/game/grid/regionalInputs.ts +34 -0
- package/src/client/game/grid/regionalRuntime.ts +518 -0
- package/src/client/game/grid/regionalView.ts +205 -0
- package/src/client/game/grid/regionalWorld.ts +609 -0
- package/src/client/game/grid/renderResidency.ts +95 -0
- package/src/client/game/grid/reveal.ts +163 -0
- package/src/client/game/grid/roadCull.ts +473 -0
- package/src/client/game/grid/roadGrain.ts +32 -0
- package/src/client/game/grid/roadGrain.worker.ts +20 -0
- package/src/client/game/grid/roadGrainPreparation.ts +45 -0
- package/src/client/game/grid/roadLook.ts +487 -0
- package/src/client/game/grid/roadLookPlatform.ts +196 -0
- package/src/client/game/grid/roadResources.ts +15 -0
- package/src/client/game/grid/roadSign.worker.ts +30 -0
- package/src/client/game/grid/roadSignPaint.ts +38 -0
- package/src/client/game/grid/roadSignPixels.ts +22 -0
- package/src/client/game/grid/roadSignPreparation.ts +45 -0
- package/src/client/game/grid/roadSky.ts +219 -0
- package/src/client/game/grid/roadSolid.ts +227 -0
- package/src/client/game/grid/roadTileArchive.ts +239 -0
- package/src/client/game/grid/roadTileBacking.ts +327 -0
- package/src/client/game/grid/roadTileCapture.worker.ts +14 -0
- package/src/client/game/grid/roadTileCaptureJob.ts +37 -0
- package/src/client/game/grid/roadTileCaptureWorker.ts +104 -0
- package/src/client/game/grid/roadTileCoarse.ts +28 -0
- package/src/client/game/grid/roadTileGeometry.ts +77 -0
- package/src/client/game/grid/roadTilePool.ts +157 -0
- package/src/client/game/grid/roadTileStream.ts +69 -0
- package/src/client/game/grid/roadTileWrite.worker.ts +24 -0
- package/src/client/game/grid/roadTileWriter.ts +67 -0
- package/src/client/game/grid/runtimeCost.ts +44 -0
- package/src/client/game/grid/seamLook.ts +177 -0
- package/src/client/game/grid/session.ts +1235 -0
- package/src/client/game/grid/shardfileFar.ts +88 -0
- package/src/client/game/grid/skinEnvelope.ts +135 -0
- package/src/client/game/grid/softWallLook.ts +116 -0
- package/src/client/game/grid/tileDecodeWorker.ts +24 -0
- package/src/client/game/grid/tileDecoder.ts +102 -0
- package/src/client/game/grid/titleOrder.ts +8 -0
- package/src/client/game/grid/titlePrefetchChoice.ts +35 -0
- package/src/client/game/grid/viewAdmissions.ts +36 -0
- package/src/client/game/grid/voidLook.ts +181 -0
- package/src/client/game/icons.merge.d.ts +49 -0
- package/src/client/game/icons.ts +240 -0
- package/src/client/game/identity.ts +28 -0
- package/src/client/game/inputContexts.ts +33 -0
- package/src/client/game/keyBindings.ts +37 -0
- package/src/client/game/loadout/actors.ts +15 -0
- package/src/client/game/loadout/claims.ts +728 -0
- package/src/client/game/loadout/cosmeticFinishes.ts +217 -0
- package/src/client/game/loadout/effects.ts +97 -0
- package/src/client/game/loadout/finishes.ts +60 -0
- package/src/client/game/loadout/held.ts +207 -0
- package/src/client/game/loadout/rangedPage.ts +142 -0
- package/src/client/game/looks/coverAppearance.ts +101 -0
- package/src/client/game/looks/daySky.ts +110 -0
- package/src/client/game/looks/forestGround.ts +49 -0
- package/src/client/game/looks/forestGroundInputs.ts +27 -0
- package/src/client/game/looks/forestRoofMask.ts +15 -0
- package/src/client/game/looks/forestWeather.ts +26 -0
- package/src/client/game/looks/graphDaySky.ts +245 -0
- package/src/client/game/looks/grassPresentation.ts +334 -0
- package/src/client/game/looks/keyedSky.ts +500 -0
- package/src/client/game/looks/lettering.ts +14 -0
- package/src/client/game/looks/overcast.ts +61 -0
- package/src/client/game/looks/paintedGroundMerge.ts +12 -0
- package/src/client/game/looks/paintedLook.ts +197 -0
- package/src/client/game/looks/painterlyLook.ts +259 -0
- package/src/client/game/looks/posedBufferPool.ts +67 -0
- package/src/client/game/looks/posedInstances.ts +199 -0
- package/src/client/game/looks/postGraphLook.ts +455 -0
- package/src/client/game/looks/riggedHulls.ts +451 -0
- package/src/client/game/looks/scaledPost.ts +236 -0
- package/src/client/game/looks/speciesBook.ts +224 -0
- package/src/client/game/looks/staticCapture.ts +225 -0
- package/src/client/game/looks/streamedCover.ts +330 -0
- package/src/client/game/looks/toonLighting.ts +28 -0
- package/src/client/game/looks/toonLook.ts +69 -0
- package/src/client/game/looks/toonSky.ts +60 -0
- package/src/client/game/looks/vertexWear.ts +49 -0
- package/src/client/game/loot/CoinBurst.ts +19 -0
- package/src/client/game/loot/CoinMotion.ts +169 -0
- package/src/client/game/loot/coinModel.ts +11 -0
- package/src/client/game/loot/coins.ts +21 -0
- package/src/client/game/loot/feed.ts +23 -0
- package/src/client/game/loot/loot.css +19 -0
- package/src/client/game/loot/runtime.ts +243 -0
- package/src/client/game/loot/tables.ts +30 -0
- package/src/client/game/loot/ui/CoinChip.ts +70 -0
- package/src/client/game/loot/ui/ShopPanel.ts +211 -0
- package/src/client/game/loot/ui/shop.css +42 -0
- package/src/client/game/mainMenu.css +177 -0
- package/src/client/game/mainMenu.ts +268 -0
- package/src/client/game/models/binarySource.ts +78 -0
- package/src/client/game/models/collectionDisplay.ts +133 -0
- package/src/client/game/models/collectionWall.ts +236 -0
- package/src/client/game/models/explorerCatalogue.ts +176 -0
- package/src/client/game/models/figureCatalogue.ts +172 -0
- package/src/client/game/models/fixedDraws.ts +178 -0
- package/src/client/game/models/heldGear.ts +76 -0
- package/src/client/game/models/interact.ts +107 -0
- package/src/client/game/models/islandLibrary.ts +179 -0
- package/src/client/game/models/kitFigureCard.ts +77 -0
- package/src/client/game/models/libraryModel.ts +67 -0
- package/src/client/game/models/mountedSpecimen.ts +45 -0
- package/src/client/game/models/pickupRows.ts +12 -0
- package/src/client/game/models/ropeDeckSite.ts +114 -0
- package/src/client/game/models/scenePartSpecimen.ts +102 -0
- package/src/client/game/models/sceneSpecimens.ts +103 -0
- package/src/client/game/models/socketRigCreature.ts +65 -0
- package/src/client/game/models/specimenCatalogue.ts +540 -0
- package/src/client/game/models/treeSet.ts +149 -0
- package/src/client/game/models/worldSceneCatalogue.ts +310 -0
- package/src/client/game/nativeItems.merge.d.ts +6 -0
- package/src/client/game/pageSaveKeys.ts +13 -0
- package/src/client/game/plugin/audio.ts +277 -0
- package/src/client/game/plugin/bakedGeometry.ts +103 -0
- package/src/client/game/plugin/bladeMoves.ts +117 -0
- package/src/client/game/plugin/bossStorm.ts +40 -0
- package/src/client/game/plugin/clientChannelView.ts +135 -0
- package/src/client/game/plugin/context.ts +198 -0
- package/src/client/game/plugin/followedMovers.ts +184 -0
- package/src/client/game/plugin/geometry.ts +2083 -0
- package/src/client/game/plugin/headless.ts +127 -0
- package/src/client/game/plugin/heldEquipment.ts +208 -0
- package/src/client/game/plugin/heldFirearm.ts +395 -0
- package/src/client/game/plugin/heldRecipe.ts +43 -0
- package/src/client/game/plugin/heldTool.ts +166 -0
- package/src/client/game/plugin/moverEvents.merge.d.ts +6 -0
- package/src/client/game/plugin/moverViews.ts +114 -0
- package/src/client/game/plugin/placeholderGeometry.ts +40 -0
- package/src/client/game/plugin/scene.ts +290 -0
- package/src/client/game/plugin/shaderFamily.ts +225 -0
- package/src/client/game/plugin/ui.ts +1511 -0
- package/src/client/game/plugin/weaponFamily.ts +779 -0
- package/src/client/game/population/netCounts.ts +12 -0
- package/src/client/game/population/pageAir.ts +37 -0
- package/src/client/game/population/pageLife.ts +289 -0
- package/src/client/game/population/pageReturns.ts +17 -0
- package/src/client/game/population/productCreatures.ts +71 -0
- package/src/client/game/population/projection.ts +227 -0
- package/src/client/game/population/rowSpecies.ts +15 -0
- package/src/client/game/population/signals.ts +24 -0
- package/src/client/game/population/speciesViewSlots.ts +55 -0
- package/src/client/game/population/wildlifeFeature.ts +208 -0
- package/src/client/game/population.merge.d.ts +9 -0
- package/src/client/game/practice/course.ts +154 -0
- package/src/client/game/practice/numericCourse.ts +35 -0
- package/src/client/game/practice/registration.ts +17 -0
- package/src/client/game/practice/scene.ts +47 -0
- package/src/client/game/quest/carriedProp.ts +113 -0
- package/src/client/game/quest/chapter.ts +355 -0
- package/src/client/game/quest/chapterDirector.ts +255 -0
- package/src/client/game/quest/chapterView.ts +165 -0
- package/src/client/game/quest/continuation.ts +53 -0
- package/src/client/game/quest/contractBoardPage.ts +85 -0
- package/src/client/game/quest/declaredPage.ts +199 -0
- package/src/client/game/quest/elitePage.ts +115 -0
- package/src/client/game/quest/figureOrbit.ts +32 -0
- package/src/client/game/quest/figures.ts +259 -0
- package/src/client/game/quest/finishedAfterSeen.ts +20 -0
- package/src/client/game/quest/hints.ts +90 -0
- package/src/client/game/quest/pageComposition.ts +331 -0
- package/src/client/game/quest/pageDoors.ts +25 -0
- package/src/client/game/quest/pageFacets.ts +76 -0
- package/src/client/game/quest/pageReference.ts +17 -0
- package/src/client/game/quest/presentation.css +4 -0
- package/src/client/game/quest/questPageViews.ts +168 -0
- package/src/client/game/quest/reward.ts +48 -0
- package/src/client/game/quest/story.ts +161 -0
- package/src/client/game/quest/trader.ts +176 -0
- package/src/client/game/riding/client.ts +373 -0
- package/src/client/game/riding/hud.ts +255 -0
- package/src/client/game/riding/mount.ts +317 -0
- package/src/client/game/riding/reins.ts +177 -0
- package/src/client/game/riding/ride.css +70 -0
- package/src/client/game/riding/seatedFigure.ts +78 -0
- package/src/client/game/saves.css +34 -0
- package/src/client/game/savesSettings.ts +189 -0
- package/src/client/game/session/clockSettings.ts +66 -0
- package/src/client/game/session/context.ts +61 -0
- package/src/client/game/session/crashResume.ts +36 -0
- package/src/client/game/session/data.ts +101 -0
- package/src/client/game/session/entryReadiness.ts +13 -0
- package/src/client/game/session/exitToTitle.ts +19 -0
- package/src/client/game/session/finish.ts +414 -0
- package/src/client/game/session/hudAccent.ts +30 -0
- package/src/client/game/session/loadout.ts +176 -0
- package/src/client/game/session/play.ts +824 -0
- package/src/client/game/session/positions.ts +8 -0
- package/src/client/game/session/readyFrame.ts +10 -0
- package/src/client/game/session/session.ts +193 -0
- package/src/client/game/session/settlePrograms.ts +29 -0
- package/src/client/game/session/titlePreparation.ts +43 -0
- package/src/client/game/session/world.ts +168 -0
- package/src/client/game/shard/declaredEntry.ts +44 -0
- package/src/client/game/shard/declaredPlumbing.ts +80 -0
- package/src/client/game/shard/declaredTargets.ts +64 -0
- package/src/client/game/shard/declaredUi.ts +23 -0
- package/src/client/game/shard/discovery.ts +80 -0
- package/src/client/game/shard/list.ts +26 -0
- package/src/client/game/shard/load.ts +94 -0
- package/src/client/game/shard/manifest.ts +910 -0
- package/src/client/game/shard/pageBoot.ts +52 -0
- package/src/client/game/shard/pagePolicy.ts +17 -0
- package/src/client/game/shard/registry.ts +74 -0
- package/src/client/game/shard/retainedHooks.ts +204 -0
- package/src/client/game/shard/scopedRuntime.ts +68 -0
- package/src/client/game/shard/spec.ts +69 -0
- package/src/client/game/shard/titleList.ts +86 -0
- package/src/client/game/shardfile/accent.ts +5 -0
- package/src/client/game/shardfile/assetCache.ts +46 -0
- package/src/client/game/shardfile/audioCatalogue.ts +16 -0
- package/src/client/game/shardfile/bakedKinds.ts +313 -0
- package/src/client/game/shardfile/bakedTiles.ts +253 -0
- package/src/client/game/shardfile/buildingCloud.ts +27 -0
- package/src/client/game/shardfile/calibrationScripts.ts +30 -0
- package/src/client/game/shardfile/caveInterior.ts +162 -0
- package/src/client/game/shardfile/client.ts +671 -0
- package/src/client/game/shardfile/clientAmbientLife.ts +31 -0
- package/src/client/game/shardfile/clientAssets.ts +163 -0
- package/src/client/game/shardfile/clientBossFight.ts +39 -0
- package/src/client/game/shardfile/clientBossTelegraph.ts +43 -0
- package/src/client/game/shardfile/clientCatalogue.ts +44 -0
- package/src/client/game/shardfile/clientCosmeticFinishes.ts +37 -0
- package/src/client/game/shardfile/clientCues.ts +22 -0
- package/src/client/game/shardfile/clientEliteConstruction.ts +44 -0
- package/src/client/game/shardfile/clientEliteEntry.ts +33 -0
- package/src/client/game/shardfile/clientEntryBinds.ts +32 -0
- package/src/client/game/shardfile/clientFinds.ts +20 -0
- package/src/client/game/shardfile/clientForestPage.ts +144 -0
- package/src/client/game/shardfile/clientGraphs.ts +319 -0
- package/src/client/game/shardfile/clientHeldMelee.ts +82 -0
- package/src/client/game/shardfile/clientItems.ts +25 -0
- package/src/client/game/shardfile/clientLibrary.ts +71 -0
- package/src/client/game/shardfile/clientMaterials.ts +296 -0
- package/src/client/game/shardfile/clientMeadow.ts +30 -0
- package/src/client/game/shardfile/clientModules.ts +24 -0
- package/src/client/game/shardfile/clientMoverOwners.ts +80 -0
- package/src/client/game/shardfile/clientNativeBook.ts +38 -0
- package/src/client/game/shardfile/clientPlaceSets.ts +74 -0
- package/src/client/game/shardfile/clientPlan.ts +529 -0
- package/src/client/game/shardfile/clientPlayerEnter.ts +22 -0
- package/src/client/game/shardfile/clientPopulation.ts +49 -0
- package/src/client/game/shardfile/clientPopulationProjection.ts +28 -0
- package/src/client/game/shardfile/clientPost.ts +94 -0
- package/src/client/game/shardfile/clientPropMaterials.ts +100 -0
- package/src/client/game/shardfile/clientQuestComposition.ts +87 -0
- package/src/client/game/shardfile/clientQuestPage.ts +98 -0
- package/src/client/game/shardfile/clientRecipes.ts +76 -0
- package/src/client/game/shardfile/clientResidency.ts +29 -0
- package/src/client/game/shardfile/clientReturnModules.ts +25 -0
- package/src/client/game/shardfile/clientRuntimeHooks.ts +66 -0
- package/src/client/game/shardfile/clientSceneHandles.ts +19 -0
- package/src/client/game/shardfile/clientScripts.ts +100 -0
- package/src/client/game/shardfile/clientSkins.ts +183 -0
- package/src/client/game/shardfile/clientSource.ts +221 -0
- package/src/client/game/shardfile/clientSpeciesProgram.ts +45 -0
- package/src/client/game/shardfile/clientSplatTerrain.ts +99 -0
- package/src/client/game/shardfile/clientStealthEntry.ts +72 -0
- package/src/client/game/shardfile/clientTargets.ts +73 -0
- package/src/client/game/shardfile/clientTimedEncounters.ts +42 -0
- package/src/client/game/shardfile/clientTrails.ts +42 -0
- package/src/client/game/shardfile/clientViewProgram.ts +101 -0
- package/src/client/game/shardfile/clientViews.ts +211 -0
- package/src/client/game/shardfile/clientWater.ts +108 -0
- package/src/client/game/shardfile/clientWaterSurfaces.ts +88 -0
- package/src/client/game/shardfile/clientWorker.ts +621 -0
- package/src/client/game/shardfile/clientWorldAssembly.ts +129 -0
- package/src/client/game/shardfile/constructionCheckpoint.ts +31 -0
- package/src/client/game/shardfile/controlFiles.ts +41 -0
- package/src/client/game/shardfile/controlRefinement.ts +229 -0
- package/src/client/game/shardfile/declaredTalks.ts +114 -0
- package/src/client/game/shardfile/emptyEquipment.ts +19 -0
- package/src/client/game/shardfile/emptyLook.ts +26 -0
- package/src/client/game/shardfile/enteredTileReadout.ts +27 -0
- package/src/client/game/shardfile/entryTransport.ts +222 -0
- package/src/client/game/shardfile/farStandIn.ts +79 -0
- package/src/client/game/shardfile/forestPage.ts +289 -0
- package/src/client/game/shardfile/groundMerge.ts +232 -0
- package/src/client/game/shardfile/heldClaimsEntry.ts +34 -0
- package/src/client/game/shardfile/homeBuildCache.ts +114 -0
- package/src/client/game/shardfile/homeGeometrySnapshot.ts +92 -0
- package/src/client/game/shardfile/hybrid.ts +537 -0
- package/src/client/game/shardfile/hybridPresentation.ts +16 -0
- package/src/client/game/shardfile/islandBook.ts +87 -0
- package/src/client/game/shardfile/itemModels.ts +78 -0
- package/src/client/game/shardfile/legacyAsset.ts +30 -0
- package/src/client/game/shardfile/lentLooks.ts +210 -0
- package/src/client/game/shardfile/lightEmitters.ts +100 -0
- package/src/client/game/shardfile/livingBuildings.ts +202 -0
- package/src/client/game/shardfile/look.ts +23 -0
- package/src/client/game/shardfile/mapImage.ts +49 -0
- package/src/client/game/shardfile/pageItems.ts +57 -0
- package/src/client/game/shardfile/pagePreparation.ts +40 -0
- package/src/client/game/shardfile/pageWater.ts +29 -0
- package/src/client/game/shardfile/paintedWorldStages.ts +132 -0
- package/src/client/game/shardfile/portalRideBinding.ts +62 -0
- package/src/client/game/shardfile/preparationReads.ts +61 -0
- package/src/client/game/shardfile/preparationTiming.ts +115 -0
- package/src/client/game/shardfile/presentation.ts +36 -0
- package/src/client/game/shardfile/product.ts +718 -0
- package/src/client/game/shardfile/productCacheCompletion.ts +53 -0
- package/src/client/game/shardfile/productChecks.ts +40 -0
- package/src/client/game/shardfile/productCost.ts +422 -0
- package/src/client/game/shardfile/productGround.ts +60 -0
- package/src/client/game/shardfile/productNavigation.ts +18 -0
- package/src/client/game/shardfile/productPreflight.ts +12 -0
- package/src/client/game/shardfile/questWorld.ts +17 -0
- package/src/client/game/shardfile/readAsset.ts +44 -0
- package/src/client/game/shardfile/reusableWholeLibrary.ts +102 -0
- package/src/client/game/shardfile/runtimeProduct.ts +396 -0
- package/src/client/game/shardfile/sceneBakeFiles.ts +22 -0
- package/src/client/game/shardfile/sceneBuffers.ts +207 -0
- package/src/client/game/shardfile/sceneDraws.ts +90 -0
- package/src/client/game/shardfile/sceneDressing.ts +456 -0
- package/src/client/game/shardfile/sceneHandles.ts +170 -0
- package/src/client/game/shardfile/sceneInputs.ts +21 -0
- package/src/client/game/shardfile/sceneInstances.ts +67 -0
- package/src/client/game/shardfile/sceneMotion.ts +161 -0
- package/src/client/game/shardfile/scenePools.ts +40 -0
- package/src/client/game/shardfile/sceneProfile.ts +12 -0
- package/src/client/game/shardfile/sceneRigFiles.ts +30 -0
- package/src/client/game/shardfile/sceneScatterPages.ts +47 -0
- package/src/client/game/shardfile/sceneSources.ts +153 -0
- package/src/client/game/shardfile/serverRoute.ts +38 -0
- package/src/client/game/shardfile/skinLayerPlayback.ts +67 -0
- package/src/client/game/shardfile/skinPlayback.ts +138 -0
- package/src/client/game/shardfile/slabLibrary.ts +203 -0
- package/src/client/game/shardfile/stillImage.ts +19 -0
- package/src/client/game/shardfile/streamingView.ts +78 -0
- package/src/client/game/shardfile/tileBufferedDraws.ts +49 -0
- package/src/client/game/shardfile/tileContent.ts +564 -0
- package/src/client/game/shardfile/tileDriver.ts +462 -0
- package/src/client/game/shardfile/tileEntry.ts +18 -0
- package/src/client/game/shardfile/tiledMesh.ts +146 -0
- package/src/client/game/shardfile/water.ts +8 -0
- package/src/client/game/shardfile/weatherFields.ts +31 -0
- package/src/client/game/shardfile/wholeGeometryPieces.ts +101 -0
- package/src/client/game/shardfile/wholeLibrary.ts +47 -0
- package/src/client/game/shardfile/wholeRefinementCover.ts +78 -0
- package/src/client/game/shardfile/wirePage.ts +260 -0
- package/src/client/game/shardfile/worldAssembly.ts +531 -0
- package/src/client/game/shardfile/worldBuildYield.ts +10 -0
- package/src/client/game/shardfile/worldEntry.ts +117 -0
- package/src/client/game/shardfile/worldSceneBatch.ts +105 -0
- package/src/client/game/shardfile/worldSceneGeometry.ts +171 -0
- package/src/client/game/shardfile/worldSceneMaterials.ts +90 -0
- package/src/client/game/shardfile/worldScenePlacement.ts +364 -0
- package/src/client/game/shardfile/worldScenePlacementPages.ts +61 -0
- package/src/client/game/shardfile/worldSceneReads.ts +83 -0
- package/src/client/game/shardfile/worldSceneStepSources.ts +69 -0
- package/src/client/game/shardfile/worldSceneSurface.ts +108 -0
- package/src/client/game/shardfile/worldSceneTextures.ts +134 -0
- package/src/client/game/shardfile/worldSceneUniforms.ts +17 -0
- package/src/client/game/shardfile/worldSceneWeld.ts +339 -0
- package/src/client/game/shardfile/worldScenes.ts +760 -0
- package/src/client/game/shardfile/worldUpdates.ts +149 -0
- package/src/client/game/stealth/controller.ts +115 -0
- package/src/client/game/stealth/stealth.css +70 -0
- package/src/client/game/summary.css +8 -0
- package/src/client/game/summary.ts +67 -0
- package/src/client/game/systems/audio/crossbowSounds.ts +71 -0
- package/src/client/game/systems/audio/firearmSounds.ts +43 -0
- package/src/client/game/systems/audio/meleeSounds.ts +40 -0
- package/src/client/game/systems/audio/silentScore.ts +6 -0
- package/src/client/game/systems/effects/starter.generated.ts +2 -0
- package/src/client/game/systems/effects/status.css +3 -0
- package/src/client/game/systems/effects/view.ts +35 -0
- package/src/client/game/systems/items/declaredSword.ts +149 -0
- package/src/client/game/systems/looks/fogProgram.ts +18 -0
- package/src/client/game/systems/looks/particles.ts +407 -0
- package/src/client/game/systems/looks/rainCurtain.ts +50 -0
- package/src/client/game/systems/looks/surfaceLooks.ts +138 -0
- package/src/client/game/systems/looks/trample.ts +139 -0
- package/src/client/game/systems/looks/waterSurface.ts +179 -0
- package/src/client/game/systems/npc/figureRows.ts +169 -0
- package/src/client/game/systems/npc/figureSkins.ts +130 -0
- package/src/client/game/systems/npc/kitFigure.ts +127 -0
- package/src/client/game/systems/npc/npcRig.ts +217 -0
- package/src/client/game/systems/npc/standingFigure.ts +111 -0
- package/src/client/game/systems/props/interact.ts +236 -0
- package/src/client/game/systems/species/bear.ts +30 -0
- package/src/client/game/systems/species/boar.ts +28 -0
- package/src/client/game/systems/species/install.ts +18 -0
- package/src/client/game/systems/species/view/bear.ts +246 -0
- package/src/client/game/systems/species/view/boar.ts +249 -0
- package/src/client/game/systems/tools/hoverboard.ts +107 -0
- package/src/client/game/systems/viewmodel/armAliases.json +24 -0
- package/src/client/game/systems/viewmodel/armClips.ts +8 -0
- package/src/client/game/systems/viewmodel/armRig.ts +293 -0
- package/src/client/game/systems/viewmodel/clips.generated.ts +2 -0
- package/src/client/game/systems/viewmodel/heldView.ts +458 -0
- package/src/client/game/systems/viewmodel/rigArms.ts +280 -0
- package/src/client/game/titleAssets.ts +9 -0
- package/src/client/game/titleDeck.ts +381 -0
- package/src/client/game/travel/travel.ts +99 -0
- package/src/client/game/ui/dataPanels.ts +95 -0
- package/src/client/game/ui/panelTemplates.ts +71 -0
- package/src/client/game/ui/panels.ts +109 -0
- package/src/client/game/upgrade.css +12 -0
- package/src/client/game/weapons/Bow.ts +14 -0
- package/src/client/game/weapons/Sword.ts +30 -0
- package/src/client/game/weapons/arcPower.ts +203 -0
- package/src/client/game/weapons/heldLauncher.ts +452 -0
- package/src/client/game/weapons/heldPolearm.ts +491 -0
- package/src/client/game/weapons/mountedBlade.ts +122 -0
- package/src/client/game/weather/forest.ts +281 -0
- package/src/client/game/weather/netClimate.ts +88 -0
- package/src/client/game/weather/pageSky.ts +31 -0
- package/src/client/game/weather/rainPresentation.ts +246 -0
- package/src/client/game/weather/weatherEvents.merge.d.ts +8 -0
- package/src/client/game/whatsNew.ts +31 -0
- package/src/client/game/whatsNewBanner.ts +125 -0
- package/src/client/host/online/chatCorner.ts +46 -0
- package/src/client/host/online/chatLines.ts +213 -0
- package/src/client/host/online/doctor.ts +321 -0
- package/src/client/host/online/doctorPage.ts +26 -0
- package/src/client/host/online/doctorView.ts +144 -0
- package/src/client/host/online/linkScreens.ts +300 -0
- package/src/client/host/online/reconnectStrip.ts +26 -0
- package/src/client/host/online/release.ts +28 -0
- package/src/client/host/online/shell.ts +312 -0
- package/src/client/host/online/voice.ts +468 -0
- package/src/client/host/online/voiceUi.ts +186 -0
- package/src/client/host/standalone/shell.ts +169 -0
- package/src/client/index.html +12 -0
- package/src/client/main.tsx +10 -0
- package/src/client/side.ts +2 -0
- package/src/client/tsconfig.json +13 -0
- package/src/cook/game/brotliSizeCache.d.mts +5 -0
- package/src/cook/game/brotliSizeCache.mjs +59 -0
- package/src/cook/game/contentNamed.ts +6 -0
- package/src/cook/game/cookJob.ts +103 -0
- package/src/cook/game/cookWorker.ts +413 -0
- package/src/cook/game/encodedBytes.ts +51 -0
- package/src/cook/game/engineHalf.ts +47 -0
- package/src/cook/game/entryDownloads.ts +36 -0
- package/src/cook/game/entryReadSet.ts +67 -0
- package/src/cook/game/entryTotals.ts +320 -0
- package/src/cook/game/fenceReads.ts +218 -0
- package/src/cook/game/gridCollision.ts +53 -0
- package/src/cook/game/gridEntryDownloads.ts +33 -0
- package/src/cook/game/gridStripPages.ts +239 -0
- package/src/cook/game/installedRuntimeReads.ts +48 -0
- package/src/cook/game/packStore.ts +120 -0
- package/src/cook/game/portableEncode.ts +7 -0
- package/src/cook/game/productTarball.ts +18 -0
- package/src/cook/game/shardCook.ts +350 -0
- package/src/cook/game/spawnParts.ts +294 -0
- package/src/cook/game/stripPack.ts +31 -0
- package/src/cook/side.ts +2 -0
- package/src/e2e/playwright.config.ts +60 -0
- package/src/e2e/smoke/game.ts +217 -0
- package/src/e2e/smoke/page-globals.d.ts +37 -0
- package/src/e2e/smoke/template2.spec.ts +146 -0
- package/src/e2e/status.spec.ts +13 -0
- package/src/scripts/ask-new.sh +29 -0
- package/src/scripts/asks.mjs +142 -0
- package/src/scripts/check-sides.mjs +70 -0
- package/src/scripts/herdr-prompt.sh +34 -0
- package/src/scripts/herdr-question-open.sh +67 -0
- package/src/scripts/md-wrap.mjs +229 -0
- package/src/server/app.ts +19 -0
- package/src/server/engine/ai/CreatureBrain.ts +23 -0
- package/src/server/engine/ai/bossContenders.ts +101 -0
- package/src/server/engine/ai/burstFlyer.ts +31 -0
- package/src/server/engine/ai/challengeGrazer.ts +31 -0
- package/src/server/engine/ai/eliteContinuation.ts +141 -0
- package/src/server/engine/ai/eliteKernels.ts +187 -0
- package/src/server/engine/ai/eliteLifecycle.ts +126 -0
- package/src/server/engine/ai/eliteRoster.ts +357 -0
- package/src/server/engine/ai/grazer.ts +1360 -0
- package/src/server/engine/ai/guardian.ts +20 -0
- package/src/server/engine/ai/guardianPolicy.ts +264 -0
- package/src/server/engine/ai/herd.ts +17 -0
- package/src/server/engine/ai/hunt.ts +46 -0
- package/src/server/engine/ai/moves.ts +202 -0
- package/src/server/engine/ai/orbitDiver.ts +33 -0
- package/src/server/engine/ai/pack.ts +29 -0
- package/src/server/engine/ai/patrolDiver.ts +31 -0
- package/src/server/engine/ai/perchHunter.ts +20 -0
- package/src/server/engine/ai/phases.ts +121 -0
- package/src/server/engine/ai/platform.ts +140 -0
- package/src/server/engine/ai/ramGrazer.ts +31 -0
- package/src/server/engine/ai/scriptBrain.ts +147 -0
- package/src/server/engine/ai/skirmisher.ts +20 -0
- package/src/server/engine/ai/species.ts +33 -0
- package/src/server/engine/combat/EquipmentPickup.ts +28 -0
- package/src/server/engine/combat/contactWeapon.ts +251 -0
- package/src/server/engine/combat/damageBook.ts +45 -0
- package/src/server/engine/combat/rewind.ts +7 -0
- package/src/server/engine/entities/AnimalManager.ts +752 -0
- package/src/server/engine/entities/bodyClear.ts +47 -0
- package/src/server/engine/entities/creatureRefill.ts +119 -0
- package/src/server/engine/entities/killHeight.ts +18 -0
- package/src/server/engine/level/context.ts +111 -0
- package/src/server/engine/net/chat.ts +97 -0
- package/src/server/engine/net/combatWire.ts +49 -0
- package/src/server/engine/net/commandQueue.ts +95 -0
- package/src/server/engine/net/handles.ts +74 -0
- package/src/server/engine/net/hitHistory.ts +114 -0
- package/src/server/engine/net/ledgerBook.ts +65 -0
- package/src/server/engine/net/room.ts +560 -0
- package/src/server/engine/net/serverClock.ts +43 -0
- package/src/server/engine/net/simWorld.ts +131 -0
- package/src/server/engine/net/tiers.ts +14 -0
- package/src/server/engine/physics/edgeEntries.ts +40 -0
- package/src/server/engine/physics/rapierBindings.ts +4 -0
- package/src/server/engine/saves/forwardedStorage.ts +43 -0
- package/src/server/engine/script/composition.ts +219 -0
- package/src/server/engine/script/decision.ts +573 -0
- package/src/server/engine/script/inputInboxV2.ts +116 -0
- package/src/server/engine/script/lane.ts +185 -0
- package/src/server/engine/script/ownedSimBatchV2.ts +205 -0
- package/src/server/engine/script/queries.ts +37 -0
- package/src/server/engine/script/queriesV2.ts +149 -0
- package/src/server/engine/script/simBatchV2.ts +125 -0
- package/src/server/engine/sim/playerSim.ts +443 -0
- package/src/server/engine/sim/respawn.ts +74 -0
- package/src/server/engine/sim/restore.ts +37 -0
- package/src/server/engine/sim.ts +711 -0
- package/src/server/game/animation/limbPopulation.ts +138 -0
- package/src/server/game/bake/entryways.ts +186 -0
- package/src/server/game/boss/arenaRoomEntry.ts +97 -0
- package/src/server/game/boss/arenaRoomFight.ts +103 -0
- package/src/server/game/boss/arenaRoomNative.ts +142 -0
- package/src/server/game/boss/arenaWords.ts +46 -0
- package/src/server/game/boss/bounty.ts +37 -0
- package/src/server/game/boss/captainNative.ts +122 -0
- package/src/server/game/boss/continuation.ts +37 -0
- package/src/server/game/boss/headlessArenaPose.ts +40 -0
- package/src/server/game/boss/headlessArenaViews.ts +54 -0
- package/src/server/game/boss/headlessCloudBody.ts +93 -0
- package/src/server/game/boss/native.ts +220 -0
- package/src/server/game/boss/nativeArenaSand.ts +93 -0
- package/src/server/game/boss/nativeArenaSeal.ts +26 -0
- package/src/server/game/boss/nativeWake.ts +50 -0
- package/src/server/game/boss/openArenaNative.ts +200 -0
- package/src/server/game/boss/openArenaRoom.ts +69 -0
- package/src/server/game/boss/openArenaState.ts +25 -0
- package/src/server/game/boss/patrolNative.ts +286 -0
- package/src/server/game/boss/roaming.ts +77 -0
- package/src/server/game/boss/slotHeights.ts +103 -0
- package/src/server/game/boss/slotsNative.ts +175 -0
- package/src/server/game/boss/windEliteNative.ts +139 -0
- package/src/server/game/grapple/native.ts +181 -0
- package/src/server/game/grid/durability.ts +166 -0
- package/src/server/game/grid/room.ts +53 -0
- package/src/server/game/grid/roomNet.ts +85 -0
- package/src/server/game/grid/simulation.ts +345 -0
- package/src/server/game/items.merge.d.ts +7 -0
- package/src/server/game/loadout/nativeAmmunition.ts +139 -0
- package/src/server/game/loadout/ownedEffects.ts +68 -0
- package/src/server/game/loot/harvest.ts +43 -0
- package/src/server/game/loot/personal.ts +70 -0
- package/src/server/game/loot/playerOwned.ts +235 -0
- package/src/server/game/plugin/bossPhase.ts +904 -0
- package/src/server/game/plugin/brain.ts +1325 -0
- package/src/server/game/plugin/mover.ts +601 -0
- package/src/server/game/plugin/nativeItems.ts +437 -0
- package/src/server/game/plugin/nativeRewind.ts +37 -0
- package/src/server/game/plugin/nativeSwept.ts +249 -0
- package/src/server/game/plugin/playerSeats.ts +62 -0
- package/src/server/game/plugin/scriptSeats.ts +89 -0
- package/src/server/game/plugin/simulation.ts +1623 -0
- package/src/server/game/population/actorProjectionV2.ts +276 -0
- package/src/server/game/population/actors.ts +136 -0
- package/src/server/game/population/directedLaw.ts +69 -0
- package/src/server/game/population/encounterBook.ts +78 -0
- package/src/server/game/population/encounterIntake.ts +78 -0
- package/src/server/game/population/environment.ts +86 -0
- package/src/server/game/population/mixedRoster.ts +353 -0
- package/src/server/game/population/nativeBake.ts +202 -0
- package/src/server/game/population/nativeManager.ts +426 -0
- package/src/server/game/population/nativeReturns.ts +99 -0
- package/src/server/game/population/perchBody.ts +97 -0
- package/src/server/game/population/projectedSites.ts +41 -0
- package/src/server/game/population/relations.ts +45 -0
- package/src/server/game/population/roster.ts +259 -0
- package/src/server/game/population/scriptStrikes.ts +67 -0
- package/src/server/game/population/shelter.ts +193 -0
- package/src/server/game/population/signals.ts +9 -0
- package/src/server/game/population/spawnScript.ts +797 -0
- package/src/server/game/population/specCatalogue.ts +11 -0
- package/src/server/game/quest/bodyOps.ts +253 -0
- package/src/server/game/quest/chapterRecords.ts +97 -0
- package/src/server/game/quest/eliteDrops.ts +36 -0
- package/src/server/game/quest/eliteFeature.ts +141 -0
- package/src/server/game/quest/killSteps.ts +34 -0
- package/src/server/game/quest/nativeBodyScripts.ts +29 -0
- package/src/server/game/quest/nativeChapter.ts +80 -0
- package/src/server/game/quest/nativeComposition.ts +548 -0
- package/src/server/game/quest/nativeEntry.ts +128 -0
- package/src/server/game/quest/nativeInputs.ts +29 -0
- package/src/server/game/quest/nativeSecret.ts +80 -0
- package/src/server/game/quest/serverChapters.ts +192 -0
- package/src/server/game/quest/serverDoors.ts +89 -0
- package/src/server/game/quest/serverPlaces.ts +32 -0
- package/src/server/game/riding/native.ts +362 -0
- package/src/server/game/riding/nativePopulation.ts +384 -0
- package/src/server/game/riding/nativeTaming.ts +331 -0
- package/src/server/game/riding/pastureController.ts +131 -0
- package/src/server/game/riding/roster.ts +108 -0
- package/src/server/game/riding/wildRefill.ts +37 -0
- package/src/server/game/roomRespawn.ts +60 -0
- package/src/server/game/shard/declaredEncounters.ts +22 -0
- package/src/server/game/shard/manifest-closure.generated.json +683 -0
- package/src/server/game/shard/portShares.generated.ts +2 -0
- package/src/server/game/shard/world.ts +5 -0
- package/src/server/game/shardfile/borrowedDecisions.ts +281 -0
- package/src/server/game/shardfile/bossRow.ts +236 -0
- package/src/server/game/shardfile/brainRuntime.ts +162 -0
- package/src/server/game/shardfile/decisions.ts +597 -0
- package/src/server/game/shardfile/declaredClimate.ts +22 -0
- package/src/server/game/shardfile/declaredKitItems.ts +243 -0
- package/src/server/game/shardfile/declaredTalks.ts +52 -0
- package/src/server/game/shardfile/groupRuntime.ts +302 -0
- package/src/server/game/shardfile/homeKeeper.ts +565 -0
- package/src/server/game/shardfile/nativeAssembly.ts +102 -0
- package/src/server/game/shardfile/nativeAssemblyHosts.ts +301 -0
- package/src/server/game/shardfile/nativeAssemblyInput.ts +68 -0
- package/src/server/game/shardfile/nativePlan.ts +28 -0
- package/src/server/game/shardfile/nativeRuntimeLoans.ts +52 -0
- package/src/server/game/shardfile/phasedBossRoaming.ts +427 -0
- package/src/server/game/shardfile/portalLinkProof.ts +66 -0
- package/src/server/game/shardfile/scriptComposition.ts +57 -0
- package/src/server/game/shardfile/scripts.ts +56 -0
- package/src/server/game/shardfile/statusEffects.ts +68 -0
- package/src/server/game/stealth/nativeStealth.ts +74 -0
- package/src/server/game/weapons/nativeHeld.ts +333 -0
- package/src/server/game/weather/continuation.ts +97 -0
- package/src/server/game/weather/reactions.ts +219 -0
- package/src/server/game/weather/wire.ts +42 -0
- package/src/server/host/bake/headlessWorker.ts +132 -0
- package/src/server/host/dedicated/cellHost.ts +171 -0
- package/src/server/host/dedicated/cellProtocol.ts +64 -0
- package/src/server/host/dedicated/cellWorker.ts +33 -0
- package/src/server/host/dedicated/crossing.ts +44 -0
- package/src/server/host/dedicated/dedicatedRoom.ts +419 -0
- package/src/server/host/dedicated/doorTrust.ts +55 -0
- package/src/server/host/dedicated/gridCells.ts +53 -0
- package/src/server/host/dedicated/main.ts +134 -0
- package/src/server/host/dedicated/packReader.ts +68 -0
- package/src/server/host/dedicated/playerDoc.ts +96 -0
- package/src/server/host/dedicated/playerSaves.ts +62 -0
- package/src/server/host/dedicated/playerStore.ts +82 -0
- package/src/server/host/dedicated/playtest.ts +41 -0
- package/src/server/host/dedicated/releaseFile.ts +71 -0
- package/src/server/host/dedicated/roadRoom.ts +151 -0
- package/src/server/host/dedicated/saves/database.ts +15 -0
- package/src/server/host/dedicated/saves/migrate.ts +26 -0
- package/src/server/host/dedicated/saves/migrations/0001-saves.sql +48 -0
- package/src/server/host/dedicated/saves/migrations/0002-report-delivery.sql +3 -0
- package/src/server/host/dedicated/saves/migrations/0003-place.sql +11 -0
- package/src/server/host/dedicated/saves/migrations/0004-names.sql +4 -0
- package/src/server/host/dedicated/saves/migrations/0005-profile.sql +41 -0
- package/src/server/host/dedicated/saves/names.ts +56 -0
- package/src/server/host/dedicated/saves/pgDatabase.ts +43 -0
- package/src/server/host/dedicated/saves/profile.ts +44 -0
- package/src/server/host/dedicated/saves/reportQueue.ts +49 -0
- package/src/server/host/dedicated/saves/saveStore.ts +117 -0
- package/src/server/host/dedicated/saves/writeQueue.ts +94 -0
- package/src/server/host/dedicated/seats.ts +12 -0
- package/src/server/host/dedicated/serverReports.ts +81 -0
- package/src/server/host/dedicated/serverSentry.ts +124 -0
- package/src/server/host/dedicated/shopGate.ts +36 -0
- package/src/server/host/dedicated/socketPump.ts +74 -0
- package/src/server/host/dedicated/socketTransport.ts +123 -0
- package/src/server/host/dedicated/voiceRelay.ts +138 -0
- package/src/server/host/dedicated/workerTable.ts +29 -0
- package/src/server/host/dedicated/world.ts +428 -0
- package/src/server/host/headless.ts +280 -0
- package/src/server/host/headlessProduct.ts +52 -0
- package/src/server/host/headlessRuntime.ts +354 -0
- package/src/server/host/ropeDecks.ts +69 -0
- package/src/server/host/standalone/cellWorld.ts +188 -0
- package/src/server/host/standalone/continuation.ts +58 -0
- package/src/server/host/standalone/fallFloor.ts +83 -0
- package/src/server/host/standalone/gridServer.ts +282 -0
- package/src/server/host/standalone/ledgerFilings.ts +33 -0
- package/src/server/host/standalone/progressWatch.ts +90 -0
- package/src/server/host/standalone/roadWorld.ts +49 -0
- package/src/server/host/standalone/serverHost.ts +132 -0
- package/src/server/host/standalone/serverProduct.ts +149 -0
- package/src/server/host/standalone/serverRuntime.ts +43 -0
- package/src/server/host/standalone/serverWorker.ts +22 -0
- package/src/server/host/tickWorkerHost.ts +250 -0
- package/src/server/host/tickWorkerLoop.ts +123 -0
- package/src/server/serve.ts +49 -0
- package/src/server/side.ts +2 -0
- package/src/shared/engine/ai/BossBrain.ts +287 -0
- package/src/shared/engine/ai/GroupBrain.ts +152 -0
- package/src/shared/engine/ai/ambientFlight.ts +60 -0
- package/src/shared/engine/ai/ambientFlock.ts +297 -0
- package/src/shared/engine/ai/ambientForager.ts +289 -0
- package/src/shared/engine/ai/bossScale.ts +8 -0
- package/src/shared/engine/ai/director.ts +94 -0
- package/src/shared/engine/ai/diver.ts +540 -0
- package/src/shared/engine/ai/eliteScript.ts +85 -0
- package/src/shared/engine/ai/encounters.ts +124 -0
- package/src/shared/engine/ai/flight.ts +69 -0
- package/src/shared/engine/ai/flock.ts +334 -0
- package/src/shared/engine/ai/hfsm.ts +51 -0
- package/src/shared/engine/ai/huntPattern.ts +987 -0
- package/src/shared/engine/ai/inspect.ts +6 -0
- package/src/shared/engine/ai/pinning.ts +13 -0
- package/src/shared/engine/ai/reach.ts +19 -0
- package/src/shared/engine/ai/stalker.ts +1502 -0
- package/src/shared/engine/ai/strikeRows.ts +17 -0
- package/src/shared/engine/ai/strikeState.ts +19 -0
- package/src/shared/engine/ai/strikes.ts +199 -0
- package/src/shared/engine/ai/weighted.ts +27 -0
- package/src/shared/engine/app/identity.ts +66 -0
- package/src/shared/engine/app/ownership.ts +155 -0
- package/src/shared/engine/app/pageSeat.ts +12 -0
- package/src/shared/engine/app/resources.ts +7 -0
- package/src/shared/engine/app/scheduler.ts +162 -0
- package/src/shared/engine/app/scope.ts +557 -0
- package/src/shared/engine/app/scopeEnvironment.ts +27 -0
- package/src/shared/engine/app/scopedProperty.ts +38 -0
- package/src/shared/engine/audio/audioProfiles.ts +161 -0
- package/src/shared/engine/audio/bootAudio.ts +316 -0
- package/src/shared/engine/boot/loadingWaits.ts +62 -0
- package/src/shared/engine/boot/serverProgress.ts +27 -0
- package/src/shared/engine/boot/steps.ts +63 -0
- package/src/shared/engine/boot/tables.ts +48 -0
- package/src/shared/engine/boot/timeline.ts +189 -0
- package/src/shared/engine/boot/timing.ts +96 -0
- package/src/shared/engine/boot/waits.ts +114 -0
- package/src/shared/engine/boot/workerTiming.ts +74 -0
- package/src/shared/engine/combat/Equipment.ts +66 -0
- package/src/shared/engine/combat/Firearm.ts +200 -0
- package/src/shared/engine/combat/Melee.ts +46 -0
- package/src/shared/engine/combat/Tool.ts +8 -0
- package/src/shared/engine/combat/Weapon.ts +133 -0
- package/src/shared/engine/combat/ammo.ts +17 -0
- package/src/shared/engine/combat/blocks/ads.ts +5 -0
- package/src/shared/engine/combat/blocks/melee.ts +19 -0
- package/src/shared/engine/combat/bowDraw.ts +140 -0
- package/src/shared/engine/combat/bowLaw.ts +54 -0
- package/src/shared/engine/combat/effects/EffectService.ts +216 -0
- package/src/shared/engine/combat/effects/types.ts +47 -0
- package/src/shared/engine/combat/health.ts +92 -0
- package/src/shared/engine/combat/impact.ts +8 -0
- package/src/shared/engine/combat/itemFamilies.ts +34 -0
- package/src/shared/engine/combat/items.ts +147 -0
- package/src/shared/engine/combat/lungeTarget.ts +42 -0
- package/src/shared/engine/combat/meleeProfile.ts +48 -0
- package/src/shared/engine/combat/pipeline.ts +157 -0
- package/src/shared/engine/combat/projectileContact.ts +275 -0
- package/src/shared/engine/combat/projectileFlight.ts +89 -0
- package/src/shared/engine/combat/projectileLaw.ts +148 -0
- package/src/shared/engine/combat/shotSpread.ts +38 -0
- package/src/shared/engine/combat/sweptBasePose.ts +75 -0
- package/src/shared/engine/combat/sweptBlade.ts +108 -0
- package/src/shared/engine/combat/sweptMeleeCore.ts +223 -0
- package/src/shared/engine/combat/targets.ts +20 -0
- package/src/shared/engine/core/clock.ts +57 -0
- package/src/shared/engine/core/config.ts +66 -0
- package/src/shared/engine/core/faults.ts +129 -0
- package/src/shared/engine/core/fixedStep.ts +5 -0
- package/src/shared/engine/core/frameCost.ts +227 -0
- package/src/shared/engine/core/framePacing.ts +179 -0
- package/src/shared/engine/core/harnessTap.ts +15 -0
- package/src/shared/engine/core/memoryAttribution.ts +137 -0
- package/src/shared/engine/core/memoryResources.ts +20 -0
- package/src/shared/engine/core/noise.ts +53 -0
- package/src/shared/engine/core/perfLap.ts +37 -0
- package/src/shared/engine/core/portableMath.ts +204 -0
- package/src/shared/engine/core/portableMathFirst.ts +4 -0
- package/src/shared/engine/core/practiceRoomState.ts +3 -0
- package/src/shared/engine/core/rng.ts +101 -0
- package/src/shared/engine/core/time.ts +8 -0
- package/src/shared/engine/core/workSlice.ts +111 -0
- package/src/shared/engine/entities/AnimalSim.ts +390 -0
- package/src/shared/engine/entities/animalPose.ts +401 -0
- package/src/shared/engine/entities/animalRig.ts +76 -0
- package/src/shared/engine/entities/animalStates.ts +2 -0
- package/src/shared/engine/entities/creatureFloor.ts +13 -0
- package/src/shared/engine/entities/eliteBrain.ts +36 -0
- package/src/shared/engine/entities/fightRules.ts +80 -0
- package/src/shared/engine/entities/ids.ts +18 -0
- package/src/shared/engine/entities/poseCadence.ts +9 -0
- package/src/shared/engine/entities/species/registry.ts +382 -0
- package/src/shared/engine/entities/species/rigs.ts +53 -0
- package/src/shared/engine/events/events.ts +107 -0
- package/src/shared/engine/input/commands.ts +34 -0
- package/src/shared/engine/input/netButtons.ts +4 -0
- package/src/shared/engine/level/data.ts +163 -0
- package/src/shared/engine/level/selection.ts +44 -0
- package/src/shared/engine/level/spec.ts +132 -0
- package/src/shared/engine/net/acts.ts +48 -0
- package/src/shared/engine/net/animalNet.ts +43 -0
- package/src/shared/engine/net/bits.ts +104 -0
- package/src/shared/engine/net/chatFilter.ts +40 -0
- package/src/shared/engine/net/chatWire.ts +18 -0
- package/src/shared/engine/net/chatWords.ts +7 -0
- package/src/shared/engine/net/command.ts +96 -0
- package/src/shared/engine/net/encounterNet.ts +32 -0
- package/src/shared/engine/net/frame.ts +159 -0
- package/src/shared/engine/net/identity.ts +40 -0
- package/src/shared/engine/net/ledgerWire.ts +24 -0
- package/src/shared/engine/net/measurements.ts +14 -0
- package/src/shared/engine/net/messages.ts +213 -0
- package/src/shared/engine/net/netSchemas.ts +38 -0
- package/src/shared/engine/net/playerNet.ts +80 -0
- package/src/shared/engine/net/schema.ts +157 -0
- package/src/shared/engine/net/shardNet.ts +25 -0
- package/src/shared/engine/net/socketFrames.ts +84 -0
- package/src/shared/engine/net/transport.ts +19 -0
- package/src/shared/engine/net/wireFrames.ts +123 -0
- package/src/shared/engine/net/wireMessages.ts +115 -0
- package/src/shared/engine/net/wireValues.ts +142 -0
- package/src/shared/engine/physics/CharacterMotor.ts +429 -0
- package/src/shared/engine/physics/Physics.ts +211 -0
- package/src/shared/engine/physics/bodies.ts +600 -0
- package/src/shared/engine/physics/box.ts +42 -0
- package/src/shared/engine/physics/creatures.ts +188 -0
- package/src/shared/engine/physics/declaredProps.ts +26 -0
- package/src/shared/engine/physics/entrySockets.ts +44 -0
- package/src/shared/engine/physics/frame.ts +39 -0
- package/src/shared/engine/physics/gridBorders.ts +38 -0
- package/src/shared/engine/physics/groups.ts +64 -0
- package/src/shared/engine/physics/heightPatch.ts +49 -0
- package/src/shared/engine/physics/meshCollision.ts +84 -0
- package/src/shared/engine/physics/mover.ts +60 -0
- package/src/shared/engine/physics/navmesh.ts +206 -0
- package/src/shared/engine/physics/navmeshUrl.ts +8 -0
- package/src/shared/engine/physics/nearColliders.ts +55 -0
- package/src/shared/engine/physics/overlap.ts +26 -0
- package/src/shared/engine/physics/paths.ts +135 -0
- package/src/shared/engine/physics/pieces.ts +139 -0
- package/src/shared/engine/physics/query.ts +161 -0
- package/src/shared/engine/physics/queryBatchV2.ts +118 -0
- package/src/shared/engine/physics/rapier-bg.d.ts +5 -0
- package/src/shared/engine/physics/rapier.ts +34 -0
- package/src/shared/engine/physics/readinessWalls.ts +49 -0
- package/src/shared/engine/physics/ropeChain.ts +128 -0
- package/src/shared/engine/physics/stripColliders.ts +21 -0
- package/src/shared/engine/physics/surface.ts +31 -0
- package/src/shared/engine/physics/terrain.ts +155 -0
- package/src/shared/engine/physics/terrainTiles.ts +20 -0
- package/src/shared/engine/physics/trainingTargets.ts +51 -0
- package/src/shared/engine/physics/transferWalls.ts +84 -0
- package/src/shared/engine/physics/wasmUrl.ts +3 -0
- package/src/shared/engine/player/MeleeSweep.ts +50 -0
- package/src/shared/engine/player/board.ts +129 -0
- package/src/shared/engine/player/combatMotion.ts +5 -0
- package/src/shared/engine/player/dash.ts +60 -0
- package/src/shared/engine/player/dodge.ts +14 -0
- package/src/shared/engine/player/fall.ts +29 -0
- package/src/shared/engine/player/hoverSpeed.ts +22 -0
- package/src/shared/engine/player/impulse.ts +30 -0
- package/src/shared/engine/player/jump.ts +30 -0
- package/src/shared/engine/player/lockOrbit.ts +72 -0
- package/src/shared/engine/player/modes.ts +239 -0
- package/src/shared/engine/player/motion.ts +391 -0
- package/src/shared/engine/player/motionState.ts +84 -0
- package/src/shared/engine/player/shove.ts +27 -0
- package/src/shared/engine/player/swim.ts +196 -0
- package/src/shared/engine/player/walk.ts +25 -0
- package/src/shared/engine/quest/core.ts +174 -0
- package/src/shared/engine/quest/dialogueClock.ts +191 -0
- package/src/shared/engine/quest/discovery.ts +42 -0
- package/src/shared/engine/quest/lastPlace.ts +80 -0
- package/src/shared/engine/quest/players.ts +162 -0
- package/src/shared/engine/quest/progress.ts +25 -0
- package/src/shared/engine/quest/viewPort.ts +22 -0
- package/src/shared/engine/saves/environment.ts +13 -0
- package/src/shared/engine/saves/legacy.ts +65 -0
- package/src/shared/engine/saves/runtime.ts +28 -0
- package/src/shared/engine/saves/saves.lock.json +551 -0
- package/src/shared/engine/saves/shape.ts +157 -0
- package/src/shared/engine/saves/store.ts +423 -0
- package/src/shared/engine/script/checkpointBytes.ts +18 -0
- package/src/shared/engine/script/decisionModule.ts +158 -0
- package/src/shared/engine/script/effects.ts +111 -0
- package/src/shared/engine/script/fixedMemory.ts +92 -0
- package/src/shared/engine/script/groupBankV2.ts +376 -0
- package/src/shared/engine/script/groupStepV2.ts +987 -0
- package/src/shared/engine/script/host.ts +443 -0
- package/src/shared/engine/script/moduleV2.ts +160 -0
- package/src/shared/engine/script/observationColumnsV2.ts +431 -0
- package/src/shared/engine/script/observationsV2.ts +139 -0
- package/src/shared/engine/script/state.ts +183 -0
- package/src/shared/engine/script/strings.ts +5 -0
- package/src/shared/engine/script/viewLane.ts +335 -0
- package/src/shared/engine/script/viewProgram.ts +315 -0
- package/src/shared/engine/sim/actRoutes.ts +72 -0
- package/src/shared/engine/sim/apiVersion.ts +2 -0
- package/src/shared/engine/sim/bands.ts +174 -0
- package/src/shared/engine/sim/cableTraversal.ts +356 -0
- package/src/shared/engine/sim/dayClock.ts +76 -0
- package/src/shared/engine/sim/edgeProfiles.ts +123 -0
- package/src/shared/engine/sim/encounterRows.ts +49 -0
- package/src/shared/engine/sim/leadPlayer.ts +16 -0
- package/src/shared/engine/sim/moverLifecycle.ts +80 -0
- package/src/shared/engine/sim/moverMotion.ts +130 -0
- package/src/shared/engine/sim/nearPlayer.ts +21 -0
- package/src/shared/engine/sim/netMotion.ts +17 -0
- package/src/shared/engine/sim/readiness.ts +77 -0
- package/src/shared/engine/sim/seamError.ts +100 -0
- package/src/shared/engine/sim/seamGeometry.ts +365 -0
- package/src/shared/engine/sim/seamLattice.ts +127 -0
- package/src/shared/engine/sim/shardRows.ts +106 -0
- package/src/shared/engine/sim/shore.ts +14 -0
- package/src/shared/engine/sim/snapshot.ts +482 -0
- package/src/shared/engine/sim/snapshotBase64.ts +25 -0
- package/src/shared/engine/sim/snapshotData.ts +460 -0
- package/src/shared/engine/sim/snapshotPhysics.ts +163 -0
- package/src/shared/engine/sim/snapshotReferenceMemo.ts +271 -0
- package/src/shared/engine/sim/strips.ts +134 -0
- package/src/shared/engine/strings.ts +751 -0
- package/src/shared/engine/world/BakedTerrain.ts +131 -0
- package/src/shared/engine/world/Heightfield.ts +129 -0
- package/src/shared/engine/world/bakedTerrainField.ts +85 -0
- package/src/shared/engine/world/dayCycle.ts +198 -0
- package/src/shared/engine/world/easedFields.ts +32 -0
- package/src/shared/engine/world/forest/placement.ts +391 -0
- package/src/shared/engine/world/forest/treeSpec.ts +15 -0
- package/src/shared/engine/world/groundField.ts +21 -0
- package/src/shared/engine/world/interact/barrel.ts +114 -0
- package/src/shared/engine/world/interact/flags.ts +229 -0
- package/src/shared/engine/world/interact/pickup.ts +22 -0
- package/src/shared/engine/world/interact/prompts.ts +47 -0
- package/src/shared/engine/world/interact/types.ts +327 -0
- package/src/shared/engine/world/interact/validate.ts +67 -0
- package/src/shared/engine/world/scalarChannel.ts +146 -0
- package/src/shared/engine/world/steppeWind.ts +193 -0
- package/src/shared/engine/world/terrainField.ts +217 -0
- package/src/shared/engine/world/terrainHeight.ts +19 -0
- package/src/shared/engine/world/water/body.ts +88 -0
- package/src/shared/engine/world/water/declared.ts +106 -0
- package/src/shared/engine/world/waves.ts +57 -0
- package/src/shared/engine/world/weather.ts +166 -0
- package/src/shared/engine/world/weatherContinuation.ts +121 -0
- package/src/shared/engine/world/windField.ts +49 -0
- package/src/shared/engine/world/windStrength.ts +6 -0
- package/src/shared/engine/world/yawFrame.ts +38 -0
- package/src/shared/game/achievements.ts +140 -0
- package/src/shared/game/ambient/flock.ts +374 -0
- package/src/shared/game/animation/limbBlend.ts +70 -0
- package/src/shared/game/animation/limbRig.ts +208 -0
- package/src/shared/game/bag/findsCatalogue.ts +58 -0
- package/src/shared/game/bag/itemCatalog.ts +18 -0
- package/src/shared/game/bag/items.ts +5 -0
- package/src/shared/game/bag/starter.generated.ts +3 -0
- package/src/shared/game/bag/starterItems.json +62 -0
- package/src/shared/game/boss/arenaAnswers.ts +49 -0
- package/src/shared/game/boss/arenaCollision.ts +16 -0
- package/src/shared/game/boss/arenaGround.ts +121 -0
- package/src/shared/game/boss/arenaPortal.ts +63 -0
- package/src/shared/game/boss/arenaRoomRows.ts +403 -0
- package/src/shared/game/boss/arenaWhirls.ts +88 -0
- package/src/shared/game/boss/jointTargets.ts +41 -0
- package/src/shared/game/boss/lane.ts +62 -0
- package/src/shared/game/boss/openArenaFight.ts +644 -0
- package/src/shared/game/boss/patrolLaw.ts +136 -0
- package/src/shared/game/boss/slotLaw.ts +173 -0
- package/src/shared/game/boss/wake.ts +60 -0
- package/src/shared/game/compendium/finds.ts +49 -0
- package/src/shared/game/compendium/registry.ts +28 -0
- package/src/shared/game/compendium/rules.ts +136 -0
- package/src/shared/game/compendium/state.ts +23 -0
- package/src/shared/game/compendium/tracker.ts +138 -0
- package/src/shared/game/compendium/types.ts +115 -0
- package/src/shared/game/eliteSystem.ts +349 -0
- package/src/shared/game/grapple/course.ts +14 -0
- package/src/shared/game/grapple/feed.ts +27 -0
- package/src/shared/game/grapple/sim.ts +352 -0
- package/src/shared/game/grid/allocator.ts +479 -0
- package/src/shared/game/grid/assembly.ts +73 -0
- package/src/shared/game/grid/catalogue.ts +197 -0
- package/src/shared/game/grid/catalogueDocument.ts +6 -0
- package/src/shared/game/grid/catalogueSlot.ts +53 -0
- package/src/shared/game/grid/cellEvents.ts +37 -0
- package/src/shared/game/grid/collisionStrips.ts +18 -0
- package/src/shared/game/grid/compiledStrips.ts +282 -0
- package/src/shared/game/grid/continuations.ts +43 -0
- package/src/shared/game/grid/crossing.ts +143 -0
- package/src/shared/game/grid/edgeProfiles.ts +31 -0
- package/src/shared/game/grid/farProxy.ts +302 -0
- package/src/shared/game/grid/ghosts.ts +42 -0
- package/src/shared/game/grid/gridAssetBytes.ts +59 -0
- package/src/shared/game/grid/gridCollision.ts +37 -0
- package/src/shared/game/grid/instances.ts +9 -0
- package/src/shared/game/grid/pageMode.ts +32 -0
- package/src/shared/game/grid/platformInputs.ts +11 -0
- package/src/shared/game/grid/postPairs.ts +40 -0
- package/src/shared/game/grid/readinessEdges.ts +13 -0
- package/src/shared/game/grid/recovery.ts +221 -0
- package/src/shared/game/grid/roadLayout.ts +169 -0
- package/src/shared/game/grid/roadRecovery.ts +99 -0
- package/src/shared/game/grid/rules.ts +45 -0
- package/src/shared/game/grid/runtimeCheckpoint.ts +58 -0
- package/src/shared/game/grid/seamData.ts +74 -0
- package/src/shared/game/grid/seamGeometry.ts +219 -0
- package/src/shared/game/grid/singleplayer.json +701 -0
- package/src/shared/game/grid/travellerCombat.ts +34 -0
- package/src/shared/game/grid/wallet.ts +104 -0
- package/src/shared/game/harvest.ts +16 -0
- package/src/shared/game/instanceSaves.ts +14 -0
- package/src/shared/game/inventoryLaw.ts +131 -0
- package/src/shared/game/ledger.ts +188 -0
- package/src/shared/game/loadout/itemCatalogue.ts +44 -0
- package/src/shared/game/loadout/persistence.ts +20 -0
- package/src/shared/game/loadout/pouch.ts +46 -0
- package/src/shared/game/localSaveKeys.ts +9 -0
- package/src/shared/game/looks/dayClock.ts +112 -0
- package/src/shared/game/looks/dayLookPresets.ts +75 -0
- package/src/shared/game/looks/keyedSkyClock.ts +15 -0
- package/src/shared/game/loot/Bounty.ts +49 -0
- package/src/shared/game/loot/Owned.ts +112 -0
- package/src/shared/game/loot/Purse.ts +94 -0
- package/src/shared/game/loot/coinAmounts.ts +17 -0
- package/src/shared/game/loot/coinBurstState.ts +23 -0
- package/src/shared/game/loot/deaths.ts +14 -0
- package/src/shared/game/loot/exchange.ts +71 -0
- package/src/shared/game/loot/ownedRows.ts +24 -0
- package/src/shared/game/loot/tableRows.ts +11 -0
- package/src/shared/game/newGame.ts +56 -0
- package/src/shared/game/plugin/animation.ts +618 -0
- package/src/shared/game/plugin/bodyBoss.ts +119 -0
- package/src/shared/game/plugin/borrowed.ts +62 -0
- package/src/shared/game/plugin/bossRecord.ts +28 -0
- package/src/shared/game/plugin/channelPrograms.ts +307 -0
- package/src/shared/game/plugin/channels.ts +355 -0
- package/src/shared/game/plugin/creatureFrame.ts +46 -0
- package/src/shared/game/plugin/director.ts +435 -0
- package/src/shared/game/plugin/moduleHash.ts +49 -0
- package/src/shared/game/plugin/quests.ts +450 -0
- package/src/shared/game/plugin/runtimeRows.ts +288 -0
- package/src/shared/game/population/census.ts +67 -0
- package/src/shared/game/population/groupNotices.ts +34 -0
- package/src/shared/game/population/pageHomes.ts +125 -0
- package/src/shared/game/population/pageRows.ts +20 -0
- package/src/shared/game/population/perchRoot.ts +17 -0
- package/src/shared/game/population/respawn.ts +89 -0
- package/src/shared/game/population/returnProgram.ts +448 -0
- package/src/shared/game/population/returnProjectionV2.ts +203 -0
- package/src/shared/game/population/wildlifeOwner.ts +20 -0
- package/src/shared/game/quest/boundState.ts +55 -0
- package/src/shared/game/quest/carriedRound.ts +59 -0
- package/src/shared/game/quest/chapterBindings.ts +64 -0
- package/src/shared/game/quest/chapterClock.ts +56 -0
- package/src/shared/game/quest/chapterDecision.ts +31 -0
- package/src/shared/game/quest/chapterFlow.ts +54 -0
- package/src/shared/game/quest/chapterLeads.ts +10 -0
- package/src/shared/game/quest/contractBoard.ts +108 -0
- package/src/shared/game/quest/contracts.ts +145 -0
- package/src/shared/game/quest/declared.ts +152 -0
- package/src/shared/game/quest/effectPresentation.ts +23 -0
- package/src/shared/game/quest/effects.ts +61 -0
- package/src/shared/game/quest/eliteDecisions.ts +123 -0
- package/src/shared/game/quest/eliteStreams.ts +7 -0
- package/src/shared/game/quest/featCounters.ts +41 -0
- package/src/shared/game/quest/flagGates.ts +103 -0
- package/src/shared/game/quest/interactionRows.ts +214 -0
- package/src/shared/game/quest/ledger.ts +23 -0
- package/src/shared/game/quest/legacyRecords.ts +17 -0
- package/src/shared/game/quest/nativeProps.ts +117 -0
- package/src/shared/game/quest/pagePersistence.ts +91 -0
- package/src/shared/game/quest/pageReads.ts +39 -0
- package/src/shared/game/quest/pageResources.ts +19 -0
- package/src/shared/game/quest/pageState.ts +66 -0
- package/src/shared/game/quest/persistence.ts +110 -0
- package/src/shared/game/quest/questObservation.ts +50 -0
- package/src/shared/game/quest/steps.ts +116 -0
- package/src/shared/game/quest/storyLaw.ts +17 -0
- package/src/shared/game/riding/bindingTypes.ts +43 -0
- package/src/shared/game/riding/companions.ts +135 -0
- package/src/shared/game/riding/entered.ts +21 -0
- package/src/shared/game/riding/pagePopulation.ts +28 -0
- package/src/shared/game/riding/pastureCues.ts +24 -0
- package/src/shared/game/riding/physics.ts +691 -0
- package/src/shared/game/riding/presentation.ts +27 -0
- package/src/shared/game/riding/taming.ts +164 -0
- package/src/shared/game/rng.merge.d.ts +10 -0
- package/src/shared/game/saves.ts +90 -0
- package/src/shared/game/shard/api.ts +2 -0
- package/src/shared/game/shard/declaredRows.ts +121 -0
- package/src/shared/game/shard/enteredServices.ts +14 -0
- package/src/shared/game/shard/runtime.ts +90 -0
- package/src/shared/game/shard/slug.ts +9 -0
- package/src/shared/game/shard/terrainBake.ts +12 -0
- package/src/shared/game/shardfile/aimTargetFilter.ts +12 -0
- package/src/shared/game/shardfile/bakedPlacementPoses.ts +25 -0
- package/src/shared/game/shardfile/buildingDoor.ts +52 -0
- package/src/shared/game/shardfile/clientGround.ts +86 -0
- package/src/shared/game/shardfile/clientState.ts +133 -0
- package/src/shared/game/shardfile/collisionBindings.ts +31 -0
- package/src/shared/game/shardfile/contentHash.ts +7 -0
- package/src/shared/game/shardfile/crowdRuntime.ts +254 -0
- package/src/shared/game/shardfile/customSchema.ts +57 -0
- package/src/shared/game/shardfile/dataCreaturePorts.ts +239 -0
- package/src/shared/game/shardfile/entryOwners.ts +153 -0
- package/src/shared/game/shardfile/fileInputs.ts +21 -0
- package/src/shared/game/shardfile/identity.ts +18 -0
- package/src/shared/game/shardfile/items.ts +180 -0
- package/src/shared/game/shardfile/ktx2Targets.ts +62 -0
- package/src/shared/game/shardfile/ladder.ts +137 -0
- package/src/shared/game/shardfile/liftRider.ts +62 -0
- package/src/shared/game/shardfile/logicalState.ts +57 -0
- package/src/shared/game/shardfile/movers.ts +14 -0
- package/src/shared/game/shardfile/namedJsonChecks.ts +12 -0
- package/src/shared/game/shardfile/outputChecksNode.ts +11 -0
- package/src/shared/game/shardfile/outputDescriptor.ts +317 -0
- package/src/shared/game/shardfile/outputIndexChecks.ts +8 -0
- package/src/shared/game/shardfile/packReads.ts +93 -0
- package/src/shared/game/shardfile/playArea.ts +42 -0
- package/src/shared/game/shardfile/portalRide.ts +170 -0
- package/src/shared/game/shardfile/portalTraversal.ts +49 -0
- package/src/shared/game/shardfile/productData.ts +22 -0
- package/src/shared/game/shardfile/props.ts +11 -0
- package/src/shared/game/shardfile/resourceRole.ts +14 -0
- package/src/shared/game/shardfile/runtimeState.ts +69 -0
- package/src/shared/game/shardfile/schemaReferences.ts +33 -0
- package/src/shared/game/shardfile/scriptNotice.ts +38 -0
- package/src/shared/game/shardfile/serverPack.ts +23 -0
- package/src/shared/game/shardfile/shardProduct.ts +206 -0
- package/src/shared/game/shardfile/spawnManifest.ts +126 -0
- package/src/shared/game/shardfile/talks.ts +22 -0
- package/src/shared/game/shardfile/targets.ts +11 -0
- package/src/shared/game/shardfile/tileOrder.ts +64 -0
- package/src/shared/game/shardfile/walkInPortalRide.ts +160 -0
- package/src/shared/game/shardfile/wholeInputs.ts +18 -0
- package/src/shared/game/shardfile/wirePrompts.ts +35 -0
- package/src/shared/game/shardfile/worldActionsV2.ts +113 -0
- package/src/shared/game/shardfile/worldTargets.ts +71 -0
- package/src/shared/game/stealth/stealthLaw.ts +120 -0
- package/src/shared/game/strings.ts +88 -0
- package/src/shared/game/systems/cellField.ts +144 -0
- package/src/shared/game/systems/effects/starterEffects.ts +20 -0
- package/src/shared/game/systems/effects/starterRows.json +98 -0
- package/src/shared/game/systems/looks/grassField.ts +249 -0
- package/src/shared/game/systems/looks/trampleField.ts +263 -0
- package/src/shared/game/weapons/heldBowBase.ts +15 -0
- package/src/shared/game/weapons/heldDecision.ts +20 -0
- package/src/shared/game/weapons/javelinFlight.ts +139 -0
- package/src/shared/game/weapons/launcherSpring.ts +11 -0
- package/src/shared/game/weapons/mountedPass.ts +70 -0
- package/src/shared/game/weapons/polearmContact.ts +73 -0
- package/src/shared/game/weapons/polearmDecision.ts +152 -0
- package/src/shared/game/weapons/starter.generated.ts +2 -0
- package/src/shared/game/weapons/starterBow.json +21 -0
- package/src/shared/game/weapons/starterBowProfile.ts +17 -0
- package/src/shared/game/weapons/starterCombat.ts +19 -0
- package/src/shared/game/weapons/starterGlyphs.ts +9 -0
- package/src/shared/game/weapons/starterMeleeProfile.ts +67 -0
- package/src/shared/game/weapons/starterMoves.ts +101 -0
- package/src/shared/game/weather/feed.ts +57 -0
- package/src/shared/health.ts +10 -0
- package/src/shared/host/author.ts +14 -0
- package/src/shared/host/formatJsonSchema.ts +1114 -0
- package/src/shared/host/headlessJourney.ts +152 -0
- package/src/shared/host/headlessObservation.ts +16 -0
- package/src/shared/host/headlessSections.ts +18 -0
- package/src/shared/host/headlessTape.ts +99 -0
- package/src/shared/host/headlessTapeParts.ts +35 -0
- package/src/shared/host/immutable.ts +14 -0
- package/src/shared/host/releaseRows.ts +23 -0
- package/src/shared/host/shardfile.ts +23 -0
- package/src/shared/host/standalone/harnessPlace.ts +23 -0
- package/src/shared/host/standalone/heldReads.ts +45 -0
- package/src/shared/host/standalone/netInput.ts +112 -0
- package/src/shared/host/standalone/workerLoopback.ts +51 -0
- package/src/shared/host/tickProtocol.ts +246 -0
- package/src/shared/side.ts +2 -0
- package/src/test/engine/FakeGame.ts +123 -0
- package/src/test/engine/creatureStride.ts +29 -0
- package/src/test/engine/declarationConsumer.ts +24 -0
- package/src/test/engine/linkedGl.ts +7 -0
- package/src/test/engine/manager.ts +58 -0
- package/src/test/engine/nativeBytes.ts +5 -0
- package/src/test/engine/netLoopback.ts +64 -0
- package/src/test/engine/realGc.ts +34 -0
- package/src/test/engine/terrain.ts +32 -0
- package/src/test/engine/textureUploadRenderer.ts +34 -0
- package/src/test/engine/weaponParity.ts +119 -0
- package/src/test/engine/world.ts +48 -0
- package/src/test/game/creatureRecipe.ts +11 -0
- package/src/test/helpers/git.ts +94 -0
- package/src/test/tsconfig.app.json +28 -0
- package/src/test/tsconfig.engine.json +27 -0
- package/src/test/tsconfig.game.json +28 -0
- package/src/test/tsconfig.host.json +27 -0
- package/src/tools/build-web.ts +58 -0
- package/src/tsconfig.json +39 -0
- package/tsconfig.app.json +32 -0
- package/tsconfig.engine.json +22 -0
- package/tsconfig.game.json +34 -0
- package/tsconfig.host.json +33 -0
- package/tsconfig.json +54 -0
- package/tsconfig.layers.json +35 -0
- package/types/format-standards.d.ts +19 -0
- package/vite/rapier.ts +35 -0
- package/README.md +0 -8
|
@@ -0,0 +1,1623 @@
|
|
|
1
|
+
import { ReturnProgram } from '../../../shared/game/population/returnProgram';
|
|
2
|
+
import { hasDeclaredClientPage } from '@wildshard/format/runtimeBinds';
|
|
3
|
+
import { parseNativeLoadoutRow, type NativeLoadoutRowSchema } from '@wildshard/format/nativeItems';
|
|
4
|
+
import { borrowedDecisionAuthority } from '../shardfile/borrowedDecisions';
|
|
5
|
+
import { decisionRuntime, focusPlayer, ShardDecisions, type DecisionRuntime } from '../shardfile/decisions';
|
|
6
|
+
import { WorldTargetHost } from '../../../shared/game/shardfile/worldTargets';
|
|
7
|
+
import { outputDescriptor } from '../../../shared/game/shardfile/outputDescriptor';
|
|
8
|
+
import { parseWorldTargets, worldTargetRules } from '@wildshard/format/worldTargets';
|
|
9
|
+
import { decisionScriptsFromSections } from '@wildshard/format/scriptContract';
|
|
10
|
+
import { prepareNativePopulation, type NativePopulationRows } from '../shardfile/bossRow';
|
|
11
|
+
import { serverReturnRows } from '../shardfile/nativeRuntimeLoans';
|
|
12
|
+
import { parseQuestWorldReactions, type QuestWorldReactionsData } from '@wildshard/format/questInteractions';
|
|
13
|
+
import { installQuestGraph, type QuestGraphPorts } from '../../../shared/game/plugin/quests';
|
|
14
|
+
import { parseQuestHost, type QuestHostRow } from '@wildshard/format/questHost';
|
|
15
|
+
import { parseBossOwnerRow } from '@wildshard/format/bossProfiles';
|
|
16
|
+
import type { QuestData } from '@wildshard/format/quests';
|
|
17
|
+
import { compileDirectorWhen, evaluateDirectorWhen } from '@wildshard/format/directorWhen';
|
|
18
|
+
import { weaponContactDistance, type ContactWorldTarget, ContactFamily, type ContactFamilyPorts, type ContactScanTarget } from '@wildshard/engine/combat/contactWeapon';
|
|
19
|
+
import { parseItems, parseMeleeContacts, parseNativeMeleeBinding } from '@wildshard/format/items';
|
|
20
|
+
import { scriptItemHook } from '@wildshard/engine/combat/items';
|
|
21
|
+
import { flagValue, test as testQuestFlags, type Flags } from '@wildshard/engine/world/interact/flags';
|
|
22
|
+
import { Vector3 } from 'three';
|
|
23
|
+
import { parsePromptRegistrations, createHeadlessPromptPicker } from '../../../shared/game/quest/interactionRows';
|
|
24
|
+
import { questBooks } from '@wildshard/engine/quest/players';
|
|
25
|
+
import { GridAssembly } from '../../../shared/game/grid/assembly';
|
|
26
|
+
import { GridSimulation } from '../grid/simulation';
|
|
27
|
+
import { ResidencyAllocator } from '../../../shared/game/grid/allocator';
|
|
28
|
+
import { CONTENT_CAPS } from '@wildshard/engine/core/config';
|
|
29
|
+
import { leadSnapshot, isSimHostRestoring, snapshotSimHost, regionalContinuation, type SimSnapshot } from '@wildshard/engine/sim/snapshot';
|
|
30
|
+
import { restoreSimHost, prepareSimHostRestore, type PreparedSimHostRestore } from '@wildshard/engine/sim/restore';
|
|
31
|
+
import { SaveStore } from '@wildshard/engine/saves/store';
|
|
32
|
+
import { Ledger } from '../../../shared/game/ledger';
|
|
33
|
+
import type { Material } from '@wildshard/engine/physics/surface';
|
|
34
|
+
import type { SocketLift } from '@wildshard/format/socketLift';
|
|
35
|
+
import { DirectorStageLane, bindDirectorActions, type DirectorActionBinding } from '../../../shared/game/plugin/director';
|
|
36
|
+
import { directorDayRange, directorDataHostIssues } from '@wildshard/format/directorStages';
|
|
37
|
+
import { DEFAULT_NORMALIZED_DAY, normalizedDayClock, inNormalizedDayRange, type DayCycle } from '@wildshard/engine/world/dayCycle';
|
|
38
|
+
import { SIM_API_VERSION } from '@wildshard/engine/sim/apiVersion';
|
|
39
|
+
import { createSimHost, type SimHost, type SimCommand, type SimHostPorts, type SimLevel, type SimStrike, type SimValue } from "@wildshard/engine/sim";
|
|
40
|
+
import { buildPlatformSpawns } from "@wildshard/engine/ai/platform";
|
|
41
|
+
import { addBakedTerrainCollider } from "@wildshard/engine/physics/terrainTiles";
|
|
42
|
+
import { decodeTerrainTile, terrainTileHeight, type TerrainTileData } from "@wildshard/format/terrainTileBytes";
|
|
43
|
+
import { fnv1a32 } from "@wildshard/engine/core/rng";
|
|
44
|
+
import { installScriptLane, type ScriptLanePort } from "@wildshard/engine/script/lane";
|
|
45
|
+
import { publishShardState, sayFightView } from '@wildshard/engine/sim/shardRows';
|
|
46
|
+
import type { EffectRules, ScriptEntity } from "@wildshard/engine/script/effects";
|
|
47
|
+
import { declaredWaterBody } from "@wildshard/engine/world/water/declared";
|
|
48
|
+
import { WaterBodies } from "@wildshard/engine/world/water/body";
|
|
49
|
+
import { floorBelow } from "@wildshard/engine/physics/query";
|
|
50
|
+
import { playerSeats } from './playerSeats';
|
|
51
|
+
import { actRoutes } from '@wildshard/engine/sim/actRoutes';
|
|
52
|
+
import { installDeclaredTalks } from '../shardfile/declaredTalks';
|
|
53
|
+
import type { PlayerSim } from '@wildshard/engine/sim/playerSim';
|
|
54
|
+
import { installShardfileColliders, shardfileColliderIds } from "../../../shared/game/shardfile/collisionBindings";
|
|
55
|
+
import { validateMeshCollisionAssets } from "@wildshard/format/meshCollisionAssets";
|
|
56
|
+
import { validateMeshEntryways } from "@wildshard/format/meshEntryways";
|
|
57
|
+
import { clientGround } from "../../../shared/game/shardfile/clientGround";
|
|
58
|
+
import { declaredItemScriptEntities, type DeclaredItemPorts } from "../../../shared/game/shardfile/items";
|
|
59
|
+
import { syncTargetColliders } from "../../../shared/game/shardfile/targets";
|
|
60
|
+
import { scriptPhysicsQueries } from "@wildshard/engine/script/queries";
|
|
61
|
+
import { createQuestScriptPorts, DeclaredQuests, type QuestDataPorts, type QuestScriptBindings } from "../../../shared/game/quest/declared";
|
|
62
|
+
import { installDeclaredEncounters } from "../shard/declaredEncounters";
|
|
63
|
+
import type { Shardfile } from "@wildshard/format/shardSchema";
|
|
64
|
+
import { speciesResolver, simStrikes } from "./brain";
|
|
65
|
+
import { createShardfileScriptLane, verifiedScriptModules, type ScriptModuleAssets, type ShardScriptPorts } from "../shardfile/scripts";
|
|
66
|
+
import { installDeclaredBrains, type DeclaredBrainPorts } from "../shardfile/brainRuntime";
|
|
67
|
+
import { createShardfileComposedLane, type DeclaredScriptBrainPorts } from "../shardfile/scriptComposition";
|
|
68
|
+
import { bindPlayerColumns, dataCreaturePorts } from "../../../shared/game/shardfile/dataCreaturePorts";
|
|
69
|
+
import { prepareDeclaredGroupBrains, type DeclaredGroupPorts, type DeclaredGroupPolicy } from "../shardfile/groupRuntime";
|
|
70
|
+
import { prepareDeclaredCrowds, type DeclaredCrowdPorts, type PreparedCrowds } from "../../../shared/game/shardfile/crowdRuntime";
|
|
71
|
+
import { installLadders, type LadderClientPorts } from '../../../shared/game/shardfile/ladder';
|
|
72
|
+
import { MoverScriptDriver, playerGrounds, verifiedMoverModules, proveTerrainEntries, type TerrainEntryWalk, type DeclaredMoverComposition, type MoverRuntime } from "./mover";
|
|
73
|
+
import { socketLiftEntries } from "@wildshard/format/socketLiftAssets";
|
|
74
|
+
import { createClientChannels } from "../../../shared/game/plugin/channels";
|
|
75
|
+
import type { MoverPose } from "@wildshard/engine/physics/mover";
|
|
76
|
+
import { liftPrompt } from "../../../shared/game/shardfile/wirePrompts";
|
|
77
|
+
import { portalLinkEntries, portalLinkRules } from "@wildshard/format/portalLinkAssets";
|
|
78
|
+
import { validatePortalFloors } from "@wildshard/format/portalFloor";
|
|
79
|
+
import { portalTransitioning } from "../../../shared/game/shardfile/portalTraversal";
|
|
80
|
+
import { captureLiftRiders, parseLiftRiders, restoreLiftRider, type LiftRiders } from "../../../shared/game/shardfile/liftRider";
|
|
81
|
+
import * as v from "valibot";
|
|
82
|
+
import { installEntrySockets } from "@wildshard/engine/physics/entrySockets";
|
|
83
|
+
import { addPiece, type AddedPiece } from "@wildshard/engine/physics/pieces";
|
|
84
|
+
import { leadCommands } from '@wildshard/engine/sim/leadPlayer';
|
|
85
|
+
import { scriptSeats, type ScriptSeats } from './scriptSeats';
|
|
86
|
+
|
|
87
|
+
type Physics = SimHost['physics'];
|
|
88
|
+
type PropColliderPort = NonNullable<ReturnType<ReturnType<typeof installShardfileColliders>['get']>>;
|
|
89
|
+
type PropColliderState = ReturnType<PropColliderPort['snapshot']>;
|
|
90
|
+
|
|
91
|
+
/** The most collider pieces one node bake may register. */
|
|
92
|
+
const MAX_BAKED_PIECES = 1024;
|
|
93
|
+
const BAKED_SURFACES = ['wood', 'metal', 'flesh', 'felt', 'stone', 'rock', 'sand', 'grass'] as const satisfies readonly Material[];
|
|
94
|
+
const bakedNumber = v.pipe(v.number(), v.finite());
|
|
95
|
+
const bakedPlaced = { x: bakedNumber, y: bakedNumber, z: bakedNumber, yaw: v.exactOptional(bakedNumber),
|
|
96
|
+
rot: v.exactOptional(v.strictObject({ x: bakedNumber, y: bakedNumber, z: bakedNumber, w: bakedNumber })), surface: v.exactOptional(v.picklist(BAKED_SURFACES)) };
|
|
97
|
+
const BakedPieces = v.pipe(v.array(v.object({ id: v.string(), name: v.string(), file: v.string(), active: v.boolean(),
|
|
98
|
+
category: v.exactOptional(v.picklist(['buildings', 'nature', 'props', 'ground'])), mode: v.exactOptional(v.literal('board')),
|
|
99
|
+
surface: v.picklist(BAKED_SURFACES), owner: v.exactOptional(v.string()), colliders: v.array(v.union([
|
|
100
|
+
v.strictObject({ kind: v.literal('box'), ...bakedPlaced, hx: bakedNumber, hy: bakedNumber, hz: bakedNumber }),
|
|
101
|
+
v.strictObject({ kind: v.literal('hull'), ...bakedPlaced, points: v.array(bakedNumber) })])) })), v.maxLength(MAX_BAKED_PIECES));
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Register a Node bake's collider pieces (a `physics.baked.json`'s `pieces`, strictly parsed) with a native host's physics
|
|
105
|
+
* in their baked order: every active piece, and the board-only ones (`mode: 'board'`), whose colliders return for
|
|
106
|
+
* `SimHost.boardColliders`. A piece's colliders belong to its `owner`, else to the piece.
|
|
107
|
+
*/
|
|
108
|
+
export function addBakedPieces(physics: Physics, pieces: unknown): AddedPiece['colliders'] {
|
|
109
|
+
const rows = v.parse(BakedPieces, pieces), board: AddedPiece['colliders'] = [];
|
|
110
|
+
for (let i = 0; i < MAX_BAKED_PIECES; i++) {
|
|
111
|
+
const piece = rows[i]; if (piece === undefined) break;
|
|
112
|
+
if (!piece.active && piece.mode !== 'board') continue;
|
|
113
|
+
const added = addPiece(physics, { id: piece.id, name: piece.name, category: piece.category ?? 'props', file: piece.file, surface: piece.surface,
|
|
114
|
+
colliderOwner: piece.owner ?? piece.id, colliders: piece.colliders.map(c => c.kind === 'box' ? c : { ...c, points: new Float32Array(c.points) }) });
|
|
115
|
+
if (piece.mode === 'board') board.push(...added.colliders);
|
|
116
|
+
}
|
|
117
|
+
return board;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** The host's player strike where declared items own every damaging contact: a zero-damage probe. */
|
|
121
|
+
export const HOST_PROBE: Readonly<SimStrike> = { id: 'host.probe', shape: { kind: 'point', radius: 1 }, windup: 0.1, active: 0.1, recover: 0.2, cooldown: 0.3, range: 1, damage: 0, tags: [] };
|
|
122
|
+
/**
|
|
123
|
+
* A trusted runtime's native level (SF72): the shard's identity, the player at the runtime's own stand and speed (capped
|
|
124
|
+
* by the shard's author speed), no declared entities or quests (the runtime installs its own owners), and `HOST_PROBE`.
|
|
125
|
+
*/
|
|
126
|
+
export function trustedLevel(shard: Pick<Shardfile, 'identity' | 'authorCaps'>, player: SimLevel['player'], ground: SimLevel['ground']): SimLevel {
|
|
127
|
+
return { version: SIM_API_VERSION, id: shard.identity.slug, seed: shard.identity.seed, ground,
|
|
128
|
+
player: { at: player.at, yaw: player.yaw, speed: Math.min(player.speed, shard.authorCaps.speed) }, entities: [], quests: [], weapon: HOST_PROBE };
|
|
129
|
+
}
|
|
130
|
+
/** A cell's height for a body anywhere: a player on a road stands past its tile, and reads the tile's edge. Inside the tile this is the plain sample. */
|
|
131
|
+
export const tileHeightAt = (terrain: TerrainTileData) => (x: number, z: number): number => terrainTileHeight(terrain, x, z, { boundary: 'clamp' });
|
|
132
|
+
|
|
133
|
+
/** The shard's admitted terrain collider and its height query; a shard that declares none, or whose bytes are absent, refuses. */
|
|
134
|
+
export function admittedTerrain(shard: Pick<Shardfile, 'terrain'>, assets: ReadonlyMap<string, Uint8Array>): { readonly bytes: Uint8Array; readonly heightAt: (x: number, z: number) => number } {
|
|
135
|
+
const bytes = shard.terrain === null ? undefined : assets.get(shard.terrain.collider);
|
|
136
|
+
if (bytes === undefined) throw new Error('Missing admitted terrain collider');
|
|
137
|
+
const terrain = decodeTerrainTile(bytes);
|
|
138
|
+
return { bytes, heightAt: tileHeightAt(terrain) };
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Register a Node-baked world into a fresh trusted host (a restore brings it back with the physics): the admitted terrain
|
|
142
|
+
* collider when given, then the baked pieces (`addBakedPieces`), whose board-only colliders join the host's board mode.
|
|
143
|
+
*/
|
|
144
|
+
export function addBakedWorld(host: SimHost, pieces: unknown, terrain?: Uint8Array): void {
|
|
145
|
+
if (terrain !== undefined) addBakedTerrainCollider(host.physics, terrain, host.scope);
|
|
146
|
+
const board = addBakedPieces(host.physics, pieces);
|
|
147
|
+
if (board.length > 0) host.boardColliders(board);
|
|
148
|
+
}
|
|
149
|
+
interface RuntimeWorldRecipe {
|
|
150
|
+
readonly population: { readonly rows: NativePopulationRows; readonly sources: 'actors' | 'actors+bosses'; readonly seed: 'identity' | 'declared'; readonly owner: unknown };
|
|
151
|
+
readonly terrain: 'none' | 'collider'; readonly ground: SimLevel['ground'];
|
|
152
|
+
readonly player: { readonly speed: number; readonly lift?: number; readonly at?: readonly [number, number, number]; readonly yaw?: number };
|
|
153
|
+
readonly floor?: 'solids';
|
|
154
|
+
readonly motion?: { readonly systemId: string; readonly skipPrefix?: string;
|
|
155
|
+
readonly composition: Omit<DeclaredMoverComposition['content'], 'identity'>; readonly rules: ShardScriptPorts['rules'];
|
|
156
|
+
readonly itemRole?: NonNullable<DeclaredMoverComposition['declarations']>[number]['row'];
|
|
157
|
+
readonly permissions: readonly { readonly mover: string; readonly flags: readonly { readonly name: string; readonly bit: number }[] }[];
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/** Shared native world preparation: declarations select static collision, spawn and optional scripted motion on the same host. */
|
|
161
|
+
export async function prepareRuntimeWorld(shard: Shardfile, assets: ReadonlyMap<string, Uint8Array>, baked: unknown, recipe: RuntimeWorldRecipe, sections: ReadonlyMap<string, unknown> = outputDescriptor(shard)?.sections ?? new Map()): Promise<{
|
|
162
|
+
level: SimLevel; ports: { ground: false; heightAt: (x: number, z: number) => number };
|
|
163
|
+
install: (host: SimHost, context: { restoring: boolean; emit: Parameters<typeof ledgerPorts>[0]; snapshot?: Parameters<ReturnType<typeof prepareNativePopulation>['install']>[2] }) => ReturnType<ReturnType<typeof prepareNativePopulation>['install']> & { ledger: ReturnType<typeof ledgerPorts>; hooks: ReturnType<ReturnType<typeof declaredItemScriptBindings>['hooks']>;
|
|
164
|
+
hookTick: () => number; motion?: MoverRuntime; seats: ScriptSeats };
|
|
165
|
+
}> {
|
|
166
|
+
const { pieces } = v.parse(v.object({ pieces: v.unknown() }), baked);
|
|
167
|
+
const terrain = recipe.terrain === 'collider' ? admittedTerrain(shard, assets) : undefined;
|
|
168
|
+
if (recipe.terrain === 'none' && shard.terrain !== null) throw new Error('Native world declares no terrain');
|
|
169
|
+
const heightAt = terrain?.heightAt ?? (() => recipe.ground.height);
|
|
170
|
+
const at = recipe.player.at;
|
|
171
|
+
const player = { at: at === undefined ? { x: shard.spawn.x, y: heightAt(shard.spawn.x, shard.spawn.z) + (recipe.player.lift ?? 0), z: shard.spawn.z }
|
|
172
|
+
: { x: at[0], y: at[1], z: at[2] }, yaw: recipe.player.yaw ?? shard.spawn.yaw, speed: recipe.player.speed };
|
|
173
|
+
const row = recipe.motion, data = row === undefined ? [] : shard.movers.filter(value => row.skipPrefix === undefined || !value.id.startsWith(row.skipPrefix));
|
|
174
|
+
const modules = row === undefined ? new Map<string, Uint8Array>() : new Map(await verifiedMoverModules(assets, data));
|
|
175
|
+
if (row?.itemRole !== undefined) for (const [name, bytes] of await declaredItemScriptBindings(shard.items, 'actor.player').modules(assets)) modules.set(name, bytes);
|
|
176
|
+
if (row !== undefined && (row.permissions.length > 64
|
|
177
|
+
|| row.permissions.some(value => !data.some(declaration => declaration.id === value.mover)))) throw new Error('Unbound native world motion rows');
|
|
178
|
+
const policy = recipe.population;
|
|
179
|
+
const actors = policy.sources === 'actors+bosses' ? (() => { const rows = readRuntimeWorldMetadata(baked, true); return [...rows.actors, ...rows.bosses]; })() : readRuntimeWorldMetadata(baked).actors;
|
|
180
|
+
const population = prepareNativePopulation(policy.seed === 'identity' ? { ...policy.rows, seed: shard.identity.seed } : policy.rows, actors, policy.owner);
|
|
181
|
+
return { level: trustedLevel(shard, player, recipe.ground), ports: { ground: false, heightAt }, install: (host, context) => {
|
|
182
|
+
const seats = scriptSeats(host), { first } = seats;
|
|
183
|
+
if(sections.has('actors/return-scripts')){
|
|
184
|
+
const returns=serverReturnRows(sections.get('actors/return-scripts'));
|
|
185
|
+
if(returns.some(candidate=>candidate.abi===2))ReturnProgram.lendModules(host.scope,assets,returns);
|
|
186
|
+
}
|
|
187
|
+
const restoring = context.restoring;
|
|
188
|
+
if (!restoring) addBakedWorld(host, pieces, terrain?.bytes);
|
|
189
|
+
if (recipe.floor === 'solids') host.setFloorQuery((x, z, fromY, maxDrop) => floorBelow(host.physics, x, z, fromY, maxDrop));
|
|
190
|
+
const environment = (() => {
|
|
191
|
+
if (row === undefined) return { hooks: new Map(), hookTick: () => -1, seats };
|
|
192
|
+
const items = declaredItemScriptBindings(shard.items, first.id);
|
|
193
|
+
const motion = new MoverScriptDriver(data, host).install(host, { content: { ...row.composition, identity: shard.identity }, rules: row.rules, assets: modules,
|
|
194
|
+
declarations: row.itemRole === undefined ? [] : [{ row: row.itemRole, entities: items.entities, actors: items.actors }] },
|
|
195
|
+
{ id: row.systemId, restoring, restoreFlags: new Set(host.flags.all), drive: true, permissions: () => new Map(row.permissions.map(grant => [grant.mover, flagValue(host.flags, grant.flags)])) });
|
|
196
|
+
routeLifts(host, shard, motion);
|
|
197
|
+
if (shard.questHost?.observations.some(binding => binding.kind === 'mover' && binding.state === 'at-end')) host.onStep(`${row.systemId}.endpoints`, () => { motion.drainEndEvents(); });
|
|
198
|
+
if (items.entities.length > 0 && motion.lane !== undefined) {
|
|
199
|
+
seats.bind({ lane: motion.lane, items: shard.items, handle: numericScriptEntityId });
|
|
200
|
+
host.onStep(`${row.systemId}.seats`, seats.step);
|
|
201
|
+
}
|
|
202
|
+
return { hooks: items.hooks(motion.scriptHost), hookTick: () => motion.scriptHost.currentTick, motion, seats };
|
|
203
|
+
})();
|
|
204
|
+
const ledger = ledgerPorts(context.emit);
|
|
205
|
+
return { ...environment, ledger, ...population.install(host, ledger, context.snapshot, borrowedDecisionAuthority(shard, assets, sections, {
|
|
206
|
+
scope: host.scope, events: host.events, flags: host.flags, get physics() { return host.physics; }, player: focusPlayer(host), groundHeightAt: host.groundHeightAt.bind(host),
|
|
207
|
+
live: actor => host.entities.get(actor.entityId) === actor, fixed: (id, run, scope) => { scope.onDispose(host.onStep(id, run)); }, say: (name, args) => { sayFightView(host, name, args); },
|
|
208
|
+
})) };
|
|
209
|
+
} };
|
|
210
|
+
}
|
|
211
|
+
export interface NativeRuntimeRecipe extends RuntimeWorldRecipe {
|
|
212
|
+
readonly runtime: {
|
|
213
|
+
readonly weapon: { readonly id: string; readonly stowOnBoard?: boolean; readonly questWorld?: boolean; readonly worldReactionAction?: number };
|
|
214
|
+
readonly quest: { readonly spots: 'metadata' | QuestGraphPorts['spots']; readonly crack?: boolean };
|
|
215
|
+
readonly columns?: boolean;
|
|
216
|
+
readonly entries?: TerrainEntryWalk;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
interface NativeRuntimeContext {
|
|
220
|
+
readonly restoring: boolean; readonly snapshot?: Readonly<Omit<SimSnapshot, 'physics'>>;
|
|
221
|
+
readonly emit: (effect: NativeRuntimeEffect) => void; readonly commands: () => readonly NativeMeleeInput[];
|
|
222
|
+
/** Another player's commands this tick. */
|
|
223
|
+
readonly playerCommands?: (id: string) => readonly NativeMeleeInput[];
|
|
224
|
+
}
|
|
225
|
+
/** Native quest facts, rewards and bounded player-facing contact hints publish only with a completed tick. */
|
|
226
|
+
export type NativeRuntimeEffect = Parameters<Parameters<typeof ledgerPorts>[0]>[0] | { readonly kind: 'hint'; readonly text: string };
|
|
227
|
+
interface NativeRuntimePlan {
|
|
228
|
+
readonly level: SimLevel; readonly ports: Awaited<ReturnType<typeof prepareRuntimeWorld>>['ports'];
|
|
229
|
+
readonly install: (host: SimHost, context: NativeRuntimeContext) => void;
|
|
230
|
+
readonly proveEntries?: (host: SimHost) => ReturnType<typeof proveTerrainEntries>;
|
|
231
|
+
}
|
|
232
|
+
/** Complete declared native owners on the caller's one host, with original install phases and restore authority. */
|
|
233
|
+
export async function prepareRuntimePlan(shard: Shardfile, assets: ReadonlyMap<string, Uint8Array>, baked: unknown, recipe: NativeRuntimeRecipe,
|
|
234
|
+
sections: ReadonlyMap<string,unknown> = outputDescriptor(shard)?.sections ?? new Map()): Promise<NativeRuntimePlan> {
|
|
235
|
+
const row = recipe.runtime, weapon = weaponRow(shard, row.weapon.id);
|
|
236
|
+
const targets = sections.has('world/targets') ? parseWorldTargets(sections.get('world/targets')) : undefined;
|
|
237
|
+
if (targets !== undefined) { const errors=worldTargetRules(targets,shard);if(errors.length>0)throw new Error(errors.join('; ')); }
|
|
238
|
+
const ownsTargets = targets?.targets.some(target=>target.weapon===weapon.id) === true;
|
|
239
|
+
const world = await prepareRuntimeWorld(shard, assets, baked, recipe, sections);
|
|
240
|
+
const quest = shard.questHost;
|
|
241
|
+
if (quest === undefined || quest === null) throw new Error('Missing admitted native quest host');
|
|
242
|
+
const metadata = row.quest.spots === 'metadata' ? readRuntimeWorldMetadata(baked, true) : undefined;
|
|
243
|
+
const spots = metadata?.spots ?? row.quest.spots;
|
|
244
|
+
if (spots === 'metadata') throw new Error('Missing admitted native quest spots');
|
|
245
|
+
const plan: NativeRuntimePlan = { level: world.level, ports: world.ports, install: (host, context) => {
|
|
246
|
+
const environment = world.install(host, context), { ledger, keeper, encounter } = environment;
|
|
247
|
+
const reactions = ownsTargets || row.weapon.worldReactionAction === undefined ? undefined : (() => {
|
|
248
|
+
const page = quest.page;
|
|
249
|
+
const declarations = page === undefined || 'version' in page ? undefined : page.world;
|
|
250
|
+
if (declarations === undefined) throw new Error('Missing admitted quest world reactions');
|
|
251
|
+
return bindQuestWorldReactions(declarations, { flags: host.flags });
|
|
252
|
+
})();
|
|
253
|
+
const loadout = bindNativeLoadout(host, { slots: [0], initial: 0, lower: 0, raise: 0 }, {
|
|
254
|
+
owned: () => true, lockedFor: player => encounter.locked() || (row.weapon.stowOnBoard === true && player.board.on),
|
|
255
|
+
});
|
|
256
|
+
const playerCommands = context.playerCommands;
|
|
257
|
+
const melee = installNativeMelee(host, weapon, weapon.native, { inputCommands: context.commands,
|
|
258
|
+
enabled: () => loadout.live(0),
|
|
259
|
+
...(playerCommands === undefined ? {} : { others: { commands: player => playerCommands(player.id),
|
|
260
|
+
enabled: player => !encounter.locked() && !(row.weapon.stowOnBoard === true && player.board.on),
|
|
261
|
+
hook: player => environment.seats.hooks(player.id).get(weapon.id) ?? null } }),
|
|
262
|
+
...(row.weapon.questWorld ? { questWorld: { row: quest, spots } } : {}),
|
|
263
|
+
hook: environment.hooks.get(weapon.id) ?? null, hookTick: environment.hookTick,
|
|
264
|
+
...(reactions === undefined ? {} : { landed: (action: number, from: Vector3, dir: Vector3) => { if (action === row.weapon.worldReactionAction) reactions.scan(from, dir); } }),
|
|
265
|
+
});
|
|
266
|
+
const questRuntime = installDeclaredQuestHost(host, shard, { ...ledger, spots,
|
|
267
|
+
...(row.quest.crack ? { crack: { reach: { light: weapon.light.range, heavy: weapon.heavy.range }, cracked: melee.cracked } } : {}),
|
|
268
|
+
...(metadata === undefined ? {} : { promptRegistrations: parsePromptRegistrations(metadata.promptRegistrations) }),
|
|
269
|
+
commands: pickCommands(context.commands, command => {
|
|
270
|
+
if (command.kind !== 'script') return undefined;
|
|
271
|
+
if (command.actorId === undefined || command.value === undefined || !Number.isFinite(command.value)) throw new Error('Invalid admitted native script command');
|
|
272
|
+
return { actorId: command.actorId, value: command.value, ...(command.playerId === undefined ? {} : { playerId: command.playerId }) };
|
|
273
|
+
}), mechanics: { ...(environment.motion === undefined ? {} : { motion: environment.motion }),
|
|
274
|
+
encounters: new Map([[parseBossOwnerRow(recipe.population.owner).actor, encounter]]) },
|
|
275
|
+
});
|
|
276
|
+
if (ownsTargets) bindNativeWorldTargets(host, melee, questRuntime, targets, context.emit);
|
|
277
|
+
if (row.columns) bindPlayerColumns(host, shard.modes?.traverse ?? []);
|
|
278
|
+
keeper.settle();
|
|
279
|
+
} };
|
|
280
|
+
const entries = row.entries;
|
|
281
|
+
return entries === undefined ? plan : { ...plan, proveEntries: host => proveTerrainEntries(host.physics, shard.entryways, world.ports.heightAt, entries) };
|
|
282
|
+
}
|
|
283
|
+
/** Attach admitted contacts after the existing quest owner is installed, without a second melee or script clock. */
|
|
284
|
+
export function bindNativeWorldTargets(host: Pick<SimHost,'flags'>, melee: NativeMeleeOwner,
|
|
285
|
+
quest: Pick<ReturnType<typeof installDeclaredQuestHost>,'rules'|'run'>, input: unknown, emit: (effect: Extract<NativeRuntimeEffect,{kind:'hint'}>)=>void): void {
|
|
286
|
+
const contacts = new WorldTargetHost(input, {
|
|
287
|
+
flags:{has:id=>quest.rules.has(id),set:id=>{host.flags.set(id);}},
|
|
288
|
+
interactions:new Map(quest.rules.data.rows.map(row=>[row.id,{run:()=>quest.run(row.id).ok}])),
|
|
289
|
+
hints:{show:text=>{emit({kind:'hint',text});}},
|
|
290
|
+
});
|
|
291
|
+
melee.family.bindWorldTargets(contacts);
|
|
292
|
+
}
|
|
293
|
+
/** A declared weapon row (`shard.items`) by id; an absent or non-weapon row refuses. */
|
|
294
|
+
export function weaponRow(shard: Pick<Shardfile, 'items'>, id: string): Extract<Shardfile['items']['rows'][number], { kind: 'weapon' }> {
|
|
295
|
+
const row = shard.items.rows.find(item => item.id === id);
|
|
296
|
+
if (row?.kind !== 'weapon') throw new Error(`Missing declared weapon ${id}`);
|
|
297
|
+
return row;
|
|
298
|
+
}
|
|
299
|
+
/** The fact and coin ports every declared owner takes, emitted into a trusted runtime's tick effects. */
|
|
300
|
+
export function ledgerPorts(emit: (effect: { kind: 'fact'; name: string; actorId: string } | { kind: 'coins'; amount: number; actorId: string }) => void): {
|
|
301
|
+
readonly fact: (name: string, actorId: string) => void; readonly coins: (amount: number, actorId: string) => void;
|
|
302
|
+
} {
|
|
303
|
+
return { fact: (name, actorId) => { emit({ kind: 'fact', name, actorId }); }, coins: (amount, actorId) => { emit({ kind: 'coins', amount, actorId }); } };
|
|
304
|
+
}
|
|
305
|
+
/** The tick protocol's command allowance (sdk/tickProtocol.ts): one tick never carries more. */
|
|
306
|
+
const MAX_TICK_COMMANDS = 1024;
|
|
307
|
+
/** Metres past a prompt's radius a press still counts: the server has feet below the eye a page picks from, and a command behind it. */
|
|
308
|
+
const PROMPT_SLACK = 2.5;
|
|
309
|
+
/**
|
|
310
|
+
* One owner's view of a trusted runtime's tick commands: each lent command in tape order through `pick` (undefined skips
|
|
311
|
+
* it) into one reused list, so a step allocates no list; a tick past the protocol's allowance refuses.
|
|
312
|
+
*/
|
|
313
|
+
export function pickCommands<C, T>(commands: () => readonly C[], pick: (command: C) => T | undefined): () => readonly T[] {
|
|
314
|
+
const out: T[] = [], overflow = new RangeError('Tick commands exceed the protocol allowance');
|
|
315
|
+
return () => {
|
|
316
|
+
out.length = 0;
|
|
317
|
+
const list = commands(); if (list.length > MAX_TICK_COMMANDS) throw overflow;
|
|
318
|
+
for (let i = 0; i < MAX_TICK_COMMANDS; i++) {
|
|
319
|
+
const command = list[i]; if (command === undefined) break;
|
|
320
|
+
const picked = pick(command); if (picked !== undefined) out.push(picked);
|
|
321
|
+
}
|
|
322
|
+
return out;
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const dayClockContinuation = v.strictObject({
|
|
327
|
+
value: v.number(), paused: v.boolean(), scale: v.number(), cycle: v.number(),
|
|
328
|
+
held: v.nullable(v.strictObject({ value: v.number(), paused: v.boolean() })),
|
|
329
|
+
last: v.picklist(['dawn', 'day', 'golden', 'dusk', 'night']),
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
/** Positive stable actor handle; reordering spawns changes nothing. Hash collisions are refused during composition. */
|
|
333
|
+
export function numericScriptEntityId(id: string): number { return (fnv1a32(id) & 0x7fffffff) || 1; }
|
|
334
|
+
/** The existing client can lend its physics/player/fixed-step driver; Node owns them by default. */
|
|
335
|
+
export interface ShardfileSimPorts extends SimHostPorts {
|
|
336
|
+
/** Hash/size-verified format-2 platform payloads; v1 never imports author source. */
|
|
337
|
+
sections?: ReadonlyMap<string, unknown> | undefined;
|
|
338
|
+
weapon?: SimStrike; quest?: QuestDataPorts; hooks?: QuestScriptBindings; scriptRules?: EffectRules;
|
|
339
|
+
encounters?: Parameters<typeof installDeclaredEncounters>[2]; hud?: Parameters<typeof installDeclaredEncounters>[3];
|
|
340
|
+
water?: WaterBodies; colliders?: ReadonlyMap<string, PropColliderPort>;
|
|
341
|
+
/** Trusted native actor recipes; a declaration without its required family port refuses boot. */
|
|
342
|
+
brains?: DeclaredBrainPorts;
|
|
343
|
+
/** Embedded data hosts lend their real player impulse owner; Node uses its owned serialized impulse. */
|
|
344
|
+
creatureImpulse?: (velocity: Vector3) => void;
|
|
345
|
+
/** Trusted perception, prey/taming and body recipes for one controller per ordered pack/herd group. */
|
|
346
|
+
groups?: DeclaredGroupPorts;
|
|
347
|
+
/** Trusted terrain, observation and presentation recipes; every crowd is preflighted before setup. */
|
|
348
|
+
crowds?: (host: SimHost) => DeclaredCrowdPorts;
|
|
349
|
+
/** Trusted custom-policy observations and strike execution; aliases and actors belong to this factory. */
|
|
350
|
+
scriptBrains?: (host: SimHost) => Pick<DeclaredScriptBrainPorts, 'ports'> & Partial<Pick<DeclaredScriptBrainPorts, 'query'>>;
|
|
351
|
+
scriptEntities?: { entities: readonly ScriptEntity[]; actors: ReadonlyMap<number, string> };
|
|
352
|
+
/** Tick-admitted numeric command values; the existing authoritative lane samples them once per fixed step. */
|
|
353
|
+
commands?: () => ReadonlyMap<string, number>;
|
|
354
|
+
query?: Parameters<typeof createShardfileScriptLane>[2]['query']; navigation?: Parameters<typeof scriptPhysicsQueries>[0]['navigation'];
|
|
355
|
+
/** Borrowed client controls and mode registry; owned Node hosts consume admitted movement commands instead. */
|
|
356
|
+
ladders?: LadderClientPorts;
|
|
357
|
+
restoring?: boolean;
|
|
358
|
+
/** The normal client or regional registry already owns its four platform sockets. */
|
|
359
|
+
entrySocketsProvided?: boolean;
|
|
360
|
+
/** Embedded pages lend their actual rendered look clock; the page alone advances it. */
|
|
361
|
+
lookClock?: () => Pick<DayCycle, 'hour' | 'snapshot' | 'restore'>;
|
|
362
|
+
/** G168: a declared module crossed its failure limit and stays off (the client tells the player; Node ignores it). */
|
|
363
|
+
scriptDisabled?: ShardScriptPorts['onDisabled'];
|
|
364
|
+
}
|
|
365
|
+
/** Authoritative handles for UI, quests and the existing client fixed-step driver. */
|
|
366
|
+
export interface ShardfileSimulation {
|
|
367
|
+
/** Actual page-order prompt selected from native eye position, distance and world LOS. */
|
|
368
|
+
selectedInteraction: (player?: string) => string | null;
|
|
369
|
+
/** Queue the selected authored scene only; absent, farther and occluded prompts refuse. `player` acts; the first player by default. */
|
|
370
|
+
interact: (id: string, player?: string) => boolean;
|
|
371
|
+
/** One player's item hooks, each acting as them. */
|
|
372
|
+
itemHooks: ScriptSeats['hooks'];
|
|
373
|
+
decisions?: ShardDecisions;
|
|
374
|
+
host: SimHost; lane: ScriptLanePort | undefined; actors: ReadonlyMap<string, number>; quest: DeclaredQuests;
|
|
375
|
+
encounters: ReturnType<typeof installDeclaredEncounters>; water: WaterBodies; colliders: ReadonlyMap<string, PropColliderPort>; dispose: () => void;
|
|
376
|
+
groups: ReadonlyMap<string, DeclaredGroupPolicy>;
|
|
377
|
+
crowds: PreparedCrowds['policies'];
|
|
378
|
+
movers: MoverRuntime | undefined;
|
|
379
|
+
}
|
|
380
|
+
/** One declared simulation core, used by the normal browser loader and the headless author validator. */
|
|
381
|
+
function shardfileSimInput(shard: Shardfile, assets: ReadonlyMap<string, Uint8Array>, ports: ShardfileSimPorts): {level: SimLevel; ports: SimHostPorts} {
|
|
382
|
+
if (shard.nativeGround !== null) throw new Error('Native ground retains its trusted runtime simulation; a flat declared proxy is forbidden');
|
|
383
|
+
const portals = portalLinkEntries(shard.entryways), portalErrors = portalLinkRules(portals, shard);
|
|
384
|
+
if (portalErrors.length > 0) throw new Error(portalErrors.join('; '));
|
|
385
|
+
validatePortalFloors(portals, shard, assets);
|
|
386
|
+
validateMeshCollisionAssets(shard, assets);
|
|
387
|
+
validateMeshEntryways(shard, assets);
|
|
388
|
+
const bytes = shard.terrain === null ? undefined : assets.get(shard.terrain.collider);
|
|
389
|
+
if (shard.terrain !== null && bytes === undefined) throw new Error('Missing admitted terrain collider');
|
|
390
|
+
const terrain = bytes === undefined ? undefined : decodeTerrainTile(bytes);
|
|
391
|
+
const heightAt = shard.meshCollision === null ? terrain === undefined ? () => 0 : tileHeightAt(terrain)
|
|
392
|
+
: clientGround(shard, assets).heightAt;
|
|
393
|
+
const weapon = ports.weapon ?? HOST_PROBE;
|
|
394
|
+
return {level: { version: SIM_API_VERSION, id: shard.identity.slug, seed: shard.identity.seed,
|
|
395
|
+
ground: { size: 500, height: 0 }, player: { at: { x: shard.spawn.x, y: shard.spawn.y, z: shard.spawn.z }, yaw: shard.spawn.yaw, speed: Math.min(5, shard.authorCaps.speed) },
|
|
396
|
+
entities: buildPlatformSpawns(shard.creatures.spawns, speciesResolver(shard.rows), simStrikes(shard.rows)), weapon, quests: [],
|
|
397
|
+
}, ports: { ...ports, ground: ports.ground !== false && terrain === undefined && shard.meshCollision === null && shard.entryways.some(entry => (entry.kind ?? 'ground') === 'ground'), heightAt }};
|
|
398
|
+
}
|
|
399
|
+
/** Install the ordinary native simulation once. */
|
|
400
|
+
export function createShardfileSim(shard: Shardfile, assets: ReadonlyMap<string, Uint8Array>, ports: ShardfileSimPorts): ShardfileSimulation {
|
|
401
|
+
const input = shardfileSimInput(shard, assets, ports);
|
|
402
|
+
return bindShardfileSim(createSimHost(input.level, input.ports), shard, assets, ports);
|
|
403
|
+
}
|
|
404
|
+
/** Install once before deciding exact versus logical/fresh continuation from the complete native basis. */
|
|
405
|
+
export function prepareShardfileSimRestore(shard: Shardfile, assets: ReadonlyMap<string, Uint8Array>, ports: ShardfileSimPorts): PreparedSimHostRestore & {readonly simulation: ShardfileSimulation} {
|
|
406
|
+
const input = shardfileSimInput(shard, assets, ports), target = prepareSimHostRestore(input.level, input.ports);
|
|
407
|
+
try { return { ...target, simulation: bindShardfileSim(target.host, shard, assets, ports) }; }
|
|
408
|
+
catch (error) { target.host.dispose(); throw error; }
|
|
409
|
+
}
|
|
410
|
+
/** Replace a private Object.entries snapshot value, preserving its tuple and
|
|
411
|
+
* the downstream native observation validation rather than making a second pair. */
|
|
412
|
+
/** TE-ENG1: a decision's scene field writes the scene lane's public shared state; no lane, no port. */
|
|
413
|
+
function sceneFields(lane: ScriptLanePort | undefined): DecisionRuntime['scene'] {
|
|
414
|
+
return lane === undefined ? undefined : { write: (field, value) => { lane.world.writePublicShared(field, value); } };
|
|
415
|
+
}
|
|
416
|
+
function observationValue(entry: [string, unknown], value: boolean): asserts entry is [string, boolean] { entry[1] = value; }
|
|
417
|
+
|
|
418
|
+
/** Reinstall matching adapters into a fresh standalone restore host; restoring skips collider allocation and stepping. */
|
|
419
|
+
export function bindShardfileSim(host: SimHost, shard: Shardfile, assets: ReadonlyMap<string, Uint8Array>, ports: ShardfileSimPorts): ShardfileSimulation {
|
|
420
|
+
const seats = scriptSeats(host), { first } = seats;
|
|
421
|
+
// TE-ENG7: each declared body names its species on the wire. Set here, on create and on restore alike, and never in
|
|
422
|
+
// the level's spec, so a save keeps its level fingerprint.
|
|
423
|
+
for (const spawn of shard.creatures.spawns) { const body = host.entities.get(spawn.id); if (body !== undefined) body.species = spawn.species; }
|
|
424
|
+
if (shard.nativeGround !== null) throw new Error('Native ground retains its trusted runtime simulation; a flat declared proxy is forbidden');
|
|
425
|
+
const levelId = shard.identity.slug;
|
|
426
|
+
if (host.level.id !== levelId || host.level.seed !== shard.identity.seed || host.entities.size !== shard.creatures.spawns.length || shard.creatures.spawns.some((row) => !host.entities.has(row.id))) throw new Error('Shardfile simulation host mismatch');
|
|
427
|
+
try {
|
|
428
|
+
installLadders(host, shard.modes?.traverse.filter(row => row.kind === 'ladder') ?? [], ports.ladders);
|
|
429
|
+
const portals = portalLinkEntries(shard.entryways), portalErrors = portalLinkRules(portals, shard);
|
|
430
|
+
if (portalErrors.length > 0) throw new Error(portalErrors.join('; '));
|
|
431
|
+
validatePortalFloors(portals, shard, assets);
|
|
432
|
+
validateMeshCollisionAssets(shard, assets);
|
|
433
|
+
validateMeshEntryways(shard, assets);
|
|
434
|
+
const bytes = shard.terrain === null ? undefined : assets.get(shard.terrain.collider);
|
|
435
|
+
if (shard.terrain !== null && bytes === undefined) throw new Error('Missing admitted terrain collider');
|
|
436
|
+
const terrain = bytes === undefined ? undefined : decodeTerrainTile(bytes);
|
|
437
|
+
if (terrain !== undefined) host.setHeightQuery(tileHeightAt(terrain));
|
|
438
|
+
if (!ports.restoring && bytes !== undefined) addBakedTerrainCollider(host.physics, bytes, host.scope);
|
|
439
|
+
const liftEntries = socketLiftEntries(shard.entryways), resetMovers = new Set(liftEntries.flatMap(entry => [entry.lift.mover, entry.lift.gate]));
|
|
440
|
+
if (liftEntries.length > 0 && !host.embedded && !ports.restoring && !ports.entrySocketsProvided) installEntrySockets(host.physics, host.scope, [{ x: 0, z: 0 }]);
|
|
441
|
+
const water = ports.water ?? new WaterBodies();
|
|
442
|
+
if (ports.water === undefined) for (const row of [...shard.water].sort((a, b) => Number(a.kind === 'sea') - Number(b.kind === 'sea'))) water.add(declaredWaterBody(row), host.scope);
|
|
443
|
+
const ids = shardfileColliderIds(shard);
|
|
444
|
+
if (portals.length > 0) {
|
|
445
|
+
const safe = () => { if (portalTransitioning(host.physics)) throw new Error('Cannot step or snapshot during a portal transfer'); };
|
|
446
|
+
host.onStep('portal.declared', safe, { snapshot: () => { safe(); return null; }, restore: value => {
|
|
447
|
+
if (value !== null) throw new Error('Portal continuation cannot contain a mid-transfer state');
|
|
448
|
+
} });
|
|
449
|
+
}
|
|
450
|
+
const colliders = ports.colliders ?? installShardfileColliders(shard, assets, () => host.physics, host.scope, ports.restoring);
|
|
451
|
+
if (ids.length !== colliders.size || ids.some(id => !colliders.has(id))) throw new Error('Declared collider port mismatch');
|
|
452
|
+
if (shard.meshCollision !== null) {
|
|
453
|
+
// Layered native floors follow each creature's own height, never the top of an overhang above its head.
|
|
454
|
+
host.setHeightQuery(clientGround(shard, assets).heightAt);
|
|
455
|
+
host.setFloorQuery((x, z, fromY, maxDrop) => floorBelow(host.physics, x, z, fromY, maxDrop));
|
|
456
|
+
for (const actor of host.entities.values()) actor.groundHeight = (x, z, fromY) => floorBelow(host.physics, x, z, fromY, 500) ?? -250;
|
|
457
|
+
}
|
|
458
|
+
let pendingColliders: ReadonlyMap<string, PropColliderState> | undefined;
|
|
459
|
+
if (ids.length > 0) host.onStep('props.declared', () => undefined, {
|
|
460
|
+
snapshot: () => Object.fromEntries([...colliders].map(([id, port]) => [id, { handles: port.snapshot().handles }])),
|
|
461
|
+
restore: (value: SimValue) => {
|
|
462
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value) || Object.keys(value).length !== colliders.size) throw new Error('Invalid declared collider continuation');
|
|
463
|
+
const states = new Map<string, PropColliderState>();
|
|
464
|
+
for (const [id] of colliders) {
|
|
465
|
+
const state = value[id];
|
|
466
|
+
if (state === null || typeof state !== 'object' || Array.isArray(state) || !Array.isArray(state['handles']) || Object.keys(state).length !== 1) throw new Error('Invalid declared collider handles');
|
|
467
|
+
const handles: number[] = [];
|
|
468
|
+
for (const handle of state['handles']) {
|
|
469
|
+
if (typeof handle !== 'number' || !Number.isFinite(handle) || handle < 0) throw new Error('Invalid declared collider handle');
|
|
470
|
+
handles.push(handle);
|
|
471
|
+
}
|
|
472
|
+
states.set(id, { handles });
|
|
473
|
+
}
|
|
474
|
+
// The native snapshot replaces the constructor world after adapter.restore. Validate mesh geometry
|
|
475
|
+
// and reconnect only after that replacement, against the actual saved world rather than its placeholder.
|
|
476
|
+
if ((ports.restoring || isSimHostRestoring(host)) && shard.meshCollision !== null) pendingColliders = states;
|
|
477
|
+
else for (const [id, state] of states) colliders.get(id)?.restore(state);
|
|
478
|
+
},
|
|
479
|
+
...(shard.meshCollision !== null ? { physicsRestored: () => {
|
|
480
|
+
if (pendingColliders === undefined) throw new Error('Missing declared mesh continuation');
|
|
481
|
+
for (const [id, state] of pendingColliders) colliders.get(id)?.restore(state);
|
|
482
|
+
pendingColliders = undefined;
|
|
483
|
+
} } : {}),
|
|
484
|
+
});
|
|
485
|
+
const hooks = ports.hooks ?? shard.hooks;
|
|
486
|
+
const actors = new Map<string, number>(), reverse = new Map<number, string>();
|
|
487
|
+
for (const id of [first.id, ...host.entities.keys()]) {
|
|
488
|
+
const handle = numericScriptEntityId(id); if (reverse.has(handle)) throw new Error('Script actor handle collision');
|
|
489
|
+
actors.set(id, handle); reverse.set(handle, id);
|
|
490
|
+
}
|
|
491
|
+
const custom = new Map(shard.creatures.brains.filter((brain) => brain.kind === 'script').map((brain) => [brain.id, brain]));
|
|
492
|
+
const brainBindings = shard.creatures.spawns.flatMap((spawn) => {
|
|
493
|
+
const brain = spawn.brain === null ? undefined : custom.get(spawn.brain);
|
|
494
|
+
return brain === undefined ? [] : [{ actorId: spawn.id, entity: numericScriptEntityId(`brain:${spawn.id}`), brain }];
|
|
495
|
+
});
|
|
496
|
+
if (brainBindings.length > 0 && ports.scriptBrains === undefined) throw new Error('Missing custom brain port');
|
|
497
|
+
const dataPorts = shard.runtime === null ? dataCreaturePorts(host, shard.rows, shard.creatures.spawns, ports.creatureImpulse) : undefined;
|
|
498
|
+
const groupIds = new Set(shard.creatures.groups.map((group) => group.id));
|
|
499
|
+
const preparedGroups = prepareDeclaredGroupBrains(host, shard.creatures.groups, shard.creatures.spawns, ports.groups ?? dataPorts?.groups ?? {},
|
|
500
|
+
shard.creatures.brains.map((brain) => brain.id), shard.encounters.map((row) => row.entity));
|
|
501
|
+
if (shard.crowds.length > 0 && ports.crowds === undefined) throw new Error('Missing declared crowd ports');
|
|
502
|
+
const preparedCrowds = prepareDeclaredCrowds(shard.crowds, ports.crowds?.(host) ?? { flock: () => { throw new Error('Missing declared crowd recipe'); } });
|
|
503
|
+
let lane: ScriptLanePort | undefined;
|
|
504
|
+
let movers: MoverRuntime | undefined;
|
|
505
|
+
if (shard.sim.scripts.length > 0) {
|
|
506
|
+
const entities = new Map<number, ScriptEntity>();
|
|
507
|
+
for (const [id, handle] of actors) {
|
|
508
|
+
const position = id === first.id ? first.position : host.entities.get(id)?.position;
|
|
509
|
+
if (position === undefined) throw new Error('Missing host actor');
|
|
510
|
+
entities.set(handle, { id: handle, name: id, position: [position.x, position.y, position.z], fields: {}, frozen: false, interactive: true });
|
|
511
|
+
}
|
|
512
|
+
const trusted = ports.scriptEntities ?? declaredItemScriptBindings(shard.items, first.id);
|
|
513
|
+
for (const entity of trusted.entities) {
|
|
514
|
+
if (entities.has(entity.id)) throw new Error('Duplicate trusted script entity'); entities.set(entity.id, entity);
|
|
515
|
+
}
|
|
516
|
+
for (const [handle, actor] of trusted.actors) {
|
|
517
|
+
if (reverse.has(handle) || !entities.has(handle) || !actors.has(actor)) throw new Error('Invalid trusted owned-entity actor'); reverse.set(handle, actor);
|
|
518
|
+
}
|
|
519
|
+
for (const binding of shard.sim.bindings) {
|
|
520
|
+
if (binding.actorId !== null) {
|
|
521
|
+
if (reverse.get(binding.entity) !== binding.actorId) throw new Error('Script actor binding does not match host identity');
|
|
522
|
+
} else if (!entities.has(binding.entity)) entities.set(binding.entity, { id: binding.entity, name: `director:${binding.entity}`, position: [0, 0, 0], fields: {}, frozen: false, interactive: true });
|
|
523
|
+
else if (reverse.has(binding.entity)) throw new Error('Actor-free script cannot reuse an actor handle');
|
|
524
|
+
}
|
|
525
|
+
const aliases = new Set<number>();
|
|
526
|
+
for (const binding of brainBindings) {
|
|
527
|
+
if (entities.has(binding.entity) || aliases.has(binding.entity)) throw new Error('Custom brain alias collision');
|
|
528
|
+
aliases.add(binding.entity);
|
|
529
|
+
}
|
|
530
|
+
for (const mover of shard.movers) {
|
|
531
|
+
if (entities.has(mover.entity) || aliases.has(mover.entity)) throw new Error('Mover script alias collision');
|
|
532
|
+
aliases.add(mover.entity);
|
|
533
|
+
}
|
|
534
|
+
if (entities.size + aliases.size > shard.serverBudget.entities) throw new Error('Aggregate script entity allowance');
|
|
535
|
+
const options: ShardScriptPorts = {
|
|
536
|
+
rules: ports.scriptRules ?? { fields: {}, archetypes: [], events: [...new Set([...hooks.scenes.map((scene) => scene.type), ...shard.items.rows.flatMap((row) => row.hook === null ? [] : [row.hook.event])])], maxEntities: shard.serverBudget.entities },
|
|
537
|
+
entities: [...entities.values()], actors: reverse, seatsFor: first.id,
|
|
538
|
+
...(ports.scriptDisabled === undefined ? {} : { onDisabled: ports.scriptDisabled }),
|
|
539
|
+
query: ports.query ?? ((kind, input, entity) => scriptPhysicsQueries({ physics: host.physics, navigation: ports.navigation ?? { closestWalkable: () => null, findPath: () => null }, handle: (owner) => typeof owner === 'string' ? actors.get(owner) : undefined })(kind, input, entity)),
|
|
540
|
+
};
|
|
541
|
+
const moverDriver = shard.movers.length === 0 ? undefined : new MoverScriptDriver(shard.movers, options.query, [...resetMovers]);
|
|
542
|
+
if (brainBindings.length > 0) {
|
|
543
|
+
if (ports.scriptBrains === undefined) throw new Error('Missing custom brain port');
|
|
544
|
+
const trustedBrains = ports.scriptBrains(host);
|
|
545
|
+
if (typeof trustedBrains.ports.observe !== 'function' || typeof trustedBrains.ports.mayAttack !== 'function' || typeof trustedBrains.ports.strike !== 'function') throw new Error('Missing custom brain observation or strike recipe');
|
|
546
|
+
const brainPorts = { ...trustedBrains, query: trustedBrains.query ?? options.query, actors: host.entities, bindings: brainBindings };
|
|
547
|
+
lane = moverDriver === undefined ? createShardfileComposedLane(shard, assets, options, brainPorts) : moverDriver.compose(shard, assets, options, brainPorts);
|
|
548
|
+
} else lane = moverDriver === undefined ? createShardfileScriptLane(shard, assets, options) : moverDriver.compose(shard, assets, options);
|
|
549
|
+
if (moverDriver !== undefined) {
|
|
550
|
+
const stateWorld = lane.world;
|
|
551
|
+
const runtime = moverDriver.install(host, lane, { id: 'movers.declared', restoreFlags: new Set(host.flags.all),
|
|
552
|
+
activation: { ground: () => playerGrounds(host), shared: id => {
|
|
553
|
+
const field = shard.state.shared.find(row => row.id === id);
|
|
554
|
+
const value = field === undefined ? undefined : stateWorld.publicField(field.name);
|
|
555
|
+
return typeof value === 'number' || typeof value === 'boolean' ? value : undefined;
|
|
556
|
+
} }, ...(ports.restoring === undefined ? {} : { restoring: ports.restoring }) });
|
|
557
|
+
movers = runtime;
|
|
558
|
+
if (!host.embedded) routeLifts(host, shard, runtime);
|
|
559
|
+
}
|
|
560
|
+
seats.bind({ lane, items: shard.items, actors, handle: numericScriptEntityId });
|
|
561
|
+
if (!host.embedded) host.onStep('script.seats', seats.step);
|
|
562
|
+
installScriptLane(host, 'script.declared', lane, ports.commands);
|
|
563
|
+
const stateLane = lane;
|
|
564
|
+
if (shard.state.shared.some(field => field.privacy === 'public')) publishShardState(host, () => stateLane.world.publicShared());
|
|
565
|
+
}
|
|
566
|
+
if (shard.targets.panels.length > 0) {
|
|
567
|
+
const targetLane = lane; if (targetLane === undefined) throw new Error('Target fields require an installed script lane');
|
|
568
|
+
const sync = () => syncTargetColliders(shard.targets, colliders, (scope, id) => {
|
|
569
|
+
const field = shard.state[scope].find((row) => row.id === id);
|
|
570
|
+
if (field === undefined) throw new Error('Missing target state field');
|
|
571
|
+
// One collider stands for everyone, so a player-scoped panel keeps the first player's view (shipped panels are shared).
|
|
572
|
+
const value = scope === 'shared' ? targetLane.world.publicField(field.name) : targetLane.world.viewField(first.id, scope, field.name);
|
|
573
|
+
if (value === undefined) throw new Error('Unavailable target state field');
|
|
574
|
+
return value;
|
|
575
|
+
});
|
|
576
|
+
host.onStep('targets.declared', sync); if (!ports.restoring) sync();
|
|
577
|
+
}
|
|
578
|
+
if (liftEntries.length > 0) {
|
|
579
|
+
let rider: LiftRiders = null;
|
|
580
|
+
host.onStep('lift.rider', () => undefined, { snapshot: () => captureLiftRiders(shard, { host, movers }),
|
|
581
|
+
restore: value => { rider = parseLiftRiders(value); },
|
|
582
|
+
physicsRestored: () => { restoreLiftRider(shard, { host, movers, water }, rider); },
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
const quest = new DeclaredQuests(host, shard.quests, { ...ports.quest,
|
|
586
|
+
...(lane === undefined ? {} : { script: createQuestScriptPorts(lane, hooks, actors) }),
|
|
587
|
+
});
|
|
588
|
+
installDeclaredTalks(host, shard, quest); // TE-ENG3: a no-code quest-giver's answers and each player's node
|
|
589
|
+
const needsDay = (shard.directors ?? []).some(data => Object.values(data.inputs).some(binding => directorDayRange(binding) !== null));
|
|
590
|
+
let day: (() => number) | undefined;
|
|
591
|
+
if (needsDay) {
|
|
592
|
+
if (host.embedded) {
|
|
593
|
+
const clock = ports.lookClock;
|
|
594
|
+
if (clock === undefined) throw new Error('Day director requires the page-owned look clock');
|
|
595
|
+
day = () => clock().hour;
|
|
596
|
+
host.onStep('director.day', () => undefined, { snapshot: () => JSON.stringify(clock().snapshot()), restore: value => {
|
|
597
|
+
if (typeof value !== 'string') throw new Error('Invalid director day continuation');
|
|
598
|
+
clock().restore(v.parse(dayClockContinuation, JSON.parse(value)));
|
|
599
|
+
} });
|
|
600
|
+
} else {
|
|
601
|
+
const clock = host.useDayClock(normalizedDayClock(shard.look.day ?? DEFAULT_NORMALIZED_DAY, shard.look.dayOverride));
|
|
602
|
+
day = () => clock.hour;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
for (const data of shard.directors ?? []) {
|
|
606
|
+
const bindingIssues = directorDataHostIssues(data);
|
|
607
|
+
if (bindingIssues.length > 0) throw new Error(`Director rows require native bindings for their observations and actions: ${bindingIssues.join('; ')}`);
|
|
608
|
+
if (Object.values(data.inputs).some(binding => binding.startsWith('flag:') && !shard.quests.flags.includes(binding.slice(5)))
|
|
609
|
+
|| data.stages.some(stage => stage.do.some(action => 'flag' in action && !shard.quests.flags.includes(action.flag.key)))) throw new Error('Director flag has no declared native owner');
|
|
610
|
+
const director = new DirectorStageLane(data);
|
|
611
|
+
// Cache only bounded immutable binding decodes, not observations or hosts.
|
|
612
|
+
// Each tick still snapshots the current source entries before any reads.
|
|
613
|
+
const bindings = new Map<string, { range: ReturnType<typeof directorDayRange>; flag: string }>();
|
|
614
|
+
const observeInput = (entry: [string, string]): [string, boolean] => {
|
|
615
|
+
const binding = entry[1];
|
|
616
|
+
let plan = bindings.get(binding);
|
|
617
|
+
if (plan === undefined) {
|
|
618
|
+
const range = directorDayRange(binding);
|
|
619
|
+
plan = { range, flag: range === null ? binding.slice(5) : '' };
|
|
620
|
+
if (typeof binding === 'string' && bindings.size < 16) bindings.set(binding, plan);
|
|
621
|
+
}
|
|
622
|
+
let value: boolean;
|
|
623
|
+
if (plan.range === null) value = host.flags.has(plan.flag);
|
|
624
|
+
else {
|
|
625
|
+
if (day === undefined) throw new Error('Missing director day clock');
|
|
626
|
+
value = inNormalizedDayRange(day(), plan.range[0], plan.range[1]);
|
|
627
|
+
}
|
|
628
|
+
const result: [string, unknown] = entry;
|
|
629
|
+
observationValue(result, value);
|
|
630
|
+
return result;
|
|
631
|
+
};
|
|
632
|
+
host.onStep(`director.${data.id}`, (_dt, native) => {
|
|
633
|
+
const observation = Object.fromEntries(Object.entries(data.inputs).map(observeInput));
|
|
634
|
+
for (const action of director.step(native.state.tick, observation)) {
|
|
635
|
+
if (!('flag' in action)) throw new Error('Director action has no native owner');
|
|
636
|
+
native.flags.set(action.flag.key, action.flag.value);
|
|
637
|
+
}
|
|
638
|
+
}, { snapshot: () => director.snapshot(), restore: state => {
|
|
639
|
+
if (typeof state !== 'string') throw new Error('Invalid director row continuation'); director.restore(state);
|
|
640
|
+
} });
|
|
641
|
+
}
|
|
642
|
+
installDeclaredBrains(host, shard.creatures.spawns.filter((spawn) => spawn.brain === null || (!custom.has(spawn.brain) && !groupIds.has(spawn.brain))), shard.creatures.brains.filter((brain) => brain.kind !== 'script'), ports.brains ?? dataPorts?.brains);
|
|
643
|
+
dataPorts?.install();
|
|
644
|
+
const decisionRows = decisionScriptsFromSections(ports.sections);
|
|
645
|
+
const decisionActors = new Set(decisionRows.flatMap(row => Object.values(row.actors)));
|
|
646
|
+
const decisionEncounters = new Set(shard.encounters.filter(row => decisionActors.has(row.entity)).map(row => row.id));
|
|
647
|
+
const encounters = installDeclaredEncounters(host, shard.encounters, ports.encounters ?? (() => ({ saved: { defeated: false, rewardTaken: false, kills: 0 }, persist: () => undefined, reward: () => undefined })), ports.hud, decisionEncounters);
|
|
648
|
+
const decisions = decisionRows.length === 0 ? undefined : new ShardDecisions(decisionRuntime(host, sceneFields(lane)), shard, assets, ports.sections ?? new Map(), encounters, quest, movers, ports.quest?.fact, ports.restoring ?? false, ports.navigation, ports.scriptDisabled);
|
|
649
|
+
// All individual/custom aliases and encounter recipes have admitted successfully before setup draws or group work.
|
|
650
|
+
const groups = preparedGroups.install(ports.restoring ?? false);
|
|
651
|
+
if (!host.embedded && !ports.restoring) host.physics.step();
|
|
652
|
+
// Crowd setup is last: all scripts, actor/group controllers, quests, encounters and physics have admitted.
|
|
653
|
+
const crowds = preparedCrowds.install(host, ports.restoring ?? false);
|
|
654
|
+
const picker = createHeadlessPromptPicker(host);
|
|
655
|
+
const prompts = shard.targets.interactions.map((row, act) => ({ act, id: row.id, position: { x: row.at[0], y: row.at[1], z: row.at[2] }, radius: row.radius }));
|
|
656
|
+
const selectedInteraction = (player: string = first.id): string | null => {
|
|
657
|
+
const body = host.players.get(player);
|
|
658
|
+
return body === undefined ? null : picker.pick(prompts, body.position)?.id ?? null;
|
|
659
|
+
};
|
|
660
|
+
const interact = (id: string, player: string = first.id): boolean => {
|
|
661
|
+
const row = shard.targets.interactions.find(target => target.id === id);
|
|
662
|
+
if (row === undefined) throw new Error('Unknown authored interaction');
|
|
663
|
+
if (selectedInteraction(player) !== id) return false;
|
|
664
|
+
if (decisions?.interact(id) === true) return true;
|
|
665
|
+
if (lane === undefined) throw new Error('Interaction requires an admitted scene lane');
|
|
666
|
+
seats.step(); createQuestScriptPorts(lane, hooks, actors).scene(row.scene, player); return true;
|
|
667
|
+
};
|
|
668
|
+
return { selectedInteraction, interact, itemHooks: seats.hooks, ...(decisions === undefined ? {} : { decisions }), host, lane, actors, quest, encounters, water, colliders, groups, crowds, movers, dispose: () => { host.dispose(); } };
|
|
669
|
+
} catch (error) { host.dispose(); throw error; }
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/** The normal interaction queues these commands on both the deck and its road gate. No author callback is invoked. */
|
|
673
|
+
export function commandSocketLift(runtime: MoverRuntime, lift: SocketLift, action: 1 | 2 | 3): void {
|
|
674
|
+
runtime.command(lift.mover, action); runtime.command(lift.gate, action);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/** One lift prompt as its row declares it: where it stands for a deck's pose, and when it stands nowhere at all. */
|
|
678
|
+
interface LiftPromptSpot { readonly radius: number; readonly at: (pose: MoverPose) => { readonly x: number; readonly y: number; readonly z: number } | null }
|
|
679
|
+
function liftPromptSpots(shard: Pick<Shardfile, 'clientChannels'>): Map<string, LiftPromptSpot> {
|
|
680
|
+
const spots = new Map<string, LiftPromptSpot>();
|
|
681
|
+
for (const program of shard.clientChannels ?? []) {
|
|
682
|
+
const { prompt } = program;
|
|
683
|
+
if (prompt?.action.kind !== 'socketLift') continue;
|
|
684
|
+
const lane = createClientChannels(program), axes = lane.reads.map(read => /^position\.([xyz])$/u.exec(read)?.[1]);
|
|
685
|
+
if (axes.some(axis => axis !== 'x' && axis !== 'y' && axis !== 'z')) throw new Error('A lift prompt reads its deck\'s position only');
|
|
686
|
+
spots.set(`${prompt.action.edge}:${String(prompt.action.action)}`, { radius: prompt.radius, at: pose => {
|
|
687
|
+
lane.evaluate({ time: 0, delta: 0, values: axes.map(axis => axis === 'x' ? pose.position.x : axis === 'y' ? pose.position.y : pose.position.z) });
|
|
688
|
+
const { x, y, z } = lane.frame;
|
|
689
|
+
return x === undefined || y === undefined || z === undefined ? null : { x, y, z };
|
|
690
|
+
} });
|
|
691
|
+
}
|
|
692
|
+
return spots;
|
|
693
|
+
}
|
|
694
|
+
/** A client calls a lift by name, and the prompt's own row says from where: within its radius of where it stands now, so a deck under way takes no call. */
|
|
695
|
+
function routeLifts(host: SimHost, shard: Pick<Shardfile, 'entryways' | 'clientChannels'>, runtime: MoverRuntime): void {
|
|
696
|
+
const routes = actRoutes(host), spots = liftPromptSpots(shard);
|
|
697
|
+
for (const { edge, lift } of socketLiftEntries(shard.entryways)) for (const action of [1, 2, 3] as const) routes.claims.set(liftPrompt(lift.mover, action), player => {
|
|
698
|
+
const spot = spots.get(`${edge}:${String(action)}`), body = host.players.get(player)?.position, at = spot?.at(runtime.pose(lift.mover)) ?? null;
|
|
699
|
+
if (spot !== undefined && body !== undefined && at !== null && Math.hypot(body.x - at.x, body.y - at.y, body.z - at.z) < spot.radius + PROMPT_SLACK) commandSocketLift(runtime, lift, action);
|
|
700
|
+
else routes.refused++;
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/** Native host evidence for the author-only grid and ledger workflow. */
|
|
705
|
+
export interface AuthoredGridProof {
|
|
706
|
+
version: 1; ticks: number; checkpointTick: number;
|
|
707
|
+
grid: { reserveBeforePhysics: true; runtimeFence: true; refusedSave: true; restored: true; frozenTicks: 5; loads: 2; leasesAfterDispose: 0 };
|
|
708
|
+
ledger: { facts: { name: string; actorId: string; tick: number }[]; granted: number; durableReload: true; duplicateStable: true };
|
|
709
|
+
}
|
|
710
|
+
/** Fixed native author workflow: real grid residency, checkpoint refusal/restore and quest-owned Ledger filing.
|
|
711
|
+
* The SDK supplies admitted commands, never facts, owner identities, reward catalogue entries or host modules.
|
|
712
|
+
* Profile storage is a serialized SaveStore test port; this proves the atomic contract, not browser quota availability.
|
|
713
|
+
*/
|
|
714
|
+
export async function proveAuthoredGrid(source: Shardfile, assets: ReadonlyMap<string, Uint8Array>, ports: ShardfileSimPorts,
|
|
715
|
+
plan: { ticks: number; checkpointTick: number; requiredFacts: readonly string[] },
|
|
716
|
+
inputAt: (tick: number, sim: ShardfileSimulation) => SimCommand | undefined): Promise<AuthoredGridProof> {
|
|
717
|
+
if (source.runtime !== null || !Number.isInteger(plan.ticks) || plan.ticks < 1 || plan.ticks > 4096
|
|
718
|
+
|| !Number.isInteger(plan.checkpointTick) || plan.checkpointTick < 1 || plan.checkpointTick > plan.ticks) throw new Error('Invalid author proof');
|
|
719
|
+
const insist = (ok: boolean, message: string): void => { if (!ok) throw new Error(`Author proof: ${message}`); };
|
|
720
|
+
const instance = 'author-4', allocator = new ResidencyAllocator();
|
|
721
|
+
const assembly = new GridAssembly({ developer: false, devserver: false }, {
|
|
722
|
+
version: 0, pitch: CONTENT_CAPS.pitch, cells: Array.from({ length: 9 }, (_, index) => ({ instance: `author-${index}`, slug: source.identity.slug, cell: [index % 3 - 1, Math.floor(index / 3) - 1] })),
|
|
723
|
+
emptyNeighbour: { kind: 'sea', level: 0, edgeColour: [0.5, 0.5, 0.5], fog: { colour: [0.5, 0.5, 0.5], near: 10, far: 1000 } },
|
|
724
|
+
});
|
|
725
|
+
interface Fact { name: string; actorId: string; tick: number }
|
|
726
|
+
const facts: Fact[] = [], baselineFacts: Fact[] = [];
|
|
727
|
+
const make = (record: Fact[], saved?: SimSnapshot): ShardfileSimulation => {
|
|
728
|
+
let current: ShardfileSimulation | undefined;
|
|
729
|
+
const native = { ...ports, quest: { fact: (name: string, actorId: string) => {
|
|
730
|
+
if (current === undefined) throw new Error('Fact emitted outside an installed native tick');
|
|
731
|
+
record.push({ name, actorId, tick: current.host.state.tick });
|
|
732
|
+
}, coins: () => undefined } };
|
|
733
|
+
current = createShardfileSim(source, assets, native);
|
|
734
|
+
if (saved !== undefined) {
|
|
735
|
+
const level = current.host.level; current.dispose(); current = undefined;
|
|
736
|
+
const installed: { value?: ShardfileSimulation } = {};
|
|
737
|
+
const host = restoreSimHost(level, { rapier: ports.rapier }, saved, fresh => { installed.value = bindShardfileSim(fresh, source, assets, { ...native, restoring: true }); });
|
|
738
|
+
current = installed.value;
|
|
739
|
+
if (current === undefined) { host.dispose(); throw new Error('Missing restored author owner'); }
|
|
740
|
+
}
|
|
741
|
+
return current;
|
|
742
|
+
};
|
|
743
|
+
const highway = make([]), baseline = make(baselineFacts);
|
|
744
|
+
let resident: ShardfileSimulation | undefined, admitted = false, durable = false, loads = 0;
|
|
745
|
+
const saved = new Map<string, SimSnapshot>();
|
|
746
|
+
const grid = new GridSimulation(assembly, { highway, allocator, residentBytes: () => source.budgets.sim.resident,
|
|
747
|
+
admitted: () => admitted, read: id => saved.get(id), save: (id, value) => { if (!durable) return false; saved.set(id, structuredClone(value)); return true; },
|
|
748
|
+
load: (_cell, snapshot) => { insist(allocator.has(`sim:${instance}`), 'physics allocated before reservation'); loads++; resident = make(facts, snapshot); return Promise.resolve(resident); },
|
|
749
|
+
});
|
|
750
|
+
try {
|
|
751
|
+
insist(!grid.ready(instance), 'unloaded cell is ready'); await grid.prefetch([instance]);
|
|
752
|
+
insist(!grid.ready(instance), 'physics bypassed runtime admission'); admitted = true;
|
|
753
|
+
insist(grid.ready(instance), 'admitted cell is unavailable'); (await grid.prepare(null, instance)).commit();
|
|
754
|
+
if (resident === undefined) throw new Error('Missing author residency');
|
|
755
|
+
const healthy = (value: ShardfileSimulation): void => {
|
|
756
|
+
insist(!value.lane?.host.checkpoint().modules.some(module => module.failures > 0 || module.disabled), 'script failed');
|
|
757
|
+
insist([...value.host.players.values(), ...value.host.entities.values()].map(body => body.position).every(point => [point.x, point.y, point.z].every(Number.isFinite)), 'nonfinite native pose');
|
|
758
|
+
};
|
|
759
|
+
for (let tick = 0; tick < plan.checkpointTick; tick++) { grid.step(inputAt(tick, resident)); healthy(resident); }
|
|
760
|
+
insist(!grid.checkpoint(instance), 'failed durable save admitted'); durable = true;
|
|
761
|
+
insist(grid.checkpoint(instance), 'durable checkpoint refused');
|
|
762
|
+
insist(loads === 1, 'first residency loaded more than once');
|
|
763
|
+
const continuation = regionalContinuation(resident.host), player = leadSnapshot(snapshotSimHost(resident.host));
|
|
764
|
+
const tick = resident.host.state.tick;
|
|
765
|
+
(await grid.prepare(instance, null)).commit(); for (let i = 0; i < 5; i++) grid.step();
|
|
766
|
+
insist(resident.host.state.tick === tick, 'inactive region advanced');
|
|
767
|
+
insist(grid.unload(instance) && !allocator.has(`sim:${instance}`), 'unload retained physics lease');
|
|
768
|
+
(await grid.prepare(null, instance)).commit();
|
|
769
|
+
insist(regionalContinuation(resident.host) === continuation, 'regional continuation changed on restore');
|
|
770
|
+
insist(loads === 2, 'restore did not create a fresh residency');
|
|
771
|
+
const restoredPlayer = leadSnapshot(snapshotSimHost(resident.host));
|
|
772
|
+
insist(JSON.stringify(restoredPlayer.position) === JSON.stringify(player.position) && restoredPlayer.yaw === player.yaw, 'traveler pose changed on restore');
|
|
773
|
+
for (let next = plan.checkpointTick; next < plan.ticks; next++) { grid.step(inputAt(next, resident)); healthy(resident); }
|
|
774
|
+
for (let next = 0; next < plan.ticks; next++) { baseline.host.step(leadCommands(baseline.host, inputAt(next, baseline))); healthy(baseline); }
|
|
775
|
+
insist(regionalContinuation(resident.host) === regionalContinuation(baseline.host), 'restored regional suffix diverged');
|
|
776
|
+
insist(JSON.stringify(facts) === JSON.stringify(baselineFacts), 'restored facts diverged or repeated');
|
|
777
|
+
const values = new Map<string, string>();
|
|
778
|
+
const storage = { get length() { return values.size; }, key: (index: number) => [...values.keys()][index] ?? null,
|
|
779
|
+
getItem: (key: string) => values.get(key) ?? null, setItem: (key: string, value: string) => { values.set(key, value); }, removeItem: (key: string) => { values.delete(key); } };
|
|
780
|
+
const ledger = () => new Ledger(new SaveStore({ local: storage, session: null }), [{ id: instance, shard: source.identity.slug }],
|
|
781
|
+
[{ shard: source.identity.slug, revision: source.identity.revision, rules: source.ledger }], []);
|
|
782
|
+
const owner = ledger(); let granted = 0;
|
|
783
|
+
const filed = facts.map((fact, ordinal) => {
|
|
784
|
+
const quest = source.quests.quests.find(row => row.id === fact.actorId && row.onComplete?.fact === fact.name);
|
|
785
|
+
if (quest === undefined) throw new Error('Missing native quest fact provenance');
|
|
786
|
+
return { instance, shard: source.identity.slug, revision: source.identity.revision, entity: fact.actorId, tick: fact.tick, ordinal,
|
|
787
|
+
name: fact.name, origin: { kind: 'engine' as const, source: `quest:${quest.id}` } };
|
|
788
|
+
});
|
|
789
|
+
for (const fact of filed) { const receipt = owner.record(fact); insist(receipt.status !== 'pending', 'ledger write pending'); if (receipt.status === 'granted') granted++; }
|
|
790
|
+
for (const name of plan.requiredFacts) insist(filed.some(fact => fact.name === name), `native fact missing: ${name}`);
|
|
791
|
+
const state = JSON.stringify(owner.state()), reloaded = ledger();
|
|
792
|
+
insist(JSON.stringify(reloaded.state()) === state, 'serialized profile reload diverged');
|
|
793
|
+
for (const fact of filed) insist(reloaded.record(fact).status === 'duplicate', 'ledger replay duplicated reward');
|
|
794
|
+
insist(JSON.stringify(reloaded.state()) === state, 'duplicate filing changed profile');
|
|
795
|
+
return { version: 1 as const, ticks: plan.ticks, checkpointTick: plan.checkpointTick,
|
|
796
|
+
grid: { reserveBeforePhysics: true as const, runtimeFence: true as const, refusedSave: true as const, restored: true as const, frozenTicks: 5 as const, loads: 2 as const, leasesAfterDispose: 0 as const },
|
|
797
|
+
ledger: { facts, granted, durableReload: true as const, duplicateStable: true as const } };
|
|
798
|
+
} finally {
|
|
799
|
+
baseline.dispose(); grid.dispose();
|
|
800
|
+
insist(allocator.entries().length === 0, 'residency leak after disposal');
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/** Native/page owners inject their existing actor and contact ports; binding never advances a clock or aim. */
|
|
805
|
+
export interface MeleeContactPorts<T extends ContactScanTarget> extends ContactFamilyPorts<T> { readonly owner: Parameters<ContactFamilyPorts<T>['hit']>[0]['source'] }
|
|
806
|
+
/** Admit ordered numeric contacts and bind one existing shared controller, preserving source and event ownership. */
|
|
807
|
+
export function bindMeleeContacts<T extends ContactScanTarget>(weaponId: string, rows: unknown, ports: MeleeContactPorts<T>): ContactFamily<T> {
|
|
808
|
+
if (!/^weapon\.[a-z][a-zA-Z0-9.-]*$/u.test(weaponId) || weaponId.length > 128) throw new Error('Bound melee weapon identity required');
|
|
809
|
+
const admitted = parseMeleeContacts(rows);
|
|
810
|
+
return new ContactFamily(admitted.map(row => ({ lane: row.lane, heavy: row.heavy, cooldown: row.cooldown,
|
|
811
|
+
shape: row.shape, reach: row.reach, size: row.size, height: row.height, allowance: row.allowance,
|
|
812
|
+
lands: row.lands, show: row.show, reports: row.reports, hits: row.hits.map(hit => ({
|
|
813
|
+
tags: hit.tags, weaponId, source: hit.source === 'owner' ? ports.owner : 'env',
|
|
814
|
+
damage: hit.damage, moveId: hit.moveId, copyVectors: hit.copyVectors, copyTags: hit.copyTags, reactions: hit.reactions,
|
|
815
|
+
})) })), ports);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
/** One admitted secondary action selects its declared move; script memory belongs to the existing item ScriptHost. */
|
|
820
|
+
export interface MeleeSecondaryInput { readonly tick: number; readonly dt: number; readonly action: 3 | 4; readonly move: number }
|
|
821
|
+
/** Start a row only after its actor-bound AS item hook accepts it. Contacts remain in the owner's original phase. */
|
|
822
|
+
export function startMeleeSecondary<T extends ContactScanTarget>(family: ContactFamily<T>, hook: ReturnType<DeclaredItemPorts['runtime']>['hook'], input: MeleeSecondaryInput): number | null {
|
|
823
|
+
const row = family.moves[input.move];
|
|
824
|
+
if (hook === null || family.secondaryCooldown > 0 || row?.lane !== 'secondary'
|
|
825
|
+
|| !Number.isSafeInteger(input.tick) || input.tick < 0 || !Number.isFinite(input.dt) || input.dt < 0 || input.dt > 1
|
|
826
|
+
|| ![3, 4].includes(input.action) || !Number.isInteger(input.move) || input.move < 0 || input.move > 15) return null;
|
|
827
|
+
if (hook({ tick: input.tick, dt: input.dt, action: input.action, fuel: 0, cooldown: family.secondaryCooldown }) !== input.action) return null;
|
|
828
|
+
return (row.lands.length === 0 ? family.claim(input.move) : family.swing(input.move)) ? input.move : null;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/** Shared item aliases and action hooks. Verified modules join the caller's existing lane. */
|
|
832
|
+
export function declaredItemScriptBindings(input: unknown, actorId: string): ReturnType<typeof declaredItemScriptEntities> & { modules: (assets: ScriptModuleAssets) => Promise<ReadonlyMap<string, Uint8Array>>; hooks: (host: Parameters<typeof scriptItemHook>[0]) => ReadonlyMap<string, ReturnType<typeof scriptItemHook>> } {
|
|
833
|
+
const items = parseItems(input), aliases = declaredItemScriptEntities(items, actorId);
|
|
834
|
+
const refs = items.rows.flatMap(row => row.hook === null ? [] : [row.hook.module]);
|
|
835
|
+
return { ...aliases, modules: (assets: ScriptModuleAssets): Promise<ReadonlyMap<string, Uint8Array>> => verifiedScriptModules(assets, refs),
|
|
836
|
+
hooks: (host: Parameters<typeof scriptItemHook>[0]): ReadonlyMap<string, ReturnType<typeof scriptItemHook>> => new Map(items.rows.flatMap(row => row.hook === null ? []
|
|
837
|
+
: [[row.id, scriptItemHook(host, row.hook.module, row.hook.entity, row.hook.event, actorId)] as const])),
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
type NativeMeleeTarget = ReturnType<SimHost['combat']['targetPort']>;
|
|
842
|
+
type NativeMeleeHook = NonNullable<ReturnType<DeclaredItemPorts['runtime']>['hook']>;
|
|
843
|
+
type NativeMeleeContact = ReturnType<typeof parseMeleeContacts>[number];
|
|
844
|
+
|
|
845
|
+
/** One native move or the tick's aim input; commands remain in the owner's authoritative order. `free` is a move that names
|
|
846
|
+
* nothing (P1-E3.2): the look pitch it leaves along, the contact shape finding what it meets. */
|
|
847
|
+
export type NativeMeleeCommand = { readonly kind: 'aim'; readonly pitch: number }
|
|
848
|
+
| { readonly kind: 'move'; readonly action: number; readonly targetId?: string; readonly world?: number; readonly free?: number };
|
|
849
|
+
/** A world contact's admitted outcome: a light crack answers its first contact, a heavy crack its second. */
|
|
850
|
+
export interface NativeMeleeWorld { readonly act: number; readonly at: Readonly<{ x: number; y: number; z: number }>;
|
|
851
|
+
readonly radius: number; readonly crack: 'light' | 'heavy' }
|
|
852
|
+
/** Original posed head ball and body capsule in world metres. */
|
|
853
|
+
export interface NativeMeleeVolumes { readonly head: Vector3; readonly headRadius: number;
|
|
854
|
+
readonly a: Vector3; readonly b: Vector3; readonly bodyRadius: number }
|
|
855
|
+
const nativeMeleeOc = new Vector3(), nativeMeleeBa = new Vector3(), nativeMeleeOa = new Vector3(), nativeMeleeClosest = new Vector3();
|
|
856
|
+
|
|
857
|
+
function nativeMeleeBall(from: Vector3, dir: Vector3, centre: Vector3, radius: number): number | null {
|
|
858
|
+
const oc = nativeMeleeOc.subVectors(from, centre), b = oc.dot(dir), c = oc.lengthSq() - radius * radius, h = b * b - c;
|
|
859
|
+
if (h < 0) return null;
|
|
860
|
+
const t = -b - Math.sqrt(h); return t >= 0 ? t : null;
|
|
861
|
+
}
|
|
862
|
+
/** Exact posed-volume ray query, including an immediate solid hit when the origin lies inside a volume. */
|
|
863
|
+
export function nativeMeleeVolumeHit(from: Vector3, dir: Vector3, reach: number, body: NativeMeleeVolumes): number | null {
|
|
864
|
+
const ba = nativeMeleeBa.subVectors(body.b, body.a), oa = nativeMeleeOa.subVectors(from, body.a);
|
|
865
|
+
const baba = ba.lengthSq(), along = baba > 1e-12 ? Math.min(1, Math.max(0, oa.dot(ba) / baba)) : 0;
|
|
866
|
+
const closest = nativeMeleeClosest.copy(body.a).addScaledVector(ba, along);
|
|
867
|
+
if (from.distanceToSquared(closest) <= body.bodyRadius ** 2 || from.distanceToSquared(body.head) <= body.headRadius ** 2) return 0;
|
|
868
|
+
let best = Infinity;
|
|
869
|
+
const bard = ba.dot(dir), baoa = ba.dot(oa), rdoa = dir.dot(oa), a = baba - bard * bard;
|
|
870
|
+
if (a > 1e-12) {
|
|
871
|
+
const b = baba * rdoa - baoa * bard, c = baba * oa.lengthSq() - baoa * baoa - body.bodyRadius ** 2 * baba, h = b * b - a * c;
|
|
872
|
+
if (h >= 0) { const t = (-b - Math.sqrt(h)) / a, y = baoa + t * bard; if (t >= 0 && y > 0 && y < baba) best = t; }
|
|
873
|
+
}
|
|
874
|
+
for (const t of [nativeMeleeBall(from, dir, body.a, body.bodyRadius), nativeMeleeBall(from, dir, body.b, body.bodyRadius), nativeMeleeBall(from, dir, body.head, body.headRadius)]) if (t !== null && t < best) best = t;
|
|
875
|
+
return best <= reach ? best : null;
|
|
876
|
+
}
|
|
877
|
+
/** Minimal admitted input view; other commands keep their original routes. */
|
|
878
|
+
export interface NativeHeldCommand { readonly kind:string; readonly heavy?: { readonly targetId?:string|undefined }|undefined; readonly swing?: boolean|undefined; readonly secondary?: boolean|undefined; readonly pitch?: number|undefined }
|
|
879
|
+
/** Admitted page/script fields consumed by the declared native command mapping. */
|
|
880
|
+
export interface NativeMeleeInput extends NativeHeldCommand {
|
|
881
|
+
readonly attack?: {readonly targetId?:string|undefined}|undefined; readonly actorId?:string|undefined; readonly value?:number|undefined; readonly playerId?:string|undefined;
|
|
882
|
+
readonly swing?:true|undefined; readonly pitch?:number|undefined; readonly seq?:number|undefined;
|
|
883
|
+
}
|
|
884
|
+
/** Runtime authority and command ports are injected; no imported module installs a host. */
|
|
885
|
+
export interface NativeMeleePorts {
|
|
886
|
+
readonly commands?: () => readonly NativeMeleeCommand[];
|
|
887
|
+
readonly inputCommands?: () => readonly NativeMeleeInput[]; readonly worldActor?: string;
|
|
888
|
+
/** Full admitted player input; sampled once when the owner declares held release. */
|
|
889
|
+
readonly heldCommands?: () => readonly NativeHeldCommand[]; readonly enabled?: () => boolean;
|
|
890
|
+
/** Every other player's input and stowed state; absent, only the first player holds this weapon. */
|
|
891
|
+
readonly others?: { readonly commands: (player: PlayerSim) => readonly NativeMeleeInput[]; readonly enabled: (player: PlayerSim) => boolean;
|
|
892
|
+
/** Their own actor-bound hook for this item, when it has one. */ readonly hook?: (player: PlayerSim) => NativeMeleeHook | null };
|
|
893
|
+
readonly world?: readonly NativeMeleeWorld[];
|
|
894
|
+
readonly questWorld?:{readonly row:QuestHostRow;readonly spots:QuestGraphPorts['spots']};
|
|
895
|
+
readonly hook?: NativeMeleeHook | null;
|
|
896
|
+
/** The existing composed ScriptHost's current tick; never starts a second script clock. */
|
|
897
|
+
readonly hookTick?: () => number;
|
|
898
|
+
readonly landed?: (action: number, from: Vector3, dir: Vector3) => void;
|
|
899
|
+
}
|
|
900
|
+
/** The shared controller and the current tick's world outcome. */
|
|
901
|
+
export interface NativeMeleeOwner { readonly family: ContactFamily<NativeMeleeTarget>; readonly cracked: (player: string) => number | null }
|
|
902
|
+
const NativeHoldState = v.strictObject({version:v.literal(1),held:v.pipe(v.number(),v.finite(),v.minValue(0)),wasHeld:v.boolean(),
|
|
903
|
+
target:v.nullable(v.pipe(v.string(),v.minLength(1),v.maxLength(128)))});
|
|
904
|
+
/** Install immediate and delayed item contacts on one renderer-free owner, retaining ordered commands and wire bindings. */
|
|
905
|
+
export function installNativeMelee(host: SimHost, weapon: { readonly id: string; readonly contacts?: readonly NativeMeleeContact[] },
|
|
906
|
+
input: unknown, given: NativeMeleePorts): NativeMeleeOwner {
|
|
907
|
+
const { native: row, contacts } = parseNativeMeleeBinding(input, weapon.contacts);
|
|
908
|
+
if(row.held!==undefined&&given.heldCommands===undefined&&given.inputCommands===undefined)throw new Error('Held input requires its admitted player stream');
|
|
909
|
+
if(row.input===undefined?given.commands===undefined:given.inputCommands===undefined)throw new Error('Native melee requires its declared command stream');
|
|
910
|
+
const questWorld=given.questWorld,worldActor=given.worldActor??questWorld?.row.graph.actor;
|
|
911
|
+
const firstTargets=given.world??questWorld?.row.interactions.rows.flatMap((entry):NativeMeleeWorld[]=>{
|
|
912
|
+
if(entry.crack===undefined)return [];
|
|
913
|
+
const spot=questWorld.spots.crack.find(point=>`crack.${point.id}`===entry.at);
|
|
914
|
+
if(spot===undefined)throw new Error(`Missing admitted melee world spot ${entry.id}`);
|
|
915
|
+
return [{act:entry.act,at:spot,radius:spot.radius,crack:entry.crack}];
|
|
916
|
+
})??[];
|
|
917
|
+
if(firstTargets.length>1024)throw new RangeError('Native melee world roster exceeds its bound');
|
|
918
|
+
if(row.input?.world!==undefined&&worldActor===undefined)throw new Error('Native world commands require their quest actor');
|
|
919
|
+
const noTargets:readonly NativeMeleeWorld[]=[];
|
|
920
|
+
const holdStepped=row.held?.continuation.kind==='step';
|
|
921
|
+
// P1-E3.5: a seat per player. Any player's lash cracks a quest's spots; world reactions stay the first player's.
|
|
922
|
+
const seats=playerSeats(host,(player,first)=>{
|
|
923
|
+
const ports:NativeMeleePorts=first?given:{inputCommands:()=>given.others?.commands(player)??[],enabled:()=>given.others?.enabled(player)??false,
|
|
924
|
+
...(given.hookTick===undefined?{}:{hookTick:given.hookTick}),...(given.others?.hook===undefined?{}:{hook:given.others.hook(player)})};
|
|
925
|
+
const worldTargets=first||given.world===undefined?firstTargets:noTargets;
|
|
926
|
+
/** The seq this tick's player command carries, and the one the running move took (J47). */
|
|
927
|
+
let tickSeq=0,attackSeq=0;
|
|
928
|
+
let inputTick=-1, inputStream:readonly NativeMeleeInput[]=[];
|
|
929
|
+
const inputCommands=():readonly NativeMeleeInput[]=>{
|
|
930
|
+
if(inputTick!==host.state.tick){inputStream=ports.inputCommands?.()??[];if(inputStream.length>MAX_TICK_COMMANDS)throw new RangeError('Native melee input exceeds its tick bound');inputTick=host.state.tick;}
|
|
931
|
+
return inputStream;
|
|
932
|
+
};
|
|
933
|
+
const mapped:NativeMeleeCommand[]=[];
|
|
934
|
+
const mappedCommands=():readonly NativeMeleeCommand[]=>{
|
|
935
|
+
const policy=row.input;if(policy===undefined)return ports.commands?.()??mapped;
|
|
936
|
+
mapped.length=0;
|
|
937
|
+
for(const command of inputCommands()){
|
|
938
|
+
if(command.kind==='player')tickSeq=command.seq??0;
|
|
939
|
+
// A net client's blow carries its look, where a tape's comes as the aim actor's own script.
|
|
940
|
+
if(command.kind==='player'&&policy.aimActor!==undefined&&(command.swing===true||command.secondary===true))mapped.push({kind:'aim',pitch:command.pitch??0});
|
|
941
|
+
if(command.kind==='player'&&command.secondary===true){const second=policy.scripts.find(entry=>entry.action!==policy.attack&&entry.action!==row.held?.action);if(second!==undefined)mapped.push({kind:'move',action:second.action});}
|
|
942
|
+
if(command.kind==='player'&&command.swing===true&&command.heavy===undefined)mapped.push({kind:'move',action:policy.attack,free:command.pitch??0});
|
|
943
|
+
else if(command.kind==='player'&&command.attack!==undefined)mapped.push({kind:'move',action:policy.attack,...(command.attack.targetId===undefined?{}:{targetId:command.attack.targetId})});
|
|
944
|
+
else if(command.kind==='script'){
|
|
945
|
+
if(command.actorId===policy.aimActor&&command.value!==undefined)mapped.push({kind:'aim',pitch:command.value});
|
|
946
|
+
else if(policy.world!==undefined&&command.actorId===worldActor){const target=worldTargets.find(entry=>entry.act===command.value);if(target!==undefined)mapped.push({kind:'move',world:target.act,action:target.crack==='heavy'?policy.world.heavy:policy.world.light});}
|
|
947
|
+
else {const move=policy.scripts.find(entry=>entry.actor===command.actorId&&entry.value===command.value);if(move!==undefined)mapped.push({kind:'move',action:move.action});}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
return mapped;
|
|
951
|
+
};
|
|
952
|
+
const aimed = { target: null as string | null, world: null as number | null, dir: new Vector3(0, 0, -1) };
|
|
953
|
+
const from = new Vector3(), direction = new Vector3(), targets = worldTargets;
|
|
954
|
+
const volumes = { head: new Vector3(), headRadius: 0, a: new Vector3(), b: new Vector3(), bodyRadius: 0 };
|
|
955
|
+
let cracked: number | null = null, pitch = 0;
|
|
956
|
+
const port = (id: string): NativeMeleeTarget | null => {
|
|
957
|
+
const actor = host.entities.get(id); return actor === undefined ? null : host.combat.targetPort(actor.combatActor(), actor, velocity => { actor.impulse(velocity); });
|
|
958
|
+
};
|
|
959
|
+
const eye = (out: Vector3): Vector3 => { out.copy(player.position); out.y += row.eye; return out; };
|
|
960
|
+
const selected = (out: Vector3, dir: Vector3): boolean => {
|
|
961
|
+
eye(out);
|
|
962
|
+
const actor = aimed.target === null ? undefined : host.entities.get(aimed.target), spot = aimed.world === null ? undefined : targets.find(target => target.act === aimed.world);
|
|
963
|
+
if (actor !== undefined) dir.copy(actor.position).setY(actor.position.y + actor.dims.bodyY * actor.scale).sub(out);
|
|
964
|
+
else if (spot !== undefined) dir.set(spot.at.x, spot.at.y, spot.at.z).sub(out);
|
|
965
|
+
else dir.copy(aimed.dir);
|
|
966
|
+
if (dir.lengthSq() < 1e-9) { if (row.zeroAim === 'refuse') return false; dir.copy(aimed.dir); }
|
|
967
|
+
dir.normalize(); aimed.dir.copy(dir); return true;
|
|
968
|
+
};
|
|
969
|
+
const world = targets.map(target => ({ at: new Vector3(target.at.x, target.at.y, target.at.z), radius: target.radius,
|
|
970
|
+
crack: (heavy: boolean, second: boolean): boolean => {
|
|
971
|
+
if (target.crack === 'light') { if (second) return false; cracked = target.act; return true; }
|
|
972
|
+
if (heavy && second) cracked = target.act;
|
|
973
|
+
return true;
|
|
974
|
+
} }));
|
|
975
|
+
const family = bindMeleeContacts<NativeMeleeTarget>(weapon.id, contacts, { owner: player.health, hit: request => host.combat.hit(attackSeq===0?request:{...request,attackSeq}),
|
|
976
|
+
world: () => world, aim: selected,
|
|
977
|
+
targets: () => [...host.entities.keys()].flatMap(id => { const target = port(id); return target === null || row.liveTargetsOnly && !target.hittable ? [] : [target]; }),
|
|
978
|
+
react: target => ({ actor: target.actor, ...(target.impulse === undefined ? {} : { impulse: target.impulse }), stagger: (dir, strength) => { target.target.stagger?.(dir, strength); } }),
|
|
979
|
+
...(row.body === 'none' ? {} : { body: (origin: Vector3, dir: Vector3, reach: number) => {
|
|
980
|
+
let best: { port: NativeMeleeTarget; point: Vector3 } | null = null, bestT = Infinity;
|
|
981
|
+
if (host.entities.size > 1024) throw new RangeError('Native melee actor roster exceeds its bounded contact scan');
|
|
982
|
+
const actors = host.entities.entries();
|
|
983
|
+
for (let i = 0; i < Math.min(1024, host.entities.size); i++) {
|
|
984
|
+
const next = actors.next(); if (next.done) break;
|
|
985
|
+
const [id, actor] = next.value, target = port(id); if (target === null || !target.hittable) continue;
|
|
986
|
+
actor.headWorld(volumes.head); actor.bodyCapsule(volumes.a, volumes.b);
|
|
987
|
+
volumes.headRadius = actor.dims.headRadius * actor.scale; volumes.bodyRadius = actor.dims.bodyRadius * actor.scale;
|
|
988
|
+
const t = nativeMeleeVolumeHit(origin, dir, reach, volumes);
|
|
989
|
+
if (t !== null && t < bestT) { best = { port: target, point: origin.clone().addScaledVector(dir, t) }; bestT = t; }
|
|
990
|
+
}
|
|
991
|
+
return best;
|
|
992
|
+
} }),
|
|
993
|
+
});
|
|
994
|
+
const holdRow=row.held, release={released:false,target:null as string|null}, heavy={kind:'move' as const,action:holdRow?.action??0,targetId:''};
|
|
995
|
+
// A net client's charge has no target to name: it lands where they look when they let go, as a page's does.
|
|
996
|
+
const freeHeavy={kind:'move' as const,action:holdRow?.action??0,free:0};
|
|
997
|
+
let heldFree=false;
|
|
998
|
+
const releasedCommands:NativeMeleeCommand[]=[heavy], releasedFree:NativeMeleeCommand[]=[freeHeavy], none:NativeMeleeCommand[]=[], noHeld:NativeHeldCommand[]=[];
|
|
999
|
+
let heldTarget:string|null=null;
|
|
1000
|
+
const noRelease=():void=>undefined;
|
|
1001
|
+
const sampleHeld=(dt:number):void=>{
|
|
1002
|
+
release.released=false;release.target=null;
|
|
1003
|
+
if(!(ports.enabled?.()??true)){family.hold.reset();heldTarget=null;return;}
|
|
1004
|
+
const commands=ports.heldCommands?.()??(ports.inputCommands===undefined?noHeld:inputCommands());
|
|
1005
|
+
if(commands.length>MAX_TICK_COMMANDS)throw new RangeError('Held player input exceeds its tick bound');
|
|
1006
|
+
let held=false,target:string|null=null;
|
|
1007
|
+
for(const command of commands)if(command.kind==='player'){held=command.heavy!==undefined;target=command.heavy?.targetId??null;if(held)heldFree=command.swing===true;freeHeavy.free=command.pitch??0;}
|
|
1008
|
+
release.released=family.hold.held&&!held;release.target=release.released?heldTarget:target;
|
|
1009
|
+
family.hold.step(dt,true,held,noRelease);heldTarget=held?target:null;
|
|
1010
|
+
};
|
|
1011
|
+
const holdSnapshot=():string=>JSON.stringify({version:1,held:family.hold.elapsed,wasHeld:family.hold.held,target:heldTarget});
|
|
1012
|
+
const restoreHold=(saved:unknown):void=>{
|
|
1013
|
+
if(saved===undefined){family.hold.reset();heldTarget=null;return;}
|
|
1014
|
+
if(typeof saved!=='string')throw new Error('Invalid melee hold continuation');
|
|
1015
|
+
const state=v.parse(NativeHoldState,JSON.parse(saved));
|
|
1016
|
+
if(!state.wasHeld&&(state.held!==0||state.target!==null))throw new Error('Invalid inactive melee hold');
|
|
1017
|
+
family.hold.elapsed=state.held;family.hold.held=state.wasHeld;heldTarget=state.target;
|
|
1018
|
+
};
|
|
1019
|
+
const snapshot = (): SimValue => {
|
|
1020
|
+
const state: Record<string, SimValue> = {};
|
|
1021
|
+
for (const field of row.continuation.fields) {
|
|
1022
|
+
switch (field.source) {
|
|
1023
|
+
case 'constant': state[field.key] = field.constant ?? 0; break;
|
|
1024
|
+
case 'primary': state[field.key] = family.cooldown; break;
|
|
1025
|
+
case 'secondary': state[field.key] = family.secondaryCooldown; break;
|
|
1026
|
+
case 'time': state[field.key] = family.t; break;
|
|
1027
|
+
case 'heavy': state[field.key] = family.row(family.move).heavy; break;
|
|
1028
|
+
case 'landed': state[field.key] = family.landed; break;
|
|
1029
|
+
case 'target': state[field.key] = aimed.target; break;
|
|
1030
|
+
case 'world': state[field.key] = aimed.world; break;
|
|
1031
|
+
case 'direction': state[field.key] = aimed.dir.toArray(); break;
|
|
1032
|
+
default: throw new Error('Unknown native melee snapshot binding');
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
if(holdRow?.continuation.kind==='field')state[holdRow.continuation.key]=holdSnapshot();
|
|
1036
|
+
if(attackSeq!==0)state['attackSeq']=attackSeq;
|
|
1037
|
+
return row.continuation.encoding === 'json' ? JSON.stringify(state) : state;
|
|
1038
|
+
};
|
|
1039
|
+
const restore = (inputState: unknown): void => {
|
|
1040
|
+
if (row.continuation.encoding === 'json' && typeof inputState !== 'string') throw new Error('Invalid native melee JSON continuation');
|
|
1041
|
+
const saved = v.parse(v.record(v.string(), v.unknown()), typeof inputState === 'string' && row.continuation.encoding === 'json' ? JSON.parse(inputState) : inputState);
|
|
1042
|
+
const holdKey=holdRow?.continuation.kind==='field'?holdRow.continuation.key:undefined;
|
|
1043
|
+
if(holdKey!==undefined)restoreHold(saved[holdKey]);
|
|
1044
|
+
attackSeq=v.parse(v.optional(v.pipe(v.number(),v.integer(),v.minValue(0)),0),saved['attackSeq']);
|
|
1045
|
+
if (Object.keys(saved).length !== row.continuation.fields.length+(holdKey!==undefined&&Object.hasOwn(saved,holdKey)?1:0)+(Object.hasOwn(saved,'attackSeq')?1:0)) throw new Error('Unexpected native melee continuation field');
|
|
1046
|
+
const values = { primary: 0, secondary: 0, time: -1, heavy: false, landed: 0, target: null as string | null, world: null as number | null, direction: [0, 0, -1] };
|
|
1047
|
+
for (const field of row.continuation.fields) {
|
|
1048
|
+
const value = saved[field.key];
|
|
1049
|
+
switch (field.source) {
|
|
1050
|
+
case 'constant': if (value !== field.constant) throw new Error('Invalid native melee continuation version'); break;
|
|
1051
|
+
case 'heavy': values.heavy = v.parse(v.boolean(), value); break;
|
|
1052
|
+
case 'target': values.target = v.parse(v.nullable(v.string()), value); break;
|
|
1053
|
+
case 'world': values.world = v.parse(v.nullable(v.pipe(v.number(), v.finite())), value); break;
|
|
1054
|
+
case 'direction': values.direction = v.parse(v.tuple([v.pipe(v.number(), v.finite()), v.pipe(v.number(), v.finite()), v.pipe(v.number(), v.finite())]), value); break;
|
|
1055
|
+
case 'primary': case 'secondary': case 'time': case 'landed': {
|
|
1056
|
+
const number = v.parse(v.pipe(v.number(), v.finite()), value);
|
|
1057
|
+
if (field.source === 'landed' && !Number.isInteger(number) || field.min !== undefined && number < field.min || field.max !== undefined && number > field.max) throw new Error('Native melee continuation outside its admitted bounds');
|
|
1058
|
+
values[field.source] = number; break;
|
|
1059
|
+
}
|
|
1060
|
+
default: throw new Error('Unknown native melee restore binding');
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
const move = row.mode === 'timed' ? family.moves.findIndex(candidate => candidate.heavy === values.heavy) : family.move;
|
|
1064
|
+
if (move < 0) throw new Error('Missing native melee continuation move');
|
|
1065
|
+
family.cooldown = values.primary; family.secondaryCooldown = values.secondary; family.t = values.time; family.move = move; family.landed = values.landed;
|
|
1066
|
+
aimed.target = values.target; aimed.world = values.world; aimed.dir.fromArray(values.direction);
|
|
1067
|
+
};
|
|
1068
|
+
const processCommand=(command:NativeMeleeCommand,dt:number):void=>{
|
|
1069
|
+
if (command.kind === 'aim') return;
|
|
1070
|
+
const action = row.actions.find(candidate => candidate.action === command.action); if (action === undefined) return;
|
|
1071
|
+
if (command.free !== undefined) { const cos = Math.cos(command.free); aimed.dir.set(-Math.sin(player.yaw) * cos, Math.sin(command.free), -Math.cos(player.yaw) * cos); }
|
|
1072
|
+
else if (action.aim === 'selected' && command.world === undefined && (command.targetId === undefined || !host.entities.has(command.targetId))) return;
|
|
1073
|
+
if (row.mode === 'immediate' && action.aim === 'selected') { aimed.target = command.targetId ?? null; aimed.world = command.world ?? null; if (!selected(from, direction)) return; }
|
|
1074
|
+
const claimed = action.hook === null ? row.mode === 'timed' ? family.swing(action.move) : family.claim(action.move)
|
|
1075
|
+
: startMeleeSecondary(family, ports.hook ?? null, { tick: ports.hookTick?.() ?? host.state.tick, dt, action: action.hook, move: action.move }) !== null;
|
|
1076
|
+
if (!claimed) return;
|
|
1077
|
+
attackSeq=tickSeq; player.swung(tickSeq, family.row(action.move).heavy);
|
|
1078
|
+
if (row.mode === 'timed') { aimed.target = command.targetId ?? null; aimed.world = command.world ?? null; }
|
|
1079
|
+
else {
|
|
1080
|
+
if (action.aim === 'facing') { eye(from); const cos = Math.cos(pitch); direction.set(-Math.sin(player.yaw) * cos, Math.sin(pitch), -Math.cos(player.yaw) * cos); }
|
|
1081
|
+
family.land(action.move, 0, from, direction); ports.landed?.(command.action, from, direction);
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
const step=(dt:number):void=>{
|
|
1085
|
+
if (row.commandsAfterCool) family.cool(dt);
|
|
1086
|
+
if(holdRow?.continuation.kind==='field'||(holdStepped&&!first))sampleHeld(dt);
|
|
1087
|
+
let commands=ports.enabled?.()===false?none:mappedCommands();
|
|
1088
|
+
if(holdRow?.mode==='replace'&&release.released&&release.target!==null){family.cooldown=0;heavy.targetId=release.target;commands=releasedCommands;}
|
|
1089
|
+
else if(holdRow?.mode==='replace'&&release.released&&heldFree){family.cooldown=0;commands=releasedFree;}
|
|
1090
|
+
if (commands.length > MAX_TICK_COMMANDS) throw new RangeError('Native melee commands exceed the protocol allowance');
|
|
1091
|
+
cracked = null; if (!row.commandsAfterCool) family.cool(dt); pitch = 0;
|
|
1092
|
+
if (row.pitchLimit !== null) for (const command of commands) if (command.kind === 'aim') pitch = Math.max(-row.pitchLimit, Math.min(row.pitchLimit, command.pitch));
|
|
1093
|
+
for(const command of commands)processCommand(command,dt);
|
|
1094
|
+
if(holdRow?.mode==='after'&&release.released){family.cooldown=0;heavy.targetId=release.target??'';processCommand(heavy,dt);}
|
|
1095
|
+
if (row.mode === 'timed') family.advance(dt);
|
|
1096
|
+
};
|
|
1097
|
+
return { family, cracked: () => cracked, sampleHeld, holdSnapshot, restoreHold, step,
|
|
1098
|
+
// the first player's hold keeps its own adapter; another's rides with its seat
|
|
1099
|
+
snapshot: ():SimValue => first||!holdStepped?snapshot():{melee:snapshot(),hold:holdSnapshot()},
|
|
1100
|
+
restore: (value:unknown):void => { if(first||!holdStepped){restore(value);return;} const saved=v.parse(v.strictObject({melee:v.unknown(),hold:v.string()}),value); restore(saved.melee); restoreHold(saved.hold); } };
|
|
1101
|
+
});
|
|
1102
|
+
const {lead}=seats;
|
|
1103
|
+
if(row.held?.continuation.kind==='step')host.onStep(row.held.continuation.id,lead.sampleHeld,{snapshot:lead.holdSnapshot,restore:lead.restoreHold});
|
|
1104
|
+
host.onStep(row.step, seats.step, seats.adapter);
|
|
1105
|
+
return { family: lead.family, cracked: player => { const body = host.players.get(player); return body === undefined ? null : seats.of(body).cracked(); } };
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/** A named cable service lends its existing driver, fixed step and continuation. Missing ids must refuse in state. */
|
|
1109
|
+
export interface QuestCableOwner {
|
|
1110
|
+
readonly state: (id: string) => { readonly riding: boolean; readonly atEnd: boolean };
|
|
1111
|
+
readonly start: (id: string) => void;
|
|
1112
|
+
/** Every other player's place at the cable: their own ride, ending on their own flags. */
|
|
1113
|
+
readonly seat: (id: string, player: PlayerSim, flags: Flags) => unknown;
|
|
1114
|
+
readonly seatState: (id: string, player: string) => { readonly riding: boolean; readonly atEnd: boolean };
|
|
1115
|
+
readonly startSeat: (id: string, player: string) => void;
|
|
1116
|
+
}
|
|
1117
|
+
/** Platform-installed mechanics, never per-shard callback maps. This host constructs no replacement owners. */
|
|
1118
|
+
export interface QuestMechanics {
|
|
1119
|
+
readonly motion?: Pick<MoverRuntime, 'data' | 'atEnd' | 'pose' | 'command'>;
|
|
1120
|
+
readonly cables?: QuestCableOwner;
|
|
1121
|
+
readonly encounters?: ReadonlyMap<string, { readonly summon: () => void }>;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/** Actual native owners borrowed by an admitted quest host; no body, mover or encounter is constructed here. */
|
|
1125
|
+
export interface QuestHostPorts extends Omit<QuestGraphPorts, 'drive' | 'summon'> {
|
|
1126
|
+
/** Boolean observations such as a mover's enabled pose, keyed by the authored owner id. */
|
|
1127
|
+
readonly observations?: ReadonlyMap<string, (player: string) => boolean>;
|
|
1128
|
+
/** Accepted external commands delivered to their original native owner. */
|
|
1129
|
+
readonly actions?: ReadonlyMap<string, (value: number, player: string) => void>;
|
|
1130
|
+
/** Stage actions retain their native effect owner, keyed by director id. Flag actions are bound automatically. */
|
|
1131
|
+
readonly directorActions?: ReadonlyMap<string, readonly DirectorActionBinding[]>;
|
|
1132
|
+
readonly mechanics?: QuestMechanics;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/** The cable with `player` seated at it; undefined once they have left. */
|
|
1136
|
+
function seatedCable(host: SimHost, cables: QuestCableOwner, id: string, player: string): QuestCableOwner | undefined {
|
|
1137
|
+
const body = host.players.get(player);
|
|
1138
|
+
if (body === undefined) return undefined;
|
|
1139
|
+
cables.seat(id, body, questBooks(host).of(player).flags);
|
|
1140
|
+
return cables;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
function questObservation(host: SimHost, row: QuestHostRow['observations'][number], ports: QuestHostPorts): (player: string) => boolean {
|
|
1144
|
+
switch (row.kind) {
|
|
1145
|
+
case 'all-dead': return () => row.actors.every(id => host.entities.get(id)?.alive === false);
|
|
1146
|
+
case 'owner': {
|
|
1147
|
+
const read = ports.observations?.get(row.owner);
|
|
1148
|
+
if (read === undefined) throw new Error(`Unbound quest observation ${row.owner}`);
|
|
1149
|
+
return read;
|
|
1150
|
+
}
|
|
1151
|
+
case 'timer': {
|
|
1152
|
+
if (!Object.hasOwn(host.state.timers, row.timer)) throw new Error(`Unbound quest timer ${row.timer}`);
|
|
1153
|
+
return () => { const left = host.state.timers[row.timer]; if (left === undefined || !Number.isFinite(left) || left < 0) throw new Error('Invalid quest timer'); return left === 0; };
|
|
1154
|
+
}
|
|
1155
|
+
case 'cable': {
|
|
1156
|
+
const cables = ports.mechanics?.cables;
|
|
1157
|
+
if (cables === undefined) throw new Error(`Unbound quest cable ${row.cable}`);
|
|
1158
|
+
cables.state(row.cable);
|
|
1159
|
+
const books = questBooks(host);
|
|
1160
|
+
return player => {
|
|
1161
|
+
const ride = player === books.lead.player ? cables.state(row.cable) : seatedCable(host, cables, row.cable, player)?.seatState(row.cable, player);
|
|
1162
|
+
return ride !== undefined && (row.state === 'riding' ? ride.riding : ride.atEnd);
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1165
|
+
case 'mover': {
|
|
1166
|
+
const motion = ports.mechanics?.motion;
|
|
1167
|
+
if (motion === undefined || !motion.data.some(value => value.id === row.mover)) throw new Error(`Unbound quest mover ${row.mover}`);
|
|
1168
|
+
if (row.state === 'at-end') { motion.atEnd(row.mover); return () => motion.atEnd(row.mover); }
|
|
1169
|
+
motion.pose(row.mover); return () => motion.pose(row.mover).enabled;
|
|
1170
|
+
}
|
|
1171
|
+
default: throw new Error('Unsupported quest observation');
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/** Compose an admitted quest graph, bounded command routes and ordered director stages on their original fixed steps.
|
|
1176
|
+
* Required owners refuse before installation. Quiet seeds and individual continuation strings preserve existing saves;
|
|
1177
|
+
* a transient flag stage introduces no saved cursor. The caller still owns all body, mover and encounter lifetimes. */
|
|
1178
|
+
export interface NativeQuestHost extends ReturnType<typeof installQuestGraph> {
|
|
1179
|
+
/** Dispatch one accepted command at its existing owner's phase; adds no step or saved cursor. */
|
|
1180
|
+
readonly accept: (command: QuestHostCommand) => boolean;
|
|
1181
|
+
/** Deliver the protocol-bounded batch in order, observing each preceding command's effects. */
|
|
1182
|
+
readonly dispatch: (commands: readonly QuestHostCommand[]) => void;
|
|
1183
|
+
}
|
|
1184
|
+
/** One script command for a quest: `playerId` names who acted, the lead when absent. */
|
|
1185
|
+
export interface QuestHostCommand { readonly actorId: string; readonly value: number; readonly playerId?: string | undefined }
|
|
1186
|
+
export function installQuestHost(host: SimHost, quests: QuestData, input: QuestHostRow, ports: QuestHostPorts): NativeQuestHost {
|
|
1187
|
+
const row = parseQuestHost(input);
|
|
1188
|
+
if (ports.prompts !== undefined && ports.prompts.length > 1024) throw new Error('Quest prompt roster exceeds its finite bound');
|
|
1189
|
+
if (row.actors.ids.some(id => host.entities.get(id) === undefined)) throw new Error(row.actors.error);
|
|
1190
|
+
const observations = new Map(row.observations.map(observation => [observation.binding, questObservation(host, observation, ports)]));
|
|
1191
|
+
const actions = new Map<QuestHostRow['commands']['routes'][number], (value: number, player: string) => void>(), books = questBooks(host);
|
|
1192
|
+
for (const route of row.commands.routes) {
|
|
1193
|
+
if (route.spot !== null && !(ports.prompts === undefined ? [...row.npcs.map(npc => npc.spot), ...ports.spots.interact.map(spot => spot.id), ...ports.spots.crack.map(spot => `crack.${spot.id}`)] : ports.prompts.map(prompt => prompt.id)).includes(route.spot)) throw new Error(`Undeclared quest spot ${route.spot}`);
|
|
1194
|
+
if (route.action.kind === 'owner') {
|
|
1195
|
+
const owner = ports.actions?.get(route.action.id);
|
|
1196
|
+
if (owner === undefined) throw new Error(`Unbound quest command ${route.action.id}`);
|
|
1197
|
+
actions.set(route, owner);
|
|
1198
|
+
} else if (route.action.kind === 'mover') {
|
|
1199
|
+
const action = route.action, motion = ports.mechanics?.motion;
|
|
1200
|
+
if (motion === undefined || !motion.data.some(value => value.id === action.mover)) throw new Error(`Unbound quest mover ${action.mover}`);
|
|
1201
|
+
actions.set(route, (_value, player) => { motion.command(action.mover, action.command, player === books.lead.player ? undefined : player); });
|
|
1202
|
+
} else if (route.action.kind === 'cable') {
|
|
1203
|
+
const action = route.action, cables = ports.mechanics?.cables;
|
|
1204
|
+
if (cables === undefined) throw new Error(`Unbound quest cable ${action.cable}`);
|
|
1205
|
+
cables.state(action.cable);
|
|
1206
|
+
actions.set(route, (_value, player) => { if (player === books.lead.player) cables.start(action.cable); else seatedCable(host, cables, action.cable, player)?.startSeat(action.cable, player); });
|
|
1207
|
+
} else if (route.action.kind === 'flag') {
|
|
1208
|
+
const action = route.action; books.claim([action.flag]); actions.set(route, (_value, player) => { books.of(player).flags.set(action.flag, action.value); });
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
const observe = (binding: string, player: string = books.lead.player): boolean => {
|
|
1212
|
+
const owner = observations.get(binding);
|
|
1213
|
+
if (owner === undefined) throw new Error(`Unbound quest observation ${binding}`);
|
|
1214
|
+
return owner(player);
|
|
1215
|
+
};
|
|
1216
|
+
const stages = row.stages.map(stage => ({ row: stage, lane: bindDirectorActions(stage.row, {
|
|
1217
|
+
flags: host.flags, observe, bindings: ports.directorActions?.get(stage.row.id) ?? stage.row.stages.flatMap(entry => entry.do.flatMap(action => {
|
|
1218
|
+
if (!('spawn' in action)) return [];
|
|
1219
|
+
const encounter = ports.mechanics?.encounters?.get(action.spawn);
|
|
1220
|
+
if (encounter === undefined) throw new Error(`Unbound quest encounter ${action.spawn}`);
|
|
1221
|
+
return [{ action, run: () => { encounter.summon(); } }];
|
|
1222
|
+
})),
|
|
1223
|
+
initial: stage.seed !== undefined && host.flags.has(stage.seed.flag) ? stage.seed.initial : stage.initial,
|
|
1224
|
+
}) }));
|
|
1225
|
+
const requests = new Map(row.summons.map(request => {
|
|
1226
|
+
const stage = stages.find(candidate => candidate.row.row.id === request.director);
|
|
1227
|
+
if (stage === undefined) throw new Error(`Undeclared quest director ${request.director}`);
|
|
1228
|
+
return [request.target, stage.lane] as const;
|
|
1229
|
+
}));
|
|
1230
|
+
const routes = row.commands.routes.map(route => ({ ...route, authored: route, condition: compileDirectorWhen(route.when, Object.keys(row.commands.inputs)) }));
|
|
1231
|
+
// Continuations are registered in authored order, before the interaction graph as on the shipping native hosts.
|
|
1232
|
+
for (const { row: stage, lane } of stages) {
|
|
1233
|
+
const saved = stage.continuation;
|
|
1234
|
+
if (saved !== undefined) host.onStep(saved.step, () => undefined, {
|
|
1235
|
+
snapshot: () => lane.snapshot(), restore: value => { if (typeof value !== 'string') throw new Error(saved.error); lane.restore(value); },
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
const graph = installQuestGraph(host, { quests, graph: row.graph, interactions: row.interactions, npcs: row.npcs }, {
|
|
1239
|
+
...ports, drive: row.drive, summon: target => { requests.get(target)?.advance(); },
|
|
1240
|
+
});
|
|
1241
|
+
// A net client names what it uses; the route it takes is the tick command a tape would send.
|
|
1242
|
+
const named = actRoutes(host).interactions;
|
|
1243
|
+
for (const route of routes) if (route.value !== null && (route.action.kind === 'row' || route.action.kind === 'owner') && !named.has(route.action.id)) named.set(route.action.id, { actorId: route.actor ?? row.graph.actor, value: route.value });
|
|
1244
|
+
for (const route of routes) if (route.value !== null && route.action.kind === 'cable' && !named.has(route.action.cable)) named.set(route.action.cable, { actorId: route.actor ?? row.graph.actor, value: route.value });
|
|
1245
|
+
// A mover a prompt runs goes by that prompt's spot: the route's own condition is what says yes.
|
|
1246
|
+
for (const route of routes) if (route.value !== null && route.action.kind === 'mover' && route.spot !== null && !named.has(route.spot)) named.set(route.spot, { actorId: route.actor ?? row.graph.actor, value: route.value });
|
|
1247
|
+
const accept: NativeQuestHost['accept'] = command => {
|
|
1248
|
+
const player = command.playerId ?? books.lead.player;
|
|
1249
|
+
// a player the host no longer holds has no command to run
|
|
1250
|
+
if (!host.players.has(player)) return false;
|
|
1251
|
+
const { flags } = books.of(player);
|
|
1252
|
+
for (const route of routes) {
|
|
1253
|
+
if (command.actorId !== (route.actor ?? row.graph.actor) || route.value !== null && route.value !== command.value) continue;
|
|
1254
|
+
if (route.spot !== null && !graph.near(route.spot, player)) continue;
|
|
1255
|
+
const values = Object.fromEntries(Object.entries(row.commands.inputs).map(([key, binding]) => [key, binding.startsWith('flag:') ? flags.has(binding.slice(5)) : observe(binding, player)]));
|
|
1256
|
+
if (!evaluateDirectorWhen(route.condition, values)) continue;
|
|
1257
|
+
if (route.action.kind === 'row') graph.run(route.action.id, undefined, player);
|
|
1258
|
+
else {
|
|
1259
|
+
actions.get(route.authored)?.(command.value, player);
|
|
1260
|
+
}
|
|
1261
|
+
return true;
|
|
1262
|
+
}
|
|
1263
|
+
return false;
|
|
1264
|
+
};
|
|
1265
|
+
const dispatch: NativeQuestHost['dispatch'] = commands => {
|
|
1266
|
+
for (let index = 0; index < 1024; index++) {
|
|
1267
|
+
const command = commands[index]; if (command === undefined) break;
|
|
1268
|
+
accept(command);
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
if (row.commands.step !== null) host.onStep(row.commands.step, () => {
|
|
1272
|
+
dispatch(ports.commands());
|
|
1273
|
+
for (const stage of stages) if (stage.row.tick) stage.lane.advance();
|
|
1274
|
+
});
|
|
1275
|
+
return { ...graph, accept, dispatch };
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
/** Borrowed world reaction owners; no hit, flag, prompt or saved state is reconstructed. */
|
|
1279
|
+
export interface QuestWorldReactionPorts {
|
|
1280
|
+
readonly flags: Pick<Flags, 'has' | 'set'>;
|
|
1281
|
+
readonly point?: (row: Extract<QuestWorldReactionsData[number]['at'], { readonly kind: 'owner' }>) => Vector3;
|
|
1282
|
+
readonly run?: (id: string) => boolean;
|
|
1283
|
+
readonly toast?: (text: string) => void;
|
|
1284
|
+
}
|
|
1285
|
+
/** Actual contact targets and the same cone scan for browser and renderer-free quest owners. */
|
|
1286
|
+
export interface QuestWorldReactions {
|
|
1287
|
+
readonly targets: readonly ContactWorldTarget[];
|
|
1288
|
+
readonly scan: (from: Vector3, dir: Vector3) => number;
|
|
1289
|
+
}
|
|
1290
|
+
/** Bind a bounded hit roster once; the engine's contact-distance law and actual flags remain authoritative. */
|
|
1291
|
+
export function bindQuestWorldReactions(input: QuestWorldReactionsData, ports: QuestWorldReactionPorts): QuestWorldReactions {
|
|
1292
|
+
const rows = parseQuestWorldReactions(input).map(row => {
|
|
1293
|
+
if (row.action !== undefined && ports.run === undefined) throw new Error(`Missing quest world action ${row.action}`);
|
|
1294
|
+
const at = row.at.kind === 'point' ? new Vector3(row.at.x, row.at.y, row.at.z) : ports.point?.(row.at);
|
|
1295
|
+
if (at === undefined) throw new Error(`Missing quest world point ${row.id}`);
|
|
1296
|
+
const react = (heavy: boolean, second: boolean): boolean => {
|
|
1297
|
+
if (row.needs !== undefined && !testQuestFlags(ports.flags, row.needs)) return false;
|
|
1298
|
+
if (row.heavy === true && !heavy) { if (row.lightHint !== undefined) ports.toast?.(row.lightHint); return true; }
|
|
1299
|
+
if (row.second === true && !second) return true;
|
|
1300
|
+
if (row.action !== undefined && ports.run?.(row.action) !== true) return false;
|
|
1301
|
+
for (const flag of row.sets ?? []) ports.flags.set(flag);
|
|
1302
|
+
if (row.toast !== undefined) ports.toast?.(row.toast);
|
|
1303
|
+
return true;
|
|
1304
|
+
};
|
|
1305
|
+
return { row, at, react };
|
|
1306
|
+
});
|
|
1307
|
+
return {
|
|
1308
|
+
targets: rows.filter(entry => entry.row.cone === undefined).map(entry => ({ at: entry.at, radius: entry.row.radius, crack: entry.react })),
|
|
1309
|
+
scan: (from, dir) => {
|
|
1310
|
+
let accepted = 0;
|
|
1311
|
+
for (const { row, at, react } of rows) if (row.cone !== undefined
|
|
1312
|
+
&& weaponContactDistance(from, dir, at, 'cone', row.cone.reach, row.cone.halfAngle) !== null && react(true, true)) accepted++;
|
|
1313
|
+
return accepted;
|
|
1314
|
+
},
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
/** Select only the admitted root composition; missing or unbound rows refuse before any borrowed owner is read. */
|
|
1319
|
+
export function installDeclaredQuestHost(host: SimHost, source: Shardfile, ports: QuestHostPorts): NativeQuestHost {
|
|
1320
|
+
if (source.questHost === undefined || source.questHost === null || source.runtime?.binds?.includes('quests') !== true && !hasDeclaredClientPage(source)) throw new Error('Missing admitted native quest host');
|
|
1321
|
+
return installQuestHost(host, source.quests, source.questHost, ports);
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
const nativeActorMetadata = v.object({ kind: v.string(), spec: v.unknown() });
|
|
1327
|
+
const nativeWorldMetadata: v.GenericSchema<BoundedNativeWorldMetadataInput, BoundedNativeWorldMetadata> = v.object({ actors: v.array(v.object({ kind: v.exactOptional(v.string()), spec: v.unknown() })) });
|
|
1328
|
+
const nativeQuestSpot = v.strictObject({ id: v.string(), x: bakedNumber, y: bakedNumber, z: bakedNumber, radius: v.pipe(bakedNumber, v.minValue(0)) });
|
|
1329
|
+
const nativeQuestMetadata: v.GenericSchema<BoundedNativeQuestMetadataInput, BoundedNativeQuestMetadata> = v.object({ actors: v.array(nativeActorMetadata), bosses: v.array(nativeActorMetadata),
|
|
1330
|
+
spots: v.strictObject({ interact: v.array(nativeQuestSpot), crack: v.array(nativeQuestSpot) }), promptRegistrations: v.optional(v.unknown()) });
|
|
1331
|
+
/** Read native actor metadata, requiring complete quest spots and boss rows when requested. Collision rows remain addBakedWorld's responsibility. */
|
|
1332
|
+
export function readRuntimeWorldMetadata(input: unknown, quests: true): v.InferOutput<typeof nativeQuestMetadata>;
|
|
1333
|
+
export function readRuntimeWorldMetadata(input: unknown): v.InferOutput<typeof nativeWorldMetadata>;
|
|
1334
|
+
export function readRuntimeWorldMetadata(input: unknown, quests = false): v.InferOutput<typeof nativeWorldMetadata> | v.InferOutput<typeof nativeQuestMetadata> {
|
|
1335
|
+
return quests ? v.parse(nativeQuestMetadata, input) : v.parse(nativeWorldMetadata, input);
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
/** Bounded ordered native equipment slots and their lower/raise clocks. */
|
|
1340
|
+
export interface NativeLoadoutRow<Slot extends number> {
|
|
1341
|
+
readonly slots: readonly Slot[]; readonly initial: Slot;
|
|
1342
|
+
readonly lower: number; readonly raise: number;
|
|
1343
|
+
readonly ownership?: readonly (string | null)[];
|
|
1344
|
+
readonly input?: v.InferOutput<typeof NativeLoadoutRowSchema>['input'];
|
|
1345
|
+
}
|
|
1346
|
+
/** Borrowed ownership and input lock; creating a loadout installs no step. */
|
|
1347
|
+
export interface NativeLoadoutPorts<Slot extends number> {
|
|
1348
|
+
readonly owned?: (slot: Slot) => boolean; readonly flags?: Pick<Flags, 'has'>; readonly locked: () => boolean;
|
|
1349
|
+
}
|
|
1350
|
+
/** Detached native slot continuation; the old held/swap save shape is retained. */
|
|
1351
|
+
export interface NativeLoadoutSnapshot<Slot extends number> extends Readonly<Record<string, SimValue>> {
|
|
1352
|
+
readonly held: Slot;
|
|
1353
|
+
readonly swap: { readonly to: Slot; readonly t: number; readonly switched: boolean } | null;
|
|
1354
|
+
}
|
|
1355
|
+
/** One selection owner, borrowed by an existing simulation adapter. */
|
|
1356
|
+
export interface NativeLoadout<Slot extends number> {
|
|
1357
|
+
readonly held: () => Slot; readonly swapping: () => boolean;
|
|
1358
|
+
readonly owned: (slot: Slot) => boolean; readonly live: (slot: Slot) => boolean; readonly armed: (slot: Slot) => boolean;
|
|
1359
|
+
readonly select: (slot: Slot) => void; readonly step: (dt: number, pick: Slot | null) => void;
|
|
1360
|
+
readonly snapshot: () => NativeLoadoutSnapshot<Slot>; readonly restore: (value: unknown) => void;
|
|
1361
|
+
}
|
|
1362
|
+
/** The frame a kit publishes what is in hand to. */
|
|
1363
|
+
export interface NativeLoadoutFrame { readonly scripts: ReadonlyMap<string, number>; readonly live: Set<number>; readonly armed: Set<number>; aim: number }
|
|
1364
|
+
/** Bind one or several native item slots without taking over weapon/ammunition
|
|
1365
|
+
* continuations. Optional stepping keeps the existing id, phase and save shape;
|
|
1366
|
+
* the body list and aim reader remain live while ranged items are stowed.
|
|
1367
|
+
*/
|
|
1368
|
+
export function bindNativeLoadout<Slot extends number>(host: SimHost, row: NativeLoadoutRow<Slot>,
|
|
1369
|
+
ports: Omit<NativeLoadoutPorts<Slot>, 'locked'> & { readonly locked?: () => boolean; readonly aim?: () => number;
|
|
1370
|
+
/** The lock read of the player whose seat it is, in place of `locked`. */
|
|
1371
|
+
readonly lockedFor?: (player: PlayerSim) => boolean;
|
|
1372
|
+
readonly frame?: NativeLoadoutFrame;
|
|
1373
|
+
/** P1-E3.5: another player's frame and lock. Absent, only the first player holds this kit. */
|
|
1374
|
+
readonly others?: { readonly frame: (player: PlayerSim) => NativeLoadoutFrame; readonly locked: (player: PlayerSim) => boolean };
|
|
1375
|
+
readonly step?: { readonly id: string; readonly phase: 'beforeBodies' | 'afterBodies'; readonly pick: (player: PlayerSim, first: boolean) => number | null } }):
|
|
1376
|
+
NativeLoadout<Slot> & { readonly aim: () => number; readonly bodies: () => readonly NonNullable<ReturnType<SimHost['entities']['get']>>[] } {
|
|
1377
|
+
const publication = row.input?.publication, frame = ports.frame, step = ports.step, others = ports.others;
|
|
1378
|
+
if (publication !== undefined && frame === undefined) throw new Error('Native input publication requires its combat frame');
|
|
1379
|
+
const seats = playerSeats(host, (player, first) => {
|
|
1380
|
+
const lockedFor = ports.lockedFor, locked = first ? ports.locked ?? (() => lockedFor?.(player) ?? false) : () => (others?.locked ?? lockedFor)?.(player) ?? true;
|
|
1381
|
+
const loadout = createNativeLoadout(row, { ...ports, locked }), own = first ? frame : others?.frame(player);
|
|
1382
|
+
return { loadout,
|
|
1383
|
+
step: (dt: number): void => { if (step === undefined || (!first && others === undefined)) return; const picked = step.pick(player, first); loadout.step(dt, row.slots.find(slot => slot === picked) ?? null); player.held = loadout.held(); },
|
|
1384
|
+
snapshot: (): SimValue => loadout.snapshot(), restore: loadout.restore,
|
|
1385
|
+
publish: (): void => {
|
|
1386
|
+
if (publication === undefined || own === undefined) return;
|
|
1387
|
+
const aim = publication.aim, value = own.scripts.get(aim.command) ?? aim.initial;
|
|
1388
|
+
own.aim = value === aim.sentinel ? value : Number.isFinite(value) ? Math.min(aim.max, Math.max(aim.min, value)) : aim.initial;
|
|
1389
|
+
own.live.clear(); own.armed.clear();
|
|
1390
|
+
for (let index = 0; index < 32; index++) { const slot = row.slots[index]; if (slot === undefined) break; if (loadout.live(slot)) own.live.add(slot); if (loadout.armed(slot)) own.armed.add(slot); }
|
|
1391
|
+
} };
|
|
1392
|
+
}), { loadout } = seats.lead;
|
|
1393
|
+
if (step !== undefined) host.onStep(step.id, seats.step, seats.adapter, step.phase);
|
|
1394
|
+
if (row.input !== undefined) actRoutes(host).equip = row.input.command;
|
|
1395
|
+
if (publication !== undefined && frame !== undefined) {
|
|
1396
|
+
host.onStep(publication.step, () => { for (const player of host.players.values()) seats.of(player).publish(); }, undefined, publication.phase);
|
|
1397
|
+
}
|
|
1398
|
+
const bodies: NonNullable<ReturnType<SimHost['entities']['get']>>[] = [];
|
|
1399
|
+
return { ...loadout, aim: ports.aim ?? (() => 0.5), bodies: () => {
|
|
1400
|
+
bodies.length = 0; host.entities.forEach(body => { bodies.push(body); }); return bodies;
|
|
1401
|
+
} };
|
|
1402
|
+
}
|
|
1403
|
+
/** One renderer-free equipment selection owner for timed and immediate kits.
|
|
1404
|
+
* The caller registers step/snapshot in its existing adapter, preserving order.
|
|
1405
|
+
*/
|
|
1406
|
+
export function createNativeLoadout<Slot extends number>(row: NativeLoadoutRow<Slot>, ports: NativeLoadoutPorts<Slot>): NativeLoadout<Slot> {
|
|
1407
|
+
parseNativeLoadoutRow(row);
|
|
1408
|
+
if (row.ownership === undefined && ports.owned === undefined) throw new Error('Native equipment requires ownership policy');
|
|
1409
|
+
if (row.ownership?.some(flag => flag !== null) === true && ports.flags === undefined) throw new Error('Native equipment requires flags');
|
|
1410
|
+
const owned = row.ownership === undefined ? ports.owned : (value: Slot): boolean => {
|
|
1411
|
+
const index = row.slots.indexOf(value), flag = row.ownership?.[index];
|
|
1412
|
+
return index !== -1 && (flag === null || (flag !== undefined && ports.flags?.has(flag) === true));
|
|
1413
|
+
};
|
|
1414
|
+
if (owned === undefined) throw new Error('Native equipment requires ownership');
|
|
1415
|
+
const slot = v.custom<Slot>(value => row.slots.some(candidate => candidate === value));
|
|
1416
|
+
const Saved = v.strictObject({ held: slot, swap: v.nullable(v.strictObject({ to: slot,
|
|
1417
|
+
t: v.pipe(v.number(), v.finite(), v.minValue(0)), switched: v.boolean() })) });
|
|
1418
|
+
let held = row.initial;
|
|
1419
|
+
const swap = { on: false, to: row.initial, t: 0, switched: false };
|
|
1420
|
+
const finish = (): void => { if (swap.on) { held = swap.to; swap.on = false; } };
|
|
1421
|
+
const select = (to: Slot): void => {
|
|
1422
|
+
if (!row.slots.includes(to) || !owned(to)) return;
|
|
1423
|
+
if (swap.on) { if (swap.to === to) return; finish(); }
|
|
1424
|
+
if (to === held) return;
|
|
1425
|
+
swap.on = true; swap.to = to; swap.t = 0; swap.switched = false;
|
|
1426
|
+
if (row.lower === 0) { held = to; swap.switched = true; }
|
|
1427
|
+
if (row.lower + row.raise === 0) finish();
|
|
1428
|
+
};
|
|
1429
|
+
const step = (dt: number, pick: Slot | null): void => {
|
|
1430
|
+
if (pick !== null) select(pick);
|
|
1431
|
+
if (!swap.on) return;
|
|
1432
|
+
swap.t += dt;
|
|
1433
|
+
if (swap.t >= row.lower && !swap.switched) { swap.switched = true; held = swap.to; }
|
|
1434
|
+
if (swap.t >= row.lower + row.raise) finish();
|
|
1435
|
+
};
|
|
1436
|
+
return { held: (): Slot => held, swapping: (): boolean => swap.on, owned, select, step,
|
|
1437
|
+
live: (value: Slot): boolean => held === value && !swap.on && !ports.locked(),
|
|
1438
|
+
armed: (value: Slot): boolean => held === value && !ports.locked(),
|
|
1439
|
+
snapshot: (): NativeLoadoutSnapshot<Slot> => ({ held, swap: swap.on ? { to: swap.to, t: swap.t, switched: swap.switched } : null }),
|
|
1440
|
+
restore: (value: unknown): void => {
|
|
1441
|
+
const saved = v.parse(Saved, value);
|
|
1442
|
+
held = saved.held; swap.on = saved.swap !== null;
|
|
1443
|
+
if (saved.swap !== null) { swap.to = saved.swap.to; swap.t = saved.swap.t; swap.switched = saved.swap.switched; }
|
|
1444
|
+
},
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
/** Posed geometric contact volumes; the caller retains actor/physics authority. */
|
|
1450
|
+
export interface NativeContactVolumes extends NativeMeleeVolumes {
|
|
1451
|
+
readonly fore?: { readonly a: Vector3; readonly b: Vector3; readonly radius: number } | null;
|
|
1452
|
+
}
|
|
1453
|
+
/** Caller-owned result storage, refilled without per-query allocation. */
|
|
1454
|
+
export interface NativeVolumeContact { distance: number; point: Vector3; head: boolean }
|
|
1455
|
+
const contactAp = new Vector3(), contactAb = new Vector3(), contactAo = new Vector3();
|
|
1456
|
+
/** The distance along the unit ray (origin, dir) to a ball, within `max`, or Infinity (0 from inside it, as Rapier's solid cast). */
|
|
1457
|
+
function contactSphereRay(origin: Vector3, dir: Vector3, centre: Vector3, r: number, max: number): number {
|
|
1458
|
+
contactAp.subVectors(origin, centre);
|
|
1459
|
+
const b = contactAp.dot(dir), c = contactAp.lengthSq() - r * r;
|
|
1460
|
+
if (c <= 0) return 0;
|
|
1461
|
+
const disc = b * b - c;
|
|
1462
|
+
if (b > 0 || disc < 0) return Infinity;
|
|
1463
|
+
const t = -b - Math.sqrt(disc);
|
|
1464
|
+
return t <= max ? t : Infinity;
|
|
1465
|
+
}
|
|
1466
|
+
/** The distance along the unit ray to a capsule (segment a–b, radius r), within `max`, or Infinity: the analytic cast (the
|
|
1467
|
+
* side of the cylinder, else the nearer end ball), 0 from inside it, as Rapier's solid cast of the page's hitbox. */
|
|
1468
|
+
function contactCapsuleRay(origin: Vector3, dir: Vector3, a: Vector3, b: Vector3, r: number, max: number): number {
|
|
1469
|
+
contactAb.subVectors(b, a); contactAo.subVectors(origin, a);
|
|
1470
|
+
const baba = contactAb.lengthSq();
|
|
1471
|
+
if (baba < 1e-12) return contactSphereRay(origin, dir, a, r, max);
|
|
1472
|
+
const u = Math.min(1, Math.max(0, contactAo.dot(contactAb) / baba));
|
|
1473
|
+
if (contactAp.copy(a).addScaledVector(contactAb, u).distanceToSquared(origin) <= r * r) return 0;
|
|
1474
|
+
const bard = contactAb.dot(dir), baoa = contactAb.dot(contactAo), rdoa = dir.dot(contactAo), oaoa = contactAo.lengthSq();
|
|
1475
|
+
const k2 = baba - bard * bard, k1 = baba * rdoa - baoa * bard, k0 = baba * oaoa - baoa * baoa - r * r * baba;
|
|
1476
|
+
let t = Infinity;
|
|
1477
|
+
if (k2 > 1e-12) {
|
|
1478
|
+
const h = k1 * k1 - k2 * k0;
|
|
1479
|
+
if (h < 0) return Infinity;
|
|
1480
|
+
const side = (-k1 - Math.sqrt(h)) / k2, y = baoa + side * bard;
|
|
1481
|
+
if (y > 0 && y < baba && side >= 0) t = side;
|
|
1482
|
+
}
|
|
1483
|
+
if (t === Infinity) t = Math.min(contactSphereRay(origin, dir, a, r, max), contactSphereRay(origin, dir, b, r, max));
|
|
1484
|
+
return t <= max ? t : Infinity;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
const contactNear = new Vector3(), contactDelta = new Vector3();
|
|
1488
|
+
function contactCapsuleSkin(origin: Vector3, a: Vector3, b: Vector3, radius: number, best: number, out: NativeVolumeContact): number {
|
|
1489
|
+
contactAb.subVectors(b, a);
|
|
1490
|
+
const along = contactAb.lengthSq() < 1e-12 ? 0 : Math.min(1, Math.max(0, contactDelta.subVectors(origin, a).dot(contactAb) / contactAb.lengthSq()));
|
|
1491
|
+
contactNear.copy(a).addScaledVector(contactAb, along);
|
|
1492
|
+
const skinDistance = Math.max(0, contactNear.distanceTo(origin) - radius);
|
|
1493
|
+
if (skinDistance < best) { out.point.copy(contactNear).sub(origin).setLength(skinDistance).add(origin); out.head = false; return skinDistance; }
|
|
1494
|
+
return best;
|
|
1495
|
+
}
|
|
1496
|
+
/** Query one posed head/body/fore volume set. A unit direction selects a solid
|
|
1497
|
+
* ray hit; null selects the nearest skin point to origin. World cover, target
|
|
1498
|
+
* ordering, damage and hit events remain with the original weapon owner.
|
|
1499
|
+
*/
|
|
1500
|
+
export function nativeVolumeContact(origin: Vector3, direction: Vector3 | null, limit: number,
|
|
1501
|
+
body: NativeContactVolumes, out: NativeVolumeContact): boolean {
|
|
1502
|
+
if (direction !== null) {
|
|
1503
|
+
const head = contactSphereRay(origin, direction, body.head, body.headRadius, limit);
|
|
1504
|
+
const trunk = contactCapsuleRay(origin, direction, body.a, body.b, body.bodyRadius, Math.min(limit, head));
|
|
1505
|
+
const fore = body.fore === undefined || body.fore === null ? Infinity
|
|
1506
|
+
: contactCapsuleRay(origin, direction, body.fore.a, body.fore.b, body.fore.radius, Math.min(limit, head, trunk));
|
|
1507
|
+
out.distance = Math.min(head, trunk, fore); out.head = head <= Math.min(trunk, fore);
|
|
1508
|
+
if (!Number.isFinite(out.distance) || out.distance > limit) return false;
|
|
1509
|
+
out.point.copy(origin).addScaledVector(direction, out.distance);
|
|
1510
|
+
return true;
|
|
1511
|
+
}
|
|
1512
|
+
let best = Math.max(0, body.head.distanceTo(origin) - body.headRadius);
|
|
1513
|
+
out.point.copy(body.head).sub(origin).setLength(best).add(origin); out.head = true;
|
|
1514
|
+
best = contactCapsuleSkin(origin, body.a, body.b, body.bodyRadius, best, out);
|
|
1515
|
+
if (body.fore !== undefined && body.fore !== null) best = contactCapsuleSkin(origin, body.fore.a, body.fore.b, body.fore.radius, best, out);
|
|
1516
|
+
out.distance = best;
|
|
1517
|
+
return best <= limit;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
/** Trusted posed-volume reader; a roster can lend its last synchronized pose. */
|
|
1522
|
+
export interface NativeTargetPose {
|
|
1523
|
+
readonly headWorld: (out: Vector3) => Vector3;
|
|
1524
|
+
readonly bodyCapsule: (rear: Vector3, front: Vector3) => void;
|
|
1525
|
+
readonly foreCapsule?: (rear: Vector3, front: Vector3) => boolean;
|
|
1526
|
+
}
|
|
1527
|
+
/** Minimal actor query port. Ownership, bodies and hit events stay with the host. */
|
|
1528
|
+
export interface NativeTargetBody extends NativeTargetPose {
|
|
1529
|
+
readonly alive: boolean; readonly hidden?: boolean; readonly scale: number;
|
|
1530
|
+
readonly position: Vector3;
|
|
1531
|
+
readonly dims: { readonly headRadius: number; readonly bodyRadius: number;
|
|
1532
|
+
readonly bodyHalfLen: number; readonly bodyY: number; readonly fore?: { readonly radius: number } };
|
|
1533
|
+
}
|
|
1534
|
+
/** Reused nearest ray result. Copy its point before another query if retained. */
|
|
1535
|
+
export interface NativeTargetHit<T extends NativeTargetBody> {
|
|
1536
|
+
body: T | null; head: boolean; distance: number; point: Vector3;
|
|
1537
|
+
}
|
|
1538
|
+
/** One owned pose/scratch reader, with bounded original-order roster queries. */
|
|
1539
|
+
export interface NativeTargetQueries<T extends NativeTargetBody> {
|
|
1540
|
+
readonly ray: (bodies: readonly T[], origin: Vector3, direction: Vector3, max: number) => NativeTargetHit<T> | null;
|
|
1541
|
+
readonly closest: (body: T, origin: Vector3, limit: number, out: NativeVolumeContact) => boolean;
|
|
1542
|
+
}
|
|
1543
|
+
/** Construct the shared ray-roster/closest-skin query owner. No actor or Rapier
|
|
1544
|
+
* state is changed; the optional pose port borrows a synchronized hitbox view.
|
|
1545
|
+
* Fore capsules are enabled unless a contact row explicitly omits them.
|
|
1546
|
+
*/
|
|
1547
|
+
export function createNativeTargetQueries<T extends NativeTargetBody>(ports: {
|
|
1548
|
+
readonly pose?: (body: T) => NativeTargetPose; readonly fore?: boolean;
|
|
1549
|
+
} = {}): NativeTargetQueries<T> {
|
|
1550
|
+
const volumes: { head: Vector3; headRadius: number; a: Vector3; b: Vector3; bodyRadius: number;
|
|
1551
|
+
fore: { a: Vector3; b: Vector3; radius: number } | null } = {
|
|
1552
|
+
head: new Vector3(), headRadius: 0, a: new Vector3(), b: new Vector3(), bodyRadius: 0, fore: null,
|
|
1553
|
+
};
|
|
1554
|
+
const fore = { a: new Vector3(), b: new Vector3(), radius: 0 };
|
|
1555
|
+
const result = { distance: 0, point: new Vector3(), head: false };
|
|
1556
|
+
const hit: NativeTargetHit<T> = { body: null, head: false, distance: 0, point: new Vector3() };
|
|
1557
|
+
const read = (body: T): void => {
|
|
1558
|
+
const pose = ports.pose?.(body) ?? body, d = body.dims, s = body.scale;
|
|
1559
|
+
pose.headWorld(volumes.head); volumes.headRadius = d.headRadius * s;
|
|
1560
|
+
pose.bodyCapsule(volumes.a, volumes.b); volumes.bodyRadius = d.bodyRadius * s;
|
|
1561
|
+
volumes.fore = null;
|
|
1562
|
+
if (ports.fore !== false && d.fore !== undefined && pose.foreCapsule?.(fore.a, fore.b) === true) {
|
|
1563
|
+
fore.radius = d.fore.radius * s; volumes.fore = fore;
|
|
1564
|
+
}
|
|
1565
|
+
};
|
|
1566
|
+
return {
|
|
1567
|
+
ray: (bodies, origin, direction, max) => {
|
|
1568
|
+
let found = false, best = max;
|
|
1569
|
+
for (let i = 0; i < 512; i++) {
|
|
1570
|
+
const body = bodies[i]; if (body === undefined) break;
|
|
1571
|
+
if (!body.alive || body.hidden === true) continue;
|
|
1572
|
+
const d = body.dims, s = body.scale;
|
|
1573
|
+
if (body.position.distanceTo(origin) > best + (d.bodyHalfLen + d.bodyRadius + d.headRadius) * s + d.bodyY * s + 2) continue;
|
|
1574
|
+
read(body);
|
|
1575
|
+
if (nativeVolumeContact(origin, direction, best, volumes, result) && result.distance < best) {
|
|
1576
|
+
best = result.distance; found = true; hit.body = body; hit.head = result.head;
|
|
1577
|
+
hit.distance = best; hit.point.copy(result.point);
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
return found ? hit : null;
|
|
1581
|
+
},
|
|
1582
|
+
closest: (body, origin, limit, out) => { read(body); return nativeVolumeContact(origin, null, limit, volumes, out); },
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/** Complete admitted data, independent of validator implementation metadata. */
|
|
1587
|
+
type BoundedNativeWorldMetadataInput = BoundedNativeWorldMetadata;
|
|
1588
|
+
interface BoundedNativeWorldMetadataFields {
|
|
1589
|
+
actors: {
|
|
1590
|
+
kind?: string;
|
|
1591
|
+
spec: unknown;
|
|
1592
|
+
}[];
|
|
1593
|
+
}
|
|
1594
|
+
type BoundedNativeWorldMetadata = { [Key in keyof BoundedNativeWorldMetadataFields]: BoundedNativeWorldMetadataFields[Key] };
|
|
1595
|
+
type BoundedNativeQuestMetadataInput = BoundedNativeQuestMetadata;
|
|
1596
|
+
interface BoundedNativeQuestMetadataFields {
|
|
1597
|
+
actors: {
|
|
1598
|
+
kind: string;
|
|
1599
|
+
spec: unknown;
|
|
1600
|
+
}[];
|
|
1601
|
+
bosses: {
|
|
1602
|
+
kind: string;
|
|
1603
|
+
spec: unknown;
|
|
1604
|
+
}[];
|
|
1605
|
+
spots: {
|
|
1606
|
+
interact: {
|
|
1607
|
+
id: string;
|
|
1608
|
+
x: number;
|
|
1609
|
+
y: number;
|
|
1610
|
+
z: number;
|
|
1611
|
+
radius: number;
|
|
1612
|
+
}[];
|
|
1613
|
+
crack: {
|
|
1614
|
+
id: string;
|
|
1615
|
+
x: number;
|
|
1616
|
+
y: number;
|
|
1617
|
+
z: number;
|
|
1618
|
+
radius: number;
|
|
1619
|
+
}[];
|
|
1620
|
+
};
|
|
1621
|
+
promptRegistrations?: unknown;
|
|
1622
|
+
}
|
|
1623
|
+
type BoundedNativeQuestMetadata = { [Key in keyof BoundedNativeQuestMetadataFields]: BoundedNativeQuestMetadataFields[Key] };
|