@verticopolis/components 0.0.0-stage → 0.2.0
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/ASSETS-LICENSE.md +49 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/lib/audio/Audio.d.ts +110 -0
- package/lib/audio/Audio.js +199 -0
- package/lib/audio/Audio.js.map +1 -0
- package/lib/audio/ToneAudioEngine.d.ts +125 -0
- package/lib/audio/ToneAudioEngine.js +452 -0
- package/lib/audio/ToneAudioEngine.js.map +1 -0
- package/lib/audio/audioAssets.d.ts +25 -0
- package/lib/audio/audioAssets.js +28 -0
- package/lib/audio/audioAssets.js.map +1 -0
- package/lib/audio/awayWatch.d.ts +17 -0
- package/lib/audio/awayWatch.js +33 -0
- package/lib/audio/awayWatch.js.map +1 -0
- package/lib/audio/firstCueLatch.d.ts +18 -0
- package/lib/audio/firstCueLatch.js +34 -0
- package/lib/audio/firstCueLatch.js.map +1 -0
- package/lib/audio/lightEnvelope.d.ts +64 -0
- package/lib/audio/lightEnvelope.js +124 -0
- package/lib/audio/lightEnvelope.js.map +1 -0
- package/lib/audio/lightSynth.d.ts +125 -0
- package/lib/audio/lightSynth.js +203 -0
- package/lib/audio/lightSynth.js.map +1 -0
- package/lib/audio/toneContext.d.ts +30 -0
- package/lib/audio/toneContext.js +79 -0
- package/lib/audio/toneContext.js.map +1 -0
- package/lib/audio/toneCrowd.d.ts +62 -0
- package/lib/audio/toneCrowd.js +429 -0
- package/lib/audio/toneCrowd.js.map +1 -0
- package/lib/audio/toneCrowdData.d.ts +144 -0
- package/lib/audio/toneCrowdData.js +317 -0
- package/lib/audio/toneCrowdData.js.map +1 -0
- package/lib/audio/toneCrowdPrograms.d.ts +71 -0
- package/lib/audio/toneCrowdPrograms.js +273 -0
- package/lib/audio/toneCrowdPrograms.js.map +1 -0
- package/lib/audio/toneCrowdVoices.d.ts +49 -0
- package/lib/audio/toneCrowdVoices.js +212 -0
- package/lib/audio/toneCrowdVoices.js.map +1 -0
- package/lib/audio/toneMusicVoices.d.ts +11 -0
- package/lib/audio/toneMusicVoices.js +31 -0
- package/lib/audio/toneMusicVoices.js.map +1 -0
- package/lib/audio/tonePercussion.d.ts +45 -0
- package/lib/audio/tonePercussion.js +97 -0
- package/lib/audio/tonePercussion.js.map +1 -0
- package/lib/audio/toneRain.d.ts +23 -0
- package/lib/audio/toneRain.js +39 -0
- package/lib/audio/toneRain.js.map +1 -0
- package/lib/audio/toneRecordingMock.d.ts +89 -0
- package/lib/audio/toneRecordingMock.js +145 -0
- package/lib/audio/toneRecordingMock.js.map +1 -0
- package/lib/audio/toneRoomTone.d.ts +11 -0
- package/lib/audio/toneRoomTone.js +27 -0
- package/lib/audio/toneRoomTone.js.map +1 -0
- package/lib/audio/toneScenes.d.ts +57 -0
- package/lib/audio/toneScenes.js +208 -0
- package/lib/audio/toneScenes.js.map +1 -0
- package/lib/audio/toneTracks.d.ts +50 -0
- package/lib/audio/toneTracks.js +356 -0
- package/lib/audio/toneTracks.js.map +1 -0
- package/lib/audio/toneVoices.d.ts +57 -0
- package/lib/audio/toneVoices.js +208 -0
- package/lib/audio/toneVoices.js.map +1 -0
- package/lib/catalog/catalogTypes.d.ts +428 -0
- package/lib/catalog/catalogTypes.js +102 -0
- package/lib/catalog/catalogTypes.js.map +1 -0
- package/lib/catalog/skyBridgeTypes.d.ts +25 -0
- package/lib/catalog/skyBridgeTypes.js +7 -0
- package/lib/catalog/skyBridgeTypes.js.map +1 -0
- package/lib/catalog/starDutyTypes.d.ts +22 -0
- package/lib/catalog/starDutyTypes.js +7 -0
- package/lib/catalog/starDutyTypes.js.map +1 -0
- package/lib/catalog/towerCatalog.d.ts +32 -0
- package/lib/catalog/towerCatalog.js +44 -0
- package/lib/catalog/towerCatalog.js.map +1 -0
- package/lib/engineBinding/binding.d.ts +36 -0
- package/lib/engineBinding/binding.js +90 -0
- package/lib/engineBinding/binding.js.map +1 -0
- package/lib/engineBinding/catalog.d.ts +24 -0
- package/lib/engineBinding/catalog.js +267 -0
- package/lib/engineBinding/catalog.js.map +1 -0
- package/lib/engineBinding/engine.d.ts +866 -0
- package/lib/engineBinding/exportTiers.d.ts +289 -0
- package/lib/engineBinding/exportTiers.js +283 -0
- package/lib/engineBinding/exportTiers.js.map +1 -0
- package/lib/engineBinding/toolingMethods.d.ts +12 -0
- package/lib/engineBinding/toolingMethods.js +20 -0
- package/lib/engineBinding/toolingMethods.js.map +1 -0
- package/lib/events/gameplayCatalog.d.ts +57 -0
- package/lib/events/gameplayCatalog.js +214 -0
- package/lib/events/gameplayCatalog.js.map +1 -0
- package/lib/events/gameplayEventRules.d.ts +4 -0
- package/lib/events/gameplayEventRules.js +32 -0
- package/lib/events/gameplayEventRules.js.map +1 -0
- package/lib/events/gameplayEvents.d.ts +284 -0
- package/lib/presentation/clockText.d.ts +28 -0
- package/lib/presentation/clockText.js +38 -0
- package/lib/presentation/clockText.js.map +1 -0
- package/lib/presentation/facilityPresentation.d.ts +20 -0
- package/lib/presentation/facilityPresentation.js +164 -0
- package/lib/presentation/facilityPresentation.js.map +1 -0
- package/lib/presentation/statsCopy.d.ts +20 -0
- package/lib/presentation/statsCopy.js +37 -0
- package/lib/presentation/statsCopy.js.map +1 -0
- package/lib/presentation/traffic.d.ts +75 -0
- package/lib/presentation/traffic.js +79 -0
- package/lib/presentation/traffic.js.map +1 -0
- package/lib/presentation/viewKinds.d.ts +33 -0
- package/lib/presentation/viewKinds.js +88 -0
- package/lib/presentation/viewKinds.js.map +1 -0
- package/lib/presentation/viewWorld.d.ts +29 -0
- package/lib/presentation/viewWorld.js +31 -0
- package/lib/presentation/viewWorld.js.map +1 -0
- package/lib/render/atlas/archive.d.ts +78 -0
- package/lib/render/atlas/archive.js +427 -0
- package/lib/render/atlas/archive.js.map +1 -0
- package/lib/render/atlas/bake.d.ts +132 -0
- package/lib/render/atlas/bake.js +331 -0
- package/lib/render/atlas/bake.js.map +1 -0
- package/lib/render/atlas/bakeAdditions.d.ts +24 -0
- package/lib/render/atlas/bakeAdditions.js +46 -0
- package/lib/render/atlas/bakeAdditions.js.map +1 -0
- package/lib/render/atlas/browserEntry.d.ts +12 -0
- package/lib/render/atlas/browserEntry.js +222 -0
- package/lib/render/atlas/browserEntry.js.map +1 -0
- package/lib/render/atlas/catalog.d.ts +118 -0
- package/lib/render/atlas/catalog.js +253 -0
- package/lib/render/atlas/catalog.js.map +1 -0
- package/lib/render/atlas/catalogExtras.d.ts +45 -0
- package/lib/render/atlas/catalogExtras.js +217 -0
- package/lib/render/atlas/catalogExtras.js.map +1 -0
- package/lib/render/atlas/compose.d.ts +30 -0
- package/lib/render/atlas/compose.js +125 -0
- package/lib/render/atlas/compose.js.map +1 -0
- package/lib/render/atlas/cycles.d.ts +25 -0
- package/lib/render/atlas/cycles.js +41 -0
- package/lib/render/atlas/cycles.js.map +1 -0
- package/lib/render/atlas/lookup.d.ts +65 -0
- package/lib/render/atlas/lookup.js +83 -0
- package/lib/render/atlas/lookup.js.map +1 -0
- package/lib/render/atlas/pack.d.ts +23 -0
- package/lib/render/atlas/pack.js +50 -0
- package/lib/render/atlas/pack.js.map +1 -0
- package/lib/render/atlas/paint.d.ts +120 -0
- package/lib/render/atlas/paint.js +154 -0
- package/lib/render/atlas/paint.js.map +1 -0
- package/lib/render/atlas/pixels.d.ts +46 -0
- package/lib/render/atlas/pixels.js +158 -0
- package/lib/render/atlas/pixels.js.map +1 -0
- package/lib/render/atlas/png.d.ts +3 -0
- package/lib/render/atlas/png.js +102 -0
- package/lib/render/atlas/png.js.map +1 -0
- package/lib/render/atlas/raster.d.ts +34 -0
- package/lib/render/atlas/raster.js +114 -0
- package/lib/render/atlas/raster.js.map +1 -0
- package/lib/render/atlas/recyclingFill.d.ts +5 -0
- package/lib/render/atlas/recyclingFill.js +65 -0
- package/lib/render/atlas/recyclingFill.js.map +1 -0
- package/lib/render/atlas/samples.d.ts +24 -0
- package/lib/render/atlas/samples.js +75 -0
- package/lib/render/atlas/samples.js.map +1 -0
- package/lib/render/atlas/scenery.d.ts +230 -0
- package/lib/render/atlas/scenery.js +242 -0
- package/lib/render/atlas/scenery.js.map +1 -0
- package/lib/render/atlas/schema.d.ts +189 -0
- package/lib/render/atlas/schema.js +31 -0
- package/lib/render/atlas/schema.js.map +1 -0
- package/lib/render/atlas/shellMarks.d.ts +16 -0
- package/lib/render/atlas/shellMarks.js +72 -0
- package/lib/render/atlas/shellMarks.js.map +1 -0
- package/lib/render/atlas/store.d.ts +75 -0
- package/lib/render/atlas/store.js +127 -0
- package/lib/render/atlas/store.js.map +1 -0
- package/lib/render/atlas/verify.d.ts +43 -0
- package/lib/render/atlas/verify.js +87 -0
- package/lib/render/atlas/verify.js.map +1 -0
- package/lib/render/atlas/verifyExtras.d.ts +19 -0
- package/lib/render/atlas/verifyExtras.js +310 -0
- package/lib/render/atlas/verifyExtras.js.map +1 -0
- package/lib/render/cameraBounds.d.ts +71 -0
- package/lib/render/cameraBounds.js +107 -0
- package/lib/render/cameraBounds.js.map +1 -0
- package/lib/render/carIndicator.d.ts +41 -0
- package/lib/render/carIndicator.js +45 -0
- package/lib/render/carIndicator.js.map +1 -0
- package/lib/render/carMotion.d.ts +33 -0
- package/lib/render/carMotion.js +42 -0
- package/lib/render/carMotion.js.map +1 -0
- package/lib/render/catalogScale.d.ts +40 -0
- package/lib/render/catalogScale.js +33 -0
- package/lib/render/catalogScale.js.map +1 -0
- package/lib/render/climbPath.d.ts +59 -0
- package/lib/render/climbPath.js +115 -0
- package/lib/render/climbPath.js.map +1 -0
- package/lib/render/depthPlanes.d.ts +55 -0
- package/lib/render/depthPlanes.js +58 -0
- package/lib/render/depthPlanes.js.map +1 -0
- package/lib/render/excalibur/TowerEngine.d.ts +348 -0
- package/lib/render/excalibur/TowerEngine.js +415 -0
- package/lib/render/excalibur/TowerEngine.js.map +1 -0
- package/lib/render/excalibur/cabGraphics.d.ts +75 -0
- package/lib/render/excalibur/cabGraphics.js +108 -0
- package/lib/render/excalibur/cabGraphics.js.map +1 -0
- package/lib/render/excalibur/cabParts.d.ts +32 -0
- package/lib/render/excalibur/cabParts.js +79 -0
- package/lib/render/excalibur/cabParts.js.map +1 -0
- package/lib/render/excalibur/cabRiders.d.ts +72 -0
- package/lib/render/excalibur/cabRiders.js +176 -0
- package/lib/render/excalibur/cabRiders.js.map +1 -0
- package/lib/render/excalibur/crowdCull.d.ts +34 -0
- package/lib/render/excalibur/crowdCull.js +72 -0
- package/lib/render/excalibur/crowdCull.js.map +1 -0
- package/lib/render/excalibur/crowdFigure.d.ts +42 -0
- package/lib/render/excalibur/crowdFigure.js +99 -0
- package/lib/render/excalibur/crowdFigure.js.map +1 -0
- package/lib/render/excalibur/crowdLook.d.ts +137 -0
- package/lib/render/excalibur/crowdLook.js +186 -0
- package/lib/render/excalibur/crowdLook.js.map +1 -0
- package/lib/render/excalibur/frameHold.d.ts +23 -0
- package/lib/render/excalibur/frameHold.js +30 -0
- package/lib/render/excalibur/frameHold.js.map +1 -0
- package/lib/render/excalibur/guardPosition.d.ts +17 -0
- package/lib/render/excalibur/guardPosition.js +37 -0
- package/lib/render/excalibur/guardPosition.js.map +1 -0
- package/lib/render/excalibur/keyboardHost.d.ts +15 -0
- package/lib/render/excalibur/keyboardHost.js +22 -0
- package/lib/render/excalibur/keyboardHost.js.map +1 -0
- package/lib/render/excalibur/longPress.d.ts +16 -0
- package/lib/render/excalibur/longPress.js +71 -0
- package/lib/render/excalibur/longPress.js.map +1 -0
- package/lib/render/excalibur/peopleGfx.d.ts +16 -0
- package/lib/render/excalibur/peopleGfx.js +46 -0
- package/lib/render/excalibur/peopleGfx.js.map +1 -0
- package/lib/render/excalibur/peopleWindow.d.ts +35 -0
- package/lib/render/excalibur/peopleWindow.js +38 -0
- package/lib/render/excalibur/peopleWindow.js.map +1 -0
- package/lib/render/excalibur/personFocus.d.ts +36 -0
- package/lib/render/excalibur/personFocus.js +169 -0
- package/lib/render/excalibur/personFocus.js.map +1 -0
- package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
- package/lib/render/excalibur/pointerButtonGuard.js +86 -0
- package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
- package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
- package/lib/render/excalibur/pressLifecycle.js +66 -0
- package/lib/render/excalibur/pressLifecycle.js.map +1 -0
- package/lib/render/excalibur/rainShelter.d.ts +16 -0
- package/lib/render/excalibur/rainShelter.js +94 -0
- package/lib/render/excalibur/rainShelter.js.map +1 -0
- package/lib/render/excalibur/roomSignature.d.ts +30 -0
- package/lib/render/excalibur/roomSignature.js +49 -0
- package/lib/render/excalibur/roomSignature.js.map +1 -0
- package/lib/render/excalibur/sceneBake.d.ts +9 -0
- package/lib/render/excalibur/sceneBake.js +12 -0
- package/lib/render/excalibur/sceneBake.js.map +1 -0
- package/lib/render/excalibur/thiefSpan.d.ts +18 -0
- package/lib/render/excalibur/thiefSpan.js +51 -0
- package/lib/render/excalibur/thiefSpan.js.map +1 -0
- package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
- package/lib/render/excalibur/towerBridgeTiles.js +43 -0
- package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
- package/lib/render/excalibur/towerCrowd.d.ts +73 -0
- package/lib/render/excalibur/towerCrowd.js +464 -0
- package/lib/render/excalibur/towerCrowd.js.map +1 -0
- package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
- package/lib/render/excalibur/towerCrowdLayout.js +77 -0
- package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
- package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
- package/lib/render/excalibur/towerFireResponse.js +89 -0
- package/lib/render/excalibur/towerFireResponse.js.map +1 -0
- package/lib/render/excalibur/towerFrame.d.ts +8 -0
- package/lib/render/excalibur/towerFrame.js +57 -0
- package/lib/render/excalibur/towerFrame.js.map +1 -0
- package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
- package/lib/render/excalibur/towerGhostLabel.js +37 -0
- package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
- package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
- package/lib/render/excalibur/towerHallDoors.js +129 -0
- package/lib/render/excalibur/towerHallDoors.js.map +1 -0
- package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
- package/lib/render/excalibur/towerHaloRings.js +45 -0
- package/lib/render/excalibur/towerHaloRings.js.map +1 -0
- package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
- package/lib/render/excalibur/towerInputCamera.js +480 -0
- package/lib/render/excalibur/towerInputCamera.js.map +1 -0
- package/lib/render/excalibur/towerMetro.d.ts +31 -0
- package/lib/render/excalibur/towerMetro.js +115 -0
- package/lib/render/excalibur/towerMetro.js.map +1 -0
- package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
- package/lib/render/excalibur/towerNoiseReach.js +75 -0
- package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
- package/lib/render/excalibur/towerOverlay.d.ts +59 -0
- package/lib/render/excalibur/towerOverlay.js +453 -0
- package/lib/render/excalibur/towerOverlay.js.map +1 -0
- package/lib/render/excalibur/towerReconcile.d.ts +17 -0
- package/lib/render/excalibur/towerReconcile.js +404 -0
- package/lib/render/excalibur/towerReconcile.js.map +1 -0
- package/lib/render/excalibur/towerRegions.d.ts +61 -0
- package/lib/render/excalibur/towerRegions.js +193 -0
- package/lib/render/excalibur/towerRegions.js.map +1 -0
- package/lib/render/excalibur/towerScene.d.ts +66 -0
- package/lib/render/excalibur/towerScene.js +443 -0
- package/lib/render/excalibur/towerScene.js.map +1 -0
- package/lib/render/excalibur/towerScenery.d.ts +12 -0
- package/lib/render/excalibur/towerScenery.js +299 -0
- package/lib/render/excalibur/towerScenery.js.map +1 -0
- package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
- package/lib/render/excalibur/towerSceneryDraw.js +288 -0
- package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
- package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
- package/lib/render/excalibur/towerShaftNumbers.js +90 -0
- package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
- package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
- package/lib/render/excalibur/towerStructTiles.js +238 -0
- package/lib/render/excalibur/towerStructTiles.js.map +1 -0
- package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
- package/lib/render/excalibur/towerSyncSchedule.js +137 -0
- package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
- package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
- package/lib/render/excalibur/towerWalkerBuild.js +126 -0
- package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
- package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
- package/lib/render/excalibur/trafficSpotlight.js +64 -0
- package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
- package/lib/render/facadeGeometry.d.ts +50 -0
- package/lib/render/facadeGeometry.js +79 -0
- package/lib/render/facadeGeometry.js.map +1 -0
- package/lib/render/groundEntrances.d.ts +44 -0
- package/lib/render/groundEntrances.js +118 -0
- package/lib/render/groundEntrances.js.map +1 -0
- package/lib/render/lateNight.d.ts +14 -0
- package/lib/render/lateNight.js +18 -0
- package/lib/render/lateNight.js.map +1 -0
- package/lib/render/lobbyHalls.d.ts +44 -0
- package/lib/render/lobbyHalls.js +63 -0
- package/lib/render/lobbyHalls.js.map +1 -0
- package/lib/render/metroTrainSchedule.d.ts +20 -0
- package/lib/render/metroTrainSchedule.js +65 -0
- package/lib/render/metroTrainSchedule.js.map +1 -0
- package/lib/render/overviewMap/drawList.d.ts +67 -0
- package/lib/render/overviewMap/drawList.js +103 -0
- package/lib/render/overviewMap/drawList.js.map +1 -0
- package/lib/render/overviewMap/extent.d.ts +70 -0
- package/lib/render/overviewMap/extent.js +155 -0
- package/lib/render/overviewMap/extent.js.map +1 -0
- package/lib/render/overviewMap/floorSpans.d.ts +27 -0
- package/lib/render/overviewMap/floorSpans.js +32 -0
- package/lib/render/overviewMap/floorSpans.js.map +1 -0
- package/lib/render/overviewMap/gaps.d.ts +48 -0
- package/lib/render/overviewMap/gaps.js +148 -0
- package/lib/render/overviewMap/gaps.js.map +1 -0
- package/lib/render/overviewMap/geometry.d.ts +139 -0
- package/lib/render/overviewMap/geometry.js +245 -0
- package/lib/render/overviewMap/geometry.js.map +1 -0
- package/lib/render/overviewMap/heatView.d.ts +91 -0
- package/lib/render/overviewMap/heatView.js +143 -0
- package/lib/render/overviewMap/heatView.js.map +1 -0
- package/lib/render/overviewMap/hotelView.d.ts +82 -0
- package/lib/render/overviewMap/hotelView.js +136 -0
- package/lib/render/overviewMap/hotelView.js.map +1 -0
- package/lib/render/overviewMap/model.d.ts +97 -0
- package/lib/render/overviewMap/model.js +116 -0
- package/lib/render/overviewMap/model.js.map +1 -0
- package/lib/render/overviewMap/paint.d.ts +63 -0
- package/lib/render/overviewMap/paint.js +168 -0
- package/lib/render/overviewMap/paint.js.map +1 -0
- package/lib/render/overviewMap/style.d.ts +46 -0
- package/lib/render/overviewMap/style.js +117 -0
- package/lib/render/overviewMap/style.js.map +1 -0
- package/lib/render/overviewMap/tierView.d.ts +103 -0
- package/lib/render/overviewMap/tierView.js +209 -0
- package/lib/render/overviewMap/tierView.js.map +1 -0
- package/lib/render/overviewMap/viewMark.d.ts +69 -0
- package/lib/render/overviewMap/viewMark.js +103 -0
- package/lib/render/overviewMap/viewMark.js.map +1 -0
- package/lib/render/overviewMap/views.d.ts +24 -0
- package/lib/render/overviewMap/views.js +29 -0
- package/lib/render/overviewMap/views.js.map +1 -0
- package/lib/render/pinchTracker.d.ts +91 -0
- package/lib/render/pinchTracker.js +145 -0
- package/lib/render/pinchTracker.js.map +1 -0
- package/lib/render/pixelSprites/amusements.d.ts +32 -0
- package/lib/render/pixelSprites/amusements.js +243 -0
- package/lib/render/pixelSprites/amusements.js.map +1 -0
- package/lib/render/pixelSprites/artScale.d.ts +97 -0
- package/lib/render/pixelSprites/artScale.js +151 -0
- package/lib/render/pixelSprites/artScale.js.map +1 -0
- package/lib/render/pixelSprites/boutique.d.ts +30 -0
- package/lib/render/pixelSprites/boutique.js +244 -0
- package/lib/render/pixelSprites/boutique.js.map +1 -0
- package/lib/render/pixelSprites/clinic.d.ts +30 -0
- package/lib/render/pixelSprites/clinic.js +184 -0
- package/lib/render/pixelSprites/clinic.js.map +1 -0
- package/lib/render/pixelSprites/common.d.ts +185 -0
- package/lib/render/pixelSprites/common.js +449 -0
- package/lib/render/pixelSprites/common.js.map +1 -0
- package/lib/render/pixelSprites/daycare.d.ts +3 -0
- package/lib/render/pixelSprites/daycare.js +99 -0
- package/lib/render/pixelSprites/daycare.js.map +1 -0
- package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
- package/lib/render/pixelSprites/dollhouse.js +110 -0
- package/lib/render/pixelSprites/dollhouse.js.map +1 -0
- package/lib/render/pixelSprites/fitness.d.ts +30 -0
- package/lib/render/pixelSprites/fitness.js +176 -0
- package/lib/render/pixelSprites/fitness.js.map +1 -0
- package/lib/render/pixelSprites/food.d.ts +27 -0
- package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
- package/lib/render/pixelSprites/food.interiors.js +516 -0
- package/lib/render/pixelSprites/food.interiors.js.map +1 -0
- package/lib/render/pixelSprites/food.js +36 -0
- package/lib/render/pixelSprites/food.js.map +1 -0
- package/lib/render/pixelSprites/food.kit.d.ts +50 -0
- package/lib/render/pixelSprites/food.kit.js +140 -0
- package/lib/render/pixelSprites/food.kit.js.map +1 -0
- package/lib/render/pixelSprites/food.looks.d.ts +45 -0
- package/lib/render/pixelSprites/food.looks.js +56 -0
- package/lib/render/pixelSprites/food.looks.js.map +1 -0
- package/lib/render/pixelSprites/layers.d.ts +49 -0
- package/lib/render/pixelSprites/layers.js +61 -0
- package/lib/render/pixelSprites/layers.js.map +1 -0
- package/lib/render/pixelSprites/nightclub.d.ts +3 -0
- package/lib/render/pixelSprites/nightclub.js +108 -0
- package/lib/render/pixelSprites/nightclub.js.map +1 -0
- package/lib/render/pixelSprites/people.d.ts +168 -0
- package/lib/render/pixelSprites/people.js +431 -0
- package/lib/render/pixelSprites/people.js.map +1 -0
- package/lib/render/pixelSprites/residential.d.ts +5 -0
- package/lib/render/pixelSprites/residential.js +506 -0
- package/lib/render/pixelSprites/residential.js.map +1 -0
- package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
- package/lib/render/pixelSprites/residential.looks.js +43 -0
- package/lib/render/pixelSprites/residential.looks.js.map +1 -0
- package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
- package/lib/render/pixelSprites/residential.roaches.js +88 -0
- package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
- package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
- package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
- package/lib/render/pixelSprites/shop.d.ts +14 -0
- package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
- package/lib/render/pixelSprites/shop.interiors.js +382 -0
- package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
- package/lib/render/pixelSprites/shop.js +72 -0
- package/lib/render/pixelSprites/shop.js.map +1 -0
- package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
- package/lib/render/pixelSprites/shop.looks.js +24 -0
- package/lib/render/pixelSprites/shop.looks.js.map +1 -0
- package/lib/render/pixelSprites/skyBar.d.ts +11 -0
- package/lib/render/pixelSprites/skyBar.js +125 -0
- package/lib/render/pixelSprites/skyBar.js.map +1 -0
- package/lib/render/pixelSprites/spa.d.ts +3 -0
- package/lib/render/pixelSprites/spa.js +88 -0
- package/lib/render/pixelSprites/spa.js.map +1 -0
- package/lib/render/pixelSprites.d.ts +33 -0
- package/lib/render/pixelSprites.js +167 -0
- package/lib/render/pixelSprites.js.map +1 -0
- package/lib/render/regionGrid.d.ts +49 -0
- package/lib/render/regionGrid.js +82 -0
- package/lib/render/regionGrid.js.map +1 -0
- package/lib/render/regionPaint.d.ts +15 -0
- package/lib/render/regionPaint.js +33 -0
- package/lib/render/regionPaint.js.map +1 -0
- package/lib/render/renderSim.d.ts +104 -0
- package/lib/render/renderSim.js +2 -0
- package/lib/render/renderSim.js.map +1 -0
- package/lib/render/roomPortrait.d.ts +35 -0
- package/lib/render/roomPortrait.js +142 -0
- package/lib/render/roomPortrait.js.map +1 -0
- package/lib/render/roomShading.d.ts +29 -0
- package/lib/render/roomShading.js +43 -0
- package/lib/render/roomShading.js.map +1 -0
- package/lib/render/scale.d.ts +31 -0
- package/lib/render/scale.js +34 -0
- package/lib/render/scale.js.map +1 -0
- package/lib/render/sceneryLayout.d.ts +234 -0
- package/lib/render/sceneryLayout.js +199 -0
- package/lib/render/sceneryLayout.js.map +1 -0
- package/lib/render/sprites/common.d.ts +41 -0
- package/lib/render/sprites/common.js +46 -0
- package/lib/render/sprites/common.js.map +1 -0
- package/lib/render/sprites/escalator.d.ts +27 -0
- package/lib/render/sprites/escalator.js +156 -0
- package/lib/render/sprites/escalator.js.map +1 -0
- package/lib/render/sprites/events.d.ts +56 -0
- package/lib/render/sprites/events.js +280 -0
- package/lib/render/sprites/events.js.map +1 -0
- package/lib/render/sprites/facilities/garage.d.ts +23 -0
- package/lib/render/sprites/facilities/garage.js +230 -0
- package/lib/render/sprites/facilities/garage.js.map +1 -0
- package/lib/render/sprites/facilities/recycling.d.ts +3 -0
- package/lib/render/sprites/facilities/recycling.js +210 -0
- package/lib/render/sprites/facilities/recycling.js.map +1 -0
- package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
- package/lib/render/sprites/facilities/recyclingLook.js +52 -0
- package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
- package/lib/render/sprites/facilities/service.d.ts +14 -0
- package/lib/render/sprites/facilities/service.js +437 -0
- package/lib/render/sprites/facilities/service.js.map +1 -0
- package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
- package/lib/render/sprites/facilities/serviceKit.js +113 -0
- package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
- package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
- package/lib/render/sprites/facilities/vehicles.js +276 -0
- package/lib/render/sprites/facilities/vehicles.js.map +1 -0
- package/lib/render/sprites/facilities/venue.d.ts +28 -0
- package/lib/render/sprites/facilities/venue.js +211 -0
- package/lib/render/sprites/facilities/venue.js.map +1 -0
- package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
- package/lib/render/sprites/facilities/weddingHall.js +410 -0
- package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
- package/lib/render/sprites/facilities.d.ts +22 -0
- package/lib/render/sprites/facilities.js +24 -0
- package/lib/render/sprites/facilities.js.map +1 -0
- package/lib/render/sprites/helicopter.d.ts +11 -0
- package/lib/render/sprites/helicopter.js +60 -0
- package/lib/render/sprites/helicopter.js.map +1 -0
- package/lib/render/sprites/sky.d.ts +67 -0
- package/lib/render/sprites/sky.js +85 -0
- package/lib/render/sprites/sky.js.map +1 -0
- package/lib/render/sprites/spiralStair.d.ts +19 -0
- package/lib/render/sprites/spiralStair.js +111 -0
- package/lib/render/sprites/spiralStair.js.map +1 -0
- package/lib/render/sprites/structure/entrance.d.ts +35 -0
- package/lib/render/sprites/structure/entrance.js +347 -0
- package/lib/render/sprites/structure/entrance.js.map +1 -0
- package/lib/render/sprites/structure/lobby.d.ts +88 -0
- package/lib/render/sprites/structure/lobby.js +350 -0
- package/lib/render/sprites/structure/lobby.js.map +1 -0
- package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
- package/lib/render/sprites/structure/revolvingDoor.js +184 -0
- package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
- package/lib/render/sprites/structure/rooftop.d.ts +93 -0
- package/lib/render/sprites/structure/rooftop.js +302 -0
- package/lib/render/sprites/structure/rooftop.js.map +1 -0
- package/lib/render/sprites/structure/shell.d.ts +19 -0
- package/lib/render/sprites/structure/shell.js +142 -0
- package/lib/render/sprites/structure/shell.js.map +1 -0
- package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
- package/lib/render/sprites/structure/skyBridge.js +259 -0
- package/lib/render/sprites/structure/skyBridge.js.map +1 -0
- package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
- package/lib/render/sprites/structure/tallLobby.js +166 -0
- package/lib/render/sprites/structure/tallLobby.js.map +1 -0
- package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
- package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
- package/lib/render/sprites/structure.d.ts +15 -0
- package/lib/render/sprites/structure.js +16 -0
- package/lib/render/sprites/structure.js.map +1 -0
- package/lib/render/sprites/transport.d.ts +30 -0
- package/lib/render/sprites/transport.js +376 -0
- package/lib/render/sprites/transport.js.map +1 -0
- package/lib/render/sprites.d.ts +16 -0
- package/lib/render/sprites.js +108 -0
- package/lib/render/sprites.js.map +1 -0
- package/lib/render/venueFlights.d.ts +61 -0
- package/lib/render/venueFlights.js +50 -0
- package/lib/render/venueFlights.js.map +1 -0
- package/lib/shared/engineTypes.d.ts +256 -0
- package/lib/shared/engineTypes.js +8 -0
- package/lib/shared/engineTypes.js.map +1 -0
- package/lib/shared/floorRuns.d.ts +22 -0
- package/lib/shared/floorRuns.js +39 -0
- package/lib/shared/floorRuns.js.map +1 -0
- package/lib/shared/inputEvents.d.ts +18 -0
- package/lib/shared/inputEvents.js +23 -0
- package/lib/shared/inputEvents.js.map +1 -0
- package/lib/shared/serializedGame.d.ts +142 -0
- package/lib/shared/serializedGame.js +2 -0
- package/lib/shared/serializedGame.js.map +1 -0
- package/lib/shared/types.d.ts +298 -0
- package/lib/shared/types.js +47 -0
- package/lib/shared/types.js.map +1 -0
- package/lib/shared/unitState.d.ts +36 -0
- package/lib/shared/unitState.js +42 -0
- package/lib/shared/unitState.js.map +1 -0
- package/lib/shared/vacateReasonText.d.ts +20 -0
- package/lib/shared/vacateReasonText.js +23 -0
- package/lib/shared/vacateReasonText.js.map +1 -0
- package/lib/shared/viewZoom.d.ts +14 -0
- package/lib/shared/viewZoom.js +17 -0
- package/lib/shared/viewZoom.js.map +1 -0
- package/lib/shared/wellFormed.d.ts +14 -0
- package/lib/shared/wellFormed.js +19 -0
- package/lib/shared/wellFormed.js.map +1 -0
- package/lib/simport/cards.d.ts +26 -0
- package/lib/simport/cards.js +138 -0
- package/lib/simport/cards.js.map +1 -0
- package/lib/simport/clockView.d.ts +24 -0
- package/lib/simport/clockView.js +43 -0
- package/lib/simport/clockView.js.map +1 -0
- package/lib/simport/commands.d.ts +215 -0
- package/lib/simport/commands.js +2 -0
- package/lib/simport/commands.js.map +1 -0
- package/lib/simport/emergencyReads.d.ts +19 -0
- package/lib/simport/emergencyReads.js +47 -0
- package/lib/simport/emergencyReads.js.map +1 -0
- package/lib/simport/enginePort.d.ts +433 -0
- package/lib/simport/enginePort.js +11 -0
- package/lib/simport/enginePort.js.map +1 -0
- package/lib/simport/fixtures/catalog.classic.json +2137 -0
- package/lib/simport/fixtures/catalog.modern.json +2515 -0
- package/lib/simport/fixtures/viewLayout.json +927 -0
- package/lib/simport/headerClock.d.ts +31 -0
- package/lib/simport/headerClock.js +29 -0
- package/lib/simport/headerClock.js.map +1 -0
- package/lib/simport/panels.d.ts +243 -0
- package/lib/simport/panels.js +2 -0
- package/lib/simport/panels.js.map +1 -0
- package/lib/simport/personCards.d.ts +63 -0
- package/lib/simport/personCards.js +55 -0
- package/lib/simport/personCards.js.map +1 -0
- package/lib/simport/portCodes.d.ts +41 -0
- package/lib/simport/portCodes.js +49 -0
- package/lib/simport/portCodes.js.map +1 -0
- package/lib/simport/portEvents.d.ts +39 -0
- package/lib/simport/portEvents.js +43 -0
- package/lib/simport/portEvents.js.map +1 -0
- package/lib/simport/portRenderSim.d.ts +70 -0
- package/lib/simport/portRenderSim.js +129 -0
- package/lib/simport/portRenderSim.js.map +1 -0
- package/lib/simport/queries.d.ts +64 -0
- package/lib/simport/queries.js +30 -0
- package/lib/simport/queries.js.map +1 -0
- package/lib/simport/recyclingPort.d.ts +13 -0
- package/lib/simport/recyclingPort.js +2 -0
- package/lib/simport/recyclingPort.js.map +1 -0
- package/lib/simport/request.d.ts +44 -0
- package/lib/simport/request.js +214 -0
- package/lib/simport/request.js.map +1 -0
- package/lib/simport/roomTiers.d.ts +102 -0
- package/lib/simport/roomTiers.js +122 -0
- package/lib/simport/roomTiers.js.map +1 -0
- package/lib/simport/scheduleSlots.d.ts +19 -0
- package/lib/simport/scheduleSlots.js +87 -0
- package/lib/simport/scheduleSlots.js.map +1 -0
- package/lib/simport/skyBridgePort.d.ts +20 -0
- package/lib/simport/skyBridgePort.js +2 -0
- package/lib/simport/skyBridgePort.js.map +1 -0
- package/lib/simport/skyBridgeView.d.ts +15 -0
- package/lib/simport/skyBridgeView.js +42 -0
- package/lib/simport/skyBridgeView.js.map +1 -0
- package/lib/simport/statsSheet.d.ts +15 -0
- package/lib/simport/statsSheet.js +101 -0
- package/lib/simport/statsSheet.js.map +1 -0
- package/lib/simport/tdtRecords.d.ts +9 -0
- package/lib/simport/tdtRecords.js +112 -0
- package/lib/simport/tdtRecords.js.map +1 -0
- package/lib/simport/tdtReportFacts.d.ts +110 -0
- package/lib/simport/tdtReportFacts.js +8 -0
- package/lib/simport/tdtReportFacts.js.map +1 -0
- package/lib/simport/trafficPort.d.ts +22 -0
- package/lib/simport/trafficPort.js +2 -0
- package/lib/simport/trafficPort.js.map +1 -0
- package/lib/simport/view.d.ts +275 -0
- package/lib/simport/view.js +2 -0
- package/lib/simport/view.js.map +1 -0
- package/lib/simport/viewReader.d.ts +89 -0
- package/lib/simport/viewReader.js +426 -0
- package/lib/simport/viewReader.js.map +1 -0
- package/lib/styles/game/appearance.css +108 -0
- package/lib/styles/game/base.css +68 -0
- package/lib/styles/game/components.css +69 -0
- package/lib/styles/game/desk-title.css +183 -0
- package/lib/styles/game/desk.css +487 -0
- package/lib/styles/game/dialogs.css +360 -0
- package/lib/styles/game/editor-sidebar.css +116 -0
- package/lib/styles/game/elevator-schedule.css +217 -0
- package/lib/styles/game/file-dialog.css +470 -0
- package/lib/styles/game/help.css +141 -0
- package/lib/styles/game/launch-fireworks.css +17 -0
- package/lib/styles/game/media-landscape.css +333 -0
- package/lib/styles/game/media-phone.css +303 -0
- package/lib/styles/game/media-tablet-touch.css +177 -0
- package/lib/styles/game/menubar.css +158 -0
- package/lib/styles/game/new-tower.css +219 -0
- package/lib/styles/game/onboarding.css +32 -0
- package/lib/styles/game/screen-saver.css +85 -0
- package/lib/styles/game/splash.css +413 -0
- package/lib/styles/game/stats-saves.css +106 -0
- package/lib/styles/game/tools-stage.css +340 -0
- package/lib/styles/game/topbar.css +191 -0
- package/lib/styles/menu-bar.css +108 -0
- package/lib/styles/not-found.css +335 -0
- package/lib/styles/overview-map-views.css +88 -0
- package/lib/styles/overview-map.css +195 -0
- package/lib/styles/retro-components.css +179 -0
- package/lib/styles/retro-page.css +254 -0
- package/lib/styles/retro-tokens.css +122 -0
- package/lib/styles/schemes/high-contrast.css +173 -0
- package/lib/styles/schemes/skyline.css +134 -0
- package/lib/styles.css +66 -0
- package/lib/ui/desk/deskGeometry.d.ts +59 -0
- package/lib/ui/desk/deskGeometry.js +106 -0
- package/lib/ui/desk/deskGeometry.js.map +1 -0
- package/lib/ui/desk/deskWindow.d.ts +90 -0
- package/lib/ui/desk/deskWindow.js +253 -0
- package/lib/ui/desk/deskWindow.js.map +1 -0
- package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
- package/lib/ui/desk/deskWindowMenu.js +143 -0
- package/lib/ui/desk/deskWindowMenu.js.map +1 -0
- package/lib/ui/escape.d.ts +1 -0
- package/lib/ui/escape.js +14 -0
- package/lib/ui/escape.js.map +1 -0
- package/lib/ui/format.d.ts +14 -0
- package/lib/ui/format.js +36 -0
- package/lib/ui/format.js.map +1 -0
- package/lib/ui/iconPaths.generated.d.ts +4 -0
- package/lib/ui/iconPaths.generated.js +68 -0
- package/lib/ui/iconPaths.generated.js.map +1 -0
- package/lib/ui/icons.d.ts +83 -0
- package/lib/ui/icons.js +156 -0
- package/lib/ui/icons.js.map +1 -0
- package/lib/ui/menuBar.d.ts +94 -0
- package/lib/ui/menuBar.js +361 -0
- package/lib/ui/menuBar.js.map +1 -0
- package/lib/ui/modalPrecedence.d.ts +108 -0
- package/lib/ui/modalPrecedence.js +165 -0
- package/lib/ui/modalPrecedence.js.map +1 -0
- package/lib/ui/movableWindow.d.ts +124 -0
- package/lib/ui/movableWindow.js +247 -0
- package/lib/ui/movableWindow.js.map +1 -0
- package/lib/ui/overviewMapInput.d.ts +109 -0
- package/lib/ui/overviewMapInput.js +135 -0
- package/lib/ui/overviewMapInput.js.map +1 -0
- package/lib/ui/uiModal.d.ts +38 -0
- package/lib/ui/uiModal.js +70 -0
- package/lib/ui/uiModal.js.map +1 -0
- package/lib/wasmhost/buildSection.d.ts +54 -0
- package/lib/wasmhost/buildSection.js +143 -0
- package/lib/wasmhost/buildSection.js.map +1 -0
- package/lib/wasmhost/catalogCheck.d.ts +11 -0
- package/lib/wasmhost/catalogCheck.js +43 -0
- package/lib/wasmhost/catalogCheck.js.map +1 -0
- package/lib/wasmhost/engineAssets.d.ts +57 -0
- package/lib/wasmhost/engineAssets.js +63 -0
- package/lib/wasmhost/engineAssets.js.map +1 -0
- package/lib/wasmhost/engineBoot.d.ts +165 -0
- package/lib/wasmhost/engineBoot.js +254 -0
- package/lib/wasmhost/engineBoot.js.map +1 -0
- package/lib/wasmhost/engineChoice.d.ts +6 -0
- package/lib/wasmhost/engineChoice.js +2 -0
- package/lib/wasmhost/engineChoice.js.map +1 -0
- package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
- package/lib/wasmhost/engineDiagnostics.js +189 -0
- package/lib/wasmhost/engineDiagnostics.js.map +1 -0
- package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
- package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
- package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
- package/lib/wasmhost/engineIdentity.d.ts +30 -0
- package/lib/wasmhost/engineIdentity.js +59 -0
- package/lib/wasmhost/engineIdentity.js.map +1 -0
- package/lib/wasmhost/engineLabel.d.ts +40 -0
- package/lib/wasmhost/engineLabel.js +50 -0
- package/lib/wasmhost/engineLabel.js.map +1 -0
- package/lib/wasmhost/engineLoad.d.ts +48 -0
- package/lib/wasmhost/engineLoad.js +53 -0
- package/lib/wasmhost/engineLoad.js.map +1 -0
- package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
- package/lib/wasmhost/enginePackageCheck.js +274 -0
- package/lib/wasmhost/enginePackageCheck.js.map +1 -0
- package/lib/wasmhost/enginePackageNames.d.ts +25 -0
- package/lib/wasmhost/enginePackageNames.js +28 -0
- package/lib/wasmhost/enginePackageNames.js.map +1 -0
- package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
- package/lib/wasmhost/enginePackageRecord.js +108 -0
- package/lib/wasmhost/enginePackageRecord.js.map +1 -0
- package/lib/wasmhost/engineRepair.d.ts +55 -0
- package/lib/wasmhost/engineRepair.js +183 -0
- package/lib/wasmhost/engineRepair.js.map +1 -0
- package/lib/wasmhost/frameView.d.ts +87 -0
- package/lib/wasmhost/frameView.js +133 -0
- package/lib/wasmhost/frameView.js.map +1 -0
- package/lib/wasmhost/hostFault.d.ts +40 -0
- package/lib/wasmhost/hostFault.js +94 -0
- package/lib/wasmhost/hostFault.js.map +1 -0
- package/lib/wasmhost/loadEngineModule.d.ts +79 -0
- package/lib/wasmhost/loadEngineModule.js +66 -0
- package/lib/wasmhost/loadEngineModule.js.map +1 -0
- package/lib/wasmhost/packageHash.d.ts +48 -0
- package/lib/wasmhost/packageHash.js +436 -0
- package/lib/wasmhost/packageHash.js.map +1 -0
- package/lib/wasmhost/rustEngine.d.ts +49 -0
- package/lib/wasmhost/rustEngine.js +63 -0
- package/lib/wasmhost/rustEngine.js.map +1 -0
- package/lib/wasmhost/slotPopulation.d.ts +19 -0
- package/lib/wasmhost/slotPopulation.js +69 -0
- package/lib/wasmhost/slotPopulation.js.map +1 -0
- package/lib/wasmhost/telemetry.d.ts +31 -0
- package/lib/wasmhost/telemetry.js +13 -0
- package/lib/wasmhost/telemetry.js.map +1 -0
- package/package.json +80 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { HeaderView } from "./view";
|
|
2
|
+
/**
|
|
3
|
+
* What a panel derives from the view's header instead of reading it off a
|
|
4
|
+
* `Simulation` (facade slice 4, #1211): the clock's day, hour and names. The
|
|
5
|
+
* engine reports the date numbers in the header (day, day of the week,
|
|
6
|
+
* weekend flag, quarter, year, the calendar's week lengths); the names come
|
|
7
|
+
* from `presentation/clockText.ts`. The mode's rules a panel shows come from
|
|
8
|
+
* the tower's catalog (`catalog.rules`).
|
|
9
|
+
*/
|
|
10
|
+
/** The fields of the header a clock reading needs. */
|
|
11
|
+
export type ClockHeader = Pick<HeaderView, "minutes" | "day" | "dayOfWeek" | "isWeekend" | "quarter" | "year" | "weekDays" | "weekendDays">;
|
|
12
|
+
/** The clock's readings a panel shows. */
|
|
13
|
+
export interface ClockView {
|
|
14
|
+
readonly minutes: number;
|
|
15
|
+
readonly minuteOfDay: number;
|
|
16
|
+
readonly hour: number;
|
|
17
|
+
readonly minute: number;
|
|
18
|
+
readonly day: number;
|
|
19
|
+
readonly dayOfWeek: number;
|
|
20
|
+
readonly isWeekend: boolean;
|
|
21
|
+
readonly quarter: number;
|
|
22
|
+
readonly year: number;
|
|
23
|
+
readonly dayName: string;
|
|
24
|
+
isMorning(): boolean;
|
|
25
|
+
isEvening(): boolean;
|
|
26
|
+
isNight(): boolean;
|
|
27
|
+
format(): string;
|
|
28
|
+
formatRetroDate(): string;
|
|
29
|
+
}
|
|
30
|
+
/** The clock at the header's minute, on the tower's calendar. */
|
|
31
|
+
export declare function clockOf(h: ClockHeader): ClockView;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { formatRetroDate, formatClock, dayName } from '../presentation/clockText.js';
|
|
2
|
+
import { ClockReads } from './clockView.js';
|
|
3
|
+
|
|
4
|
+
/** The clock at the header's minute, on the tower's calendar. */
|
|
5
|
+
function clockOf(h) {
|
|
6
|
+
const time = new ClockReads().set(h);
|
|
7
|
+
return {
|
|
8
|
+
minutes: h.minutes,
|
|
9
|
+
minuteOfDay: time.minuteOfDay,
|
|
10
|
+
hour: time.hour,
|
|
11
|
+
minute: time.minute,
|
|
12
|
+
day: h.day,
|
|
13
|
+
dayOfWeek: h.dayOfWeek,
|
|
14
|
+
isWeekend: h.isWeekend,
|
|
15
|
+
quarter: h.quarter,
|
|
16
|
+
year: h.year,
|
|
17
|
+
get dayName() {
|
|
18
|
+
return dayName(h);
|
|
19
|
+
},
|
|
20
|
+
isMorning: () => time.isMorning(),
|
|
21
|
+
isEvening: () => time.isEvening(),
|
|
22
|
+
isNight: () => time.isNight(),
|
|
23
|
+
format: () => formatClock(h, time.hour, time.minute),
|
|
24
|
+
formatRetroDate: () => formatRetroDate(h),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { clockOf };
|
|
29
|
+
//# sourceMappingURL=headerClock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headerClock.js","sources":["../../src/simport/headerClock.ts"],"sourcesContent":["import { dayName, formatClock, formatRetroDate } from \"../presentation/clockText\";\nimport { ClockReads } from \"./clockView\";\nimport type { HeaderView } from \"./view\";\n\n/**\n * What a panel derives from the view's header instead of reading it off a\n * `Simulation` (facade slice 4, #1211): the clock's day, hour and names. The\n * engine reports the date numbers in the header (day, day of the week,\n * weekend flag, quarter, year, the calendar's week lengths); the names come\n * from `presentation/clockText.ts`. The mode's rules a panel shows come from\n * the tower's catalog (`catalog.rules`).\n */\n\n/** The fields of the header a clock reading needs. */\nexport type ClockHeader = Pick<\n HeaderView,\n \"minutes\" | \"day\" | \"dayOfWeek\" | \"isWeekend\" | \"quarter\" | \"year\" | \"weekDays\" | \"weekendDays\"\n>;\n\n/** The clock's readings a panel shows. */\nexport interface ClockView {\n readonly minutes: number;\n readonly minuteOfDay: number;\n readonly hour: number;\n readonly minute: number;\n readonly day: number;\n readonly dayOfWeek: number;\n readonly isWeekend: boolean;\n readonly quarter: number;\n readonly year: number;\n readonly dayName: string;\n isMorning(): boolean;\n isEvening(): boolean;\n isNight(): boolean;\n format(): string;\n formatRetroDate(): string;\n}\n\n/** The clock at the header's minute, on the tower's calendar. */\nexport function clockOf(h: ClockHeader): ClockView {\n const time = new ClockReads().set(h);\n return {\n minutes: h.minutes,\n minuteOfDay: time.minuteOfDay,\n hour: time.hour,\n minute: time.minute,\n day: h.day,\n dayOfWeek: h.dayOfWeek,\n isWeekend: h.isWeekend,\n quarter: h.quarter,\n year: h.year,\n get dayName() {\n return dayName(h);\n },\n isMorning: () => time.isMorning(),\n isEvening: () => time.isEvening(),\n isNight: () => time.isNight(),\n format: () => formatClock(h, time.hour, time.minute),\n formatRetroDate: () => formatRetroDate(h),\n };\n}\n"],"names":[],"mappings":";;;AAsCA;AACM,SAAU,OAAO,CAAC,CAAc,EAAA;IACpC,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,OAAO;QACL,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,GAAG,EAAE,CAAC,CAAC,GAAG;QACV,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,IAAI,EAAE,CAAC,CAAC,IAAI;AACZ,QAAA,IAAI,OAAO,GAAA;AACT,YAAA,OAAO,OAAO,CAAC,CAAC,CAAC;QACnB,CAAC;AACD,QAAA,SAAS,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE;AACjC,QAAA,SAAS,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE;AACjC,QAAA,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE;AAC7B,QAAA,MAAM,EAAE,MAAM,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;AACpD,QAAA,eAAe,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;KAC1C;AACH;;"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import type { LedgerCat } from "../shared/engineTypes";
|
|
2
|
+
import type { HeatmapMode } from "../shared/engineTypes";
|
|
3
|
+
import type { StarGateId } from "../shared/engineTypes";
|
|
4
|
+
import type { FacilityKind, UnitState, VacateReason } from "../shared/types";
|
|
5
|
+
import type { FilmPolicy, FilmTier, TicketPrice } from "./commands";
|
|
6
|
+
/**
|
|
7
|
+
* What the panels ask the engine and what it answers (facade slice 4, #1211).
|
|
8
|
+
* Each answer is the JSON the Rust panel getter returns (slice 6b, #1214), so
|
|
9
|
+
* the Rust adapter parses the engine's text into these types and the
|
|
10
|
+
* TypeScript adapter (`src/tests/conformance/tsPanels.ts`, a test reference)
|
|
11
|
+
* builds the same objects from the TypeScript functions. Plain JSON throughout: a field the TypeScript leaves undefined is
|
|
12
|
+
* `null` here, since JSON has none, and a heat cell's `tint` is left out when
|
|
13
|
+
* it has none, as the getter leaves it out.
|
|
14
|
+
*/
|
|
15
|
+
/** The HUD strip's counters (`stats()`). */
|
|
16
|
+
export interface TowerStats {
|
|
17
|
+
readonly population: number;
|
|
18
|
+
readonly parkingSpaces: number;
|
|
19
|
+
readonly money: number;
|
|
20
|
+
readonly star: number;
|
|
21
|
+
readonly offices: number;
|
|
22
|
+
readonly occupiedOffices: number;
|
|
23
|
+
readonly condos: number;
|
|
24
|
+
readonly soldCondos: number;
|
|
25
|
+
readonly hotelRooms: number;
|
|
26
|
+
readonly occupiedHotel: number;
|
|
27
|
+
readonly dirty: number;
|
|
28
|
+
readonly shops: number;
|
|
29
|
+
readonly restaurants: number;
|
|
30
|
+
readonly vacant: number;
|
|
31
|
+
readonly vacantNoRate: number;
|
|
32
|
+
readonly floors: number;
|
|
33
|
+
readonly basements: number;
|
|
34
|
+
readonly elevators: number;
|
|
35
|
+
readonly transports: number;
|
|
36
|
+
readonly fires: number;
|
|
37
|
+
}
|
|
38
|
+
/** The housekeeping readout (`housekeepingCoverage()`). */
|
|
39
|
+
export interface HousekeepingCoverageView {
|
|
40
|
+
readonly rooms: number;
|
|
41
|
+
readonly crews: number;
|
|
42
|
+
readonly maids: number;
|
|
43
|
+
readonly dailyCapacity: number;
|
|
44
|
+
readonly outOfReach: number;
|
|
45
|
+
readonly dirty: number;
|
|
46
|
+
readonly infested: number;
|
|
47
|
+
}
|
|
48
|
+
/** One rung's progress: the population bar and the facility gates, by id. */
|
|
49
|
+
export interface NextStarView {
|
|
50
|
+
readonly star: number;
|
|
51
|
+
readonly isTower: boolean;
|
|
52
|
+
readonly popHave: number;
|
|
53
|
+
readonly popNeed: number;
|
|
54
|
+
readonly popMet: boolean;
|
|
55
|
+
readonly gates: ReadonlyArray<{
|
|
56
|
+
readonly id: StarGateId;
|
|
57
|
+
readonly met: boolean;
|
|
58
|
+
}>;
|
|
59
|
+
readonly allMet: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** One passenger shaft's average load, busiest first. */
|
|
62
|
+
export interface ElevatorStatsRow {
|
|
63
|
+
readonly id: number;
|
|
64
|
+
readonly kind: FacilityKind;
|
|
65
|
+
readonly bottom: number;
|
|
66
|
+
readonly top: number;
|
|
67
|
+
readonly cars: number;
|
|
68
|
+
readonly capacity: number;
|
|
69
|
+
readonly utilization: number;
|
|
70
|
+
}
|
|
71
|
+
/** Everything the stats screen shows, in one answer. */
|
|
72
|
+
export interface StatsReport {
|
|
73
|
+
readonly stats: TowerStats;
|
|
74
|
+
readonly ratingPopulation: number;
|
|
75
|
+
readonly hotelsCountTowardRating: boolean;
|
|
76
|
+
/** How many parking spaces a car can actually reach. */
|
|
77
|
+
readonly functionalParking: number;
|
|
78
|
+
/** `short` is the engine's answer by the mode's rule (a suite without its
|
|
79
|
+
* space, or offices short), so the row is red only when tenants feel it:
|
|
80
|
+
* in Classic one free space serves every office however many cars come. */
|
|
81
|
+
readonly parkingDemand: {
|
|
82
|
+
readonly officePop: number;
|
|
83
|
+
readonly offices: number;
|
|
84
|
+
readonly suites: number;
|
|
85
|
+
readonly homes: number;
|
|
86
|
+
readonly total: number;
|
|
87
|
+
readonly coverage: number | null;
|
|
88
|
+
readonly short: boolean;
|
|
89
|
+
};
|
|
90
|
+
readonly housekeeping: HousekeepingCoverageView;
|
|
91
|
+
/** Yesterday's shift, or null before the first one. */
|
|
92
|
+
readonly housekeepingReport: {
|
|
93
|
+
readonly cleaned: number;
|
|
94
|
+
readonly leftover: number;
|
|
95
|
+
} | null;
|
|
96
|
+
readonly recycling: {
|
|
97
|
+
readonly capacity: number;
|
|
98
|
+
readonly demandMet: boolean;
|
|
99
|
+
};
|
|
100
|
+
readonly strandedFloors: ReadonlyArray<number>;
|
|
101
|
+
readonly nextStarThreshold: number | null;
|
|
102
|
+
/** Null once the tower is a TOWER. */
|
|
103
|
+
readonly nextStar: NextStarView | null;
|
|
104
|
+
/** Every milestone in the catalog's order, by id. */
|
|
105
|
+
readonly milestones: {
|
|
106
|
+
readonly achieved: number;
|
|
107
|
+
readonly total: number;
|
|
108
|
+
readonly list: ReadonlyArray<{
|
|
109
|
+
readonly id: string;
|
|
110
|
+
readonly done: boolean;
|
|
111
|
+
}>;
|
|
112
|
+
};
|
|
113
|
+
readonly income: {
|
|
114
|
+
readonly averages: Readonly<Record<LedgerCat, number>>;
|
|
115
|
+
readonly hasData: boolean;
|
|
116
|
+
};
|
|
117
|
+
readonly elevators: ReadonlyArray<ElevatorStatsRow>;
|
|
118
|
+
readonly vipVisits: number;
|
|
119
|
+
readonly vipFavorable: boolean;
|
|
120
|
+
/** The day a booked exterminator arrives, or null when none is booked. */
|
|
121
|
+
readonly exterminationDueDay: number | null;
|
|
122
|
+
/** Homes in residence (condos and rental apartments), their people, and
|
|
123
|
+
* how many homes hold each household size, smallest first. */
|
|
124
|
+
readonly households: {
|
|
125
|
+
readonly households: number;
|
|
126
|
+
readonly residents: number;
|
|
127
|
+
readonly mix: ReadonlyArray<readonly [size: number, count: number]>;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** The unit inspector and editor card: the unit's own fields plus what the
|
|
131
|
+
* engine derives for it. */
|
|
132
|
+
export interface UnitDetail {
|
|
133
|
+
readonly id: number;
|
|
134
|
+
readonly kind: FacilityKind;
|
|
135
|
+
readonly floor: number;
|
|
136
|
+
readonly x: number;
|
|
137
|
+
readonly width: number;
|
|
138
|
+
readonly state: UnitState;
|
|
139
|
+
readonly satisfaction: number;
|
|
140
|
+
readonly occupants: number;
|
|
141
|
+
readonly customersIn: number | null;
|
|
142
|
+
readonly residents: number | null;
|
|
143
|
+
readonly everOccupied: boolean;
|
|
144
|
+
readonly noRate: boolean;
|
|
145
|
+
readonly rent: number | null;
|
|
146
|
+
/** The price the card shows (`unitPrice`): 0 off the market, the set price,
|
|
147
|
+
* or the catalog default. */
|
|
148
|
+
readonly price: number;
|
|
149
|
+
readonly label: string;
|
|
150
|
+
readonly subtype: string | null;
|
|
151
|
+
readonly vacateReason: VacateReason | null;
|
|
152
|
+
readonly filmPolicy: FilmPolicy | null;
|
|
153
|
+
/** The floor has a lobby connection (`isFloorServed`). */
|
|
154
|
+
readonly served: boolean;
|
|
155
|
+
/** A commuter completes the trip to the floor (`floorReachable`). */
|
|
156
|
+
readonly reachable: boolean;
|
|
157
|
+
readonly floorHasLobby: boolean;
|
|
158
|
+
/** Whether a cinema is booked for the blockbuster; null off a cinema. */
|
|
159
|
+
readonly blockbuster: boolean | null;
|
|
160
|
+
/** The mornings a theatre's film has shown; null off a cinema (#1932). */
|
|
161
|
+
readonly filmDays: number | null;
|
|
162
|
+
/** The film a theater shows; null off a cinema (#1950). */
|
|
163
|
+
readonly filmTier: FilmTier | null;
|
|
164
|
+
/** A Modern theater's ticket price step; null off a cinema and in Classic
|
|
165
|
+
* (#1950). */
|
|
166
|
+
readonly ticketPrice: TicketPrice | null;
|
|
167
|
+
/** A Modern theater's second screen; null off a cinema and where the
|
|
168
|
+
* theater runs one screen (Classic, #1950). */
|
|
169
|
+
readonly screen2: ScreenDetail | null;
|
|
170
|
+
/** The workers on their way to an office, booked or walking; null off an
|
|
171
|
+
* office. */
|
|
172
|
+
readonly workersComing: number | null;
|
|
173
|
+
}
|
|
174
|
+
/** A theater screen's film, its age in mornings and its Auto-rebook choice
|
|
175
|
+
* (#1950). */
|
|
176
|
+
export interface ScreenDetail {
|
|
177
|
+
readonly filmPolicy: FilmPolicy | null;
|
|
178
|
+
readonly filmDays: number;
|
|
179
|
+
readonly filmTier: FilmTier;
|
|
180
|
+
}
|
|
181
|
+
/** One floor of an elevator's stop list, top floor first. */
|
|
182
|
+
export interface StopRow {
|
|
183
|
+
readonly floor: number;
|
|
184
|
+
readonly served: boolean;
|
|
185
|
+
readonly lobby: boolean;
|
|
186
|
+
readonly endpoint: boolean;
|
|
187
|
+
/** Whether the player can turn this floor's stop on or off: the engine's
|
|
188
|
+
* rule for the shaft (a Classic express toggles the ground floor, every
|
|
189
|
+
* 15th floor and every basement; other shafts keep both ends). */
|
|
190
|
+
readonly toggles: boolean;
|
|
191
|
+
}
|
|
192
|
+
/** An hour-by-hour figure for weekdays and weekends. */
|
|
193
|
+
export interface HourlyView {
|
|
194
|
+
readonly weekday: ReadonlyArray<number>;
|
|
195
|
+
readonly weekend: ReadonlyArray<number>;
|
|
196
|
+
}
|
|
197
|
+
/** Where riders boarded, per hour: `[floor, riders]` pairs in each slot. */
|
|
198
|
+
export interface OriginsView {
|
|
199
|
+
readonly weekday: ReadonlyArray<ReadonlyArray<readonly [floor: number, riders: number]>>;
|
|
200
|
+
readonly weekend: ReadonlyArray<ReadonlyArray<readonly [floor: number, riders: number]>>;
|
|
201
|
+
}
|
|
202
|
+
/** The transport inspector and editor card. */
|
|
203
|
+
export interface TransportDetail {
|
|
204
|
+
readonly id: number;
|
|
205
|
+
readonly kind: FacilityKind;
|
|
206
|
+
readonly x: number;
|
|
207
|
+
readonly width: number;
|
|
208
|
+
readonly bottom: number;
|
|
209
|
+
readonly top: number;
|
|
210
|
+
readonly cars: number;
|
|
211
|
+
/** Riders per trip (`transportCapacity`). */
|
|
212
|
+
readonly capacity: number;
|
|
213
|
+
/** Average car load, or null for a shaft with none recorded. */
|
|
214
|
+
readonly utilization: number | null;
|
|
215
|
+
/** The engine's verdict that the average load is near capacity. */
|
|
216
|
+
readonly nearCapacity: boolean;
|
|
217
|
+
readonly hourly: HourlyView | null;
|
|
218
|
+
readonly origins: OriginsView | null;
|
|
219
|
+
/** Elevators only; empty for stairs and escalators. */
|
|
220
|
+
readonly stops: ReadonlyArray<StopRow>;
|
|
221
|
+
}
|
|
222
|
+
/** One run of floor tiles an overlay paints, with its severity. */
|
|
223
|
+
export interface HeatCellView {
|
|
224
|
+
readonly floor: number;
|
|
225
|
+
readonly minX: number;
|
|
226
|
+
readonly maxX: number;
|
|
227
|
+
readonly severity: number;
|
|
228
|
+
readonly tint?: "infested" | "na";
|
|
229
|
+
}
|
|
230
|
+
/** The busiest populated, served floor and its congestion ratio. */
|
|
231
|
+
export interface CongestionHotspot {
|
|
232
|
+
readonly ratio: number;
|
|
233
|
+
readonly floor: number | null;
|
|
234
|
+
}
|
|
235
|
+
/** The five Getting Started steps, each true once the player has done it. */
|
|
236
|
+
export interface OnboardingFacts {
|
|
237
|
+
readonly lobby: boolean;
|
|
238
|
+
readonly floor: boolean;
|
|
239
|
+
readonly office: boolean;
|
|
240
|
+
readonly connect: boolean;
|
|
241
|
+
readonly play: boolean;
|
|
242
|
+
}
|
|
243
|
+
export type { HeatmapMode, StarGateId };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panels.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { FacilityKind } from "../shared/types";
|
|
2
|
+
import type { EnginePort } from "./enginePort";
|
|
3
|
+
/**
|
|
4
|
+
* The person card (#2092), decoded from the port's `personCard` record. The
|
|
5
|
+
* slots and code tables come from the port's own `viewLayout()`, so the game
|
|
6
|
+
* imports no engine at runtime. The card is cheap: read it while the card is
|
|
7
|
+
* open, on the UI tick, never per frame.
|
|
8
|
+
*/
|
|
9
|
+
/** Why a person is out, as the engine names it (`personPurposes`). */
|
|
10
|
+
export type PersonPurpose = "toWork" | "fromWork" | "leaveHome" | "returnHome" | "toVenue" | "fromVenue" | "meal" | "visit" | "schoolRun" | "salesCall" | "housekeeping" | "unknown";
|
|
11
|
+
/** A housekeeper's step in their working day (`shiftSteps`). */
|
|
12
|
+
export type ShiftStep = "in" | "base" | "job" | "free" | "home" | "out";
|
|
13
|
+
/** One end of a leg (`tripPlaces`). A room carries its id and kind. */
|
|
14
|
+
export type TripPlace = {
|
|
15
|
+
place: "none";
|
|
16
|
+
} | {
|
|
17
|
+
place: "room";
|
|
18
|
+
id: number;
|
|
19
|
+
kind: FacilityKind;
|
|
20
|
+
floor: number;
|
|
21
|
+
} | {
|
|
22
|
+
place: "floor" | "lobby" | "metro";
|
|
23
|
+
floor: number;
|
|
24
|
+
};
|
|
25
|
+
export interface PersonDetail {
|
|
26
|
+
id: number;
|
|
27
|
+
state: string;
|
|
28
|
+
floor: number;
|
|
29
|
+
x: number;
|
|
30
|
+
staff: boolean;
|
|
31
|
+
purpose: PersonPurpose;
|
|
32
|
+
/** On the way back from a meal or a visit. */
|
|
33
|
+
returning: boolean;
|
|
34
|
+
/** A housekeeper's step; null for anyone else. */
|
|
35
|
+
shift: ShiftStep | null;
|
|
36
|
+
/** For a housekeeper, the housekeeping room they work from. */
|
|
37
|
+
from: TripPlace;
|
|
38
|
+
to: TripPlace;
|
|
39
|
+
/** The current wait in the crowd's own seconds, the unit of the
|
|
40
|
+
* catalog's `fedUpWait` (the mood). */
|
|
41
|
+
wait: number;
|
|
42
|
+
waitMinutes: number;
|
|
43
|
+
/** Every wait of this trip so far, the current one included. */
|
|
44
|
+
tripWaitMinutes: number;
|
|
45
|
+
/** The shaft taken next, waited at or ridden; null when the trip takes none. */
|
|
46
|
+
shaftId: number | null;
|
|
47
|
+
/** Gave up waiting to set out and is going back the way they came
|
|
48
|
+
* (#2188): `from` is the floor they stand on, `to` where the trip began,
|
|
49
|
+
* and `purpose` still says what the trip was for. */
|
|
50
|
+
gaveUp: boolean;
|
|
51
|
+
}
|
|
52
|
+
export type PersonCardPort = Pick<EnginePort, "viewLayout" | "personCard">;
|
|
53
|
+
export declare class PersonCards {
|
|
54
|
+
private readonly port;
|
|
55
|
+
/** The layout and the card's slots, read once on the first card: a game
|
|
56
|
+
* that never opens one never parses it. */
|
|
57
|
+
private names;
|
|
58
|
+
constructor(port: PersonCardPort);
|
|
59
|
+
private slots;
|
|
60
|
+
/** Person `id`'s card, or undefined when nobody by that id is in the tower. */
|
|
61
|
+
person(id: number): PersonDetail | undefined;
|
|
62
|
+
private end;
|
|
63
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
class PersonCards {
|
|
2
|
+
constructor(port) {
|
|
3
|
+
this.port = port;
|
|
4
|
+
/** The layout and the card's slots, read once on the first card: a game
|
|
5
|
+
* that never opens one never parses it. */
|
|
6
|
+
this.names = null;
|
|
7
|
+
}
|
|
8
|
+
slots() {
|
|
9
|
+
if (!this.names) {
|
|
10
|
+
const layout = JSON.parse(this.port.viewLayout());
|
|
11
|
+
this.names = { layout, at: Object.fromEntries(layout.records.personCard.map((n, i) => [n, i])) };
|
|
12
|
+
}
|
|
13
|
+
return this.names;
|
|
14
|
+
}
|
|
15
|
+
/** Person `id`'s card, or undefined when nobody by that id is in the tower. */
|
|
16
|
+
person(id) {
|
|
17
|
+
const r = this.port.personCard(id);
|
|
18
|
+
if (r.length === 0)
|
|
19
|
+
return undefined;
|
|
20
|
+
const { layout: l, at } = this.slots();
|
|
21
|
+
const shift = r[at.shiftStep];
|
|
22
|
+
const shaft = r[at.shaftId];
|
|
23
|
+
return {
|
|
24
|
+
id: r[at.id],
|
|
25
|
+
state: l.personStates[r[at.stateCode]],
|
|
26
|
+
floor: r[at.floor],
|
|
27
|
+
x: r[at.x],
|
|
28
|
+
staff: r[at.staff] === 1,
|
|
29
|
+
purpose: l.personPurposes[r[at.purpose]],
|
|
30
|
+
returning: r[at.returning] === 1,
|
|
31
|
+
shift: Number.isNaN(shift) ? null : l.shiftSteps[shift],
|
|
32
|
+
from: this.end(r, "from"),
|
|
33
|
+
to: this.end(r, "to"),
|
|
34
|
+
wait: r[at.wait],
|
|
35
|
+
waitMinutes: r[at.waitMinutes],
|
|
36
|
+
tripWaitMinutes: r[at.tripWaitMinutes],
|
|
37
|
+
shaftId: Number.isNaN(shaft) ? null : shaft,
|
|
38
|
+
gaveUp: r[at.gaveUp] === 1,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
end(r, side) {
|
|
42
|
+
const { layout, at } = this.slots();
|
|
43
|
+
const place = layout.tripPlaces[r[at[`${side}Place`]]];
|
|
44
|
+
const floor = r[at[`${side}Floor`]];
|
|
45
|
+
if (place === "room") {
|
|
46
|
+
return { place, id: r[at[`${side}Unit`]], kind: layout.kinds[r[at[`${side}Kind`]]], floor };
|
|
47
|
+
}
|
|
48
|
+
if (place === "floor" || place === "lobby" || place === "metro")
|
|
49
|
+
return { place, floor };
|
|
50
|
+
return { place: "none" };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { PersonCards };
|
|
55
|
+
//# sourceMappingURL=personCards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personCards.js","sources":["../../src/simport/personCards.ts"],"sourcesContent":["import type { FacilityKind } from \"../shared/types\";\nimport type { EnginePort } from \"./enginePort\";\n\n/**\n * The person card (#2092), decoded from the port's `personCard` record. The\n * slots and code tables come from the port's own `viewLayout()`, so the game\n * imports no engine at runtime. The card is cheap: read it while the card is\n * open, on the UI tick, never per frame.\n */\n\n/** Why a person is out, as the engine names it (`personPurposes`). */\nexport type PersonPurpose =\n | \"toWork\"\n | \"fromWork\"\n | \"leaveHome\"\n | \"returnHome\"\n | \"toVenue\"\n | \"fromVenue\"\n | \"meal\"\n | \"visit\"\n | \"schoolRun\"\n | \"salesCall\"\n | \"housekeeping\"\n | \"unknown\";\n\n/** A housekeeper's step in their working day (`shiftSteps`). */\nexport type ShiftStep = \"in\" | \"base\" | \"job\" | \"free\" | \"home\" | \"out\";\n\n/** One end of a leg (`tripPlaces`). A room carries its id and kind. */\nexport type TripPlace =\n | { place: \"none\" }\n | { place: \"room\"; id: number; kind: FacilityKind; floor: number }\n | { place: \"floor\" | \"lobby\" | \"metro\"; floor: number };\n\nexport interface PersonDetail {\n id: number;\n state: string;\n floor: number;\n x: number;\n staff: boolean;\n purpose: PersonPurpose;\n /** On the way back from a meal or a visit. */\n returning: boolean;\n /** A housekeeper's step; null for anyone else. */\n shift: ShiftStep | null;\n /** For a housekeeper, the housekeeping room they work from. */\n from: TripPlace;\n to: TripPlace;\n /** The current wait in the crowd's own seconds, the unit of the\n * catalog's `fedUpWait` (the mood). */\n wait: number;\n waitMinutes: number;\n /** Every wait of this trip so far, the current one included. */\n tripWaitMinutes: number;\n /** The shaft taken next, waited at or ridden; null when the trip takes none. */\n shaftId: number | null;\n /** Gave up waiting to set out and is going back the way they came\n * (#2188): `from` is the floor they stand on, `to` where the trip began,\n * and `purpose` still says what the trip was for. */\n gaveUp: boolean;\n}\n\ninterface Layout {\n kinds: readonly string[];\n personStates: readonly string[];\n personPurposes: readonly string[];\n tripPlaces: readonly string[];\n shiftSteps: readonly string[];\n records: { personCard: readonly string[] };\n}\n\nexport type PersonCardPort = Pick<EnginePort, \"viewLayout\" | \"personCard\">;\n\nexport class PersonCards {\n /** The layout and the card's slots, read once on the first card: a game\n * that never opens one never parses it. */\n private names: { layout: Layout; at: Record<string, number> } | null = null;\n\n constructor(private readonly port: PersonCardPort) {}\n\n private slots(): { layout: Layout; at: Record<string, number> } {\n if (!this.names) {\n const layout = JSON.parse(this.port.viewLayout()) as Layout;\n this.names = { layout, at: Object.fromEntries(layout.records.personCard.map((n, i) => [n, i])) };\n }\n return this.names;\n }\n\n /** Person `id`'s card, or undefined when nobody by that id is in the tower. */\n person(id: number): PersonDetail | undefined {\n const r = this.port.personCard(id);\n if (r.length === 0) return undefined;\n const { layout: l, at } = this.slots();\n const shift = r[at.shiftStep];\n const shaft = r[at.shaftId];\n return {\n id: r[at.id],\n state: l.personStates[r[at.stateCode]],\n floor: r[at.floor],\n x: r[at.x],\n staff: r[at.staff] === 1,\n purpose: l.personPurposes[r[at.purpose]] as PersonPurpose,\n returning: r[at.returning] === 1,\n shift: Number.isNaN(shift) ? null : (l.shiftSteps[shift] as ShiftStep),\n from: this.end(r, \"from\"),\n to: this.end(r, \"to\"),\n wait: r[at.wait],\n waitMinutes: r[at.waitMinutes],\n tripWaitMinutes: r[at.tripWaitMinutes],\n shaftId: Number.isNaN(shaft) ? null : shaft,\n gaveUp: r[at.gaveUp] === 1,\n };\n }\n\n private end(r: Float64Array, side: \"from\" | \"to\"): TripPlace {\n const { layout, at } = this.slots();\n const place = layout.tripPlaces[r[at[`${side}Place`]]];\n const floor = r[at[`${side}Floor`]];\n if (place === \"room\") {\n return { place, id: r[at[`${side}Unit`]], kind: layout.kinds[r[at[`${side}Kind`]]] as FacilityKind, floor };\n }\n if (place === \"floor\" || place === \"lobby\" || place === \"metro\") return { place, floor };\n return { place: \"none\" };\n }\n}\n"],"names":[],"mappings":"MAyEa,WAAW,CAAA;AAKtB,IAAA,WAAA,CAA6B,IAAoB,EAAA;QAApB,IAAA,CAAA,IAAI,GAAJ,IAAI;AAJjC;AAC4C;QACpC,IAAA,CAAA,KAAK,GAA0D,IAAI;IAEvB;IAE5C,KAAK,GAAA;AACX,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACf,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAW;AAC3D,YAAA,IAAI,CAAC,KAAK,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QAClG;QACA,OAAO,IAAI,CAAC,KAAK;IACnB;;AAGA,IAAA,MAAM,CAAC,EAAU,EAAA;QACf,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;AAClC,QAAA,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;AAAE,YAAA,OAAO,SAAS;AACpC,QAAA,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE;QACtC,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC;QAC7B,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC;QAC3B,OAAO;AACL,YAAA,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;YACZ,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;AACtC,YAAA,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;AAClB,YAAA,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACV,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACxB,OAAO,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAkB;YACzD,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;AAChC,YAAA,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,GAAI,CAAC,CAAC,UAAU,CAAC,KAAK,CAAe;YACtE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC;YACzB,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC;AACrB,YAAA,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;AAChB,YAAA,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC;AAC9B,YAAA,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC;AACtC,YAAA,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,KAAK;YAC3C,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;SAC3B;IACH;IAEQ,GAAG,CAAC,CAAe,EAAE,IAAmB,EAAA;QAC9C,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE;AACnC,QAAA,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA,KAAA,CAAO,CAAC,CAAC,CAAC;QACtD,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAA,EAAG,IAAI,CAAA,KAAA,CAAO,CAAC,CAAC;AACnC,QAAA,IAAI,KAAK,KAAK,MAAM,EAAE;AACpB,YAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA,IAAA,CAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA,EAAG,IAAI,CAAA,IAAA,CAAM,CAAC,CAAC,CAAiB,EAAE,KAAK,EAAE;QAC7G;QACA,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,OAAO;AAAE,YAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE;AACxF,QAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;IAC1B;AACD;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { FacilityKind } from "../shared/types";
|
|
2
|
+
import type { EnginePort, PortRecord } from "./enginePort";
|
|
3
|
+
/** The code tables a caller passes names through, as `viewLayout()` names
|
|
4
|
+
* them. */
|
|
5
|
+
export type CodeTable = "kinds" | "modes" | "calendars" | "filmPolicies" | "filmTiers" | "ticketPrices" | "logKinds" | "heatModes";
|
|
6
|
+
/** What a command's record says, in the shape the game's callers check. */
|
|
7
|
+
export interface PortOutcome {
|
|
8
|
+
readonly ok: boolean;
|
|
9
|
+
/** The refusal text, from `lastReason()`; only on a refusal. */
|
|
10
|
+
readonly reason?: string;
|
|
11
|
+
/** The money delta the engine measured around the command. */
|
|
12
|
+
readonly delta: number;
|
|
13
|
+
}
|
|
14
|
+
/** The name lists a decoder reads a record's codes and sections by. */
|
|
15
|
+
export type NameTable = "kinds" | "ledgerCats" | "milestones" | "starGates";
|
|
16
|
+
/**
|
|
17
|
+
* The layout tables the game's callers need to speak to an `EnginePort`
|
|
18
|
+
* (contract sections 1 and 4), read once from the port's own `viewLayout()`
|
|
19
|
+
* so the game imports no engine at runtime. Build one per app; the layout
|
|
20
|
+
* does not change across a swap.
|
|
21
|
+
*/
|
|
22
|
+
export declare class PortCodes {
|
|
23
|
+
private readonly maps;
|
|
24
|
+
private readonly records;
|
|
25
|
+
private readonly lists;
|
|
26
|
+
constructor(port: Pick<EnginePort, "viewLayout">);
|
|
27
|
+
/** The names of `table`, in code order. */
|
|
28
|
+
names(table: NameTable): readonly string[];
|
|
29
|
+
/** The slot names of `op`'s record, in slot order (empty for an op the
|
|
30
|
+
* layout lacks). */
|
|
31
|
+
fields(op: string): readonly string[];
|
|
32
|
+
/** The code for `name` in `table`, or NaN for a name the table lacks (the
|
|
33
|
+
* port refuses a NaN code as an invalid request). */
|
|
34
|
+
code(table: CodeTable, name: string): number;
|
|
35
|
+
kind(kind: FacilityKind): number;
|
|
36
|
+
/** Slot `name` of `op`'s record, or NaN when the record has no such slot. */
|
|
37
|
+
slot(rec: PortRecord, op: string, name: string): number;
|
|
38
|
+
}
|
|
39
|
+
/** Read a command's record. Call it right after the command, before the next
|
|
40
|
+
* status-producing member replaces `lastReason()`. */
|
|
41
|
+
export declare function outcome(port: Pick<EnginePort, "lastReason">, rec: PortRecord): PortOutcome;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The layout tables the game's callers need to speak to an `EnginePort`
|
|
3
|
+
* (contract sections 1 and 4), read once from the port's own `viewLayout()`
|
|
4
|
+
* so the game imports no engine at runtime. Build one per app; the layout
|
|
5
|
+
* does not change across a swap.
|
|
6
|
+
*/
|
|
7
|
+
class PortCodes {
|
|
8
|
+
constructor(port) {
|
|
9
|
+
this.maps = new Map();
|
|
10
|
+
const l = JSON.parse(port.viewLayout());
|
|
11
|
+
for (const t of ["kinds", "modes", "calendars", "filmPolicies", "filmTiers", "ticketPrices", "logKinds", "heatModes"]) {
|
|
12
|
+
this.maps.set(t, new Map(l[t].map((n, i) => [n, i])));
|
|
13
|
+
}
|
|
14
|
+
this.records = l.records;
|
|
15
|
+
this.lists = { kinds: l.kinds, ledgerCats: l.ledgerCats, milestones: l.milestones, starGates: l.starGates };
|
|
16
|
+
}
|
|
17
|
+
/** The names of `table`, in code order. */
|
|
18
|
+
names(table) {
|
|
19
|
+
return this.lists[table];
|
|
20
|
+
}
|
|
21
|
+
/** The slot names of `op`'s record, in slot order (empty for an op the
|
|
22
|
+
* layout lacks). */
|
|
23
|
+
fields(op) {
|
|
24
|
+
return this.records[op] ?? [];
|
|
25
|
+
}
|
|
26
|
+
/** The code for `name` in `table`, or NaN for a name the table lacks (the
|
|
27
|
+
* port refuses a NaN code as an invalid request). */
|
|
28
|
+
code(table, name) {
|
|
29
|
+
return this.maps.get(table).get(name) ?? NaN;
|
|
30
|
+
}
|
|
31
|
+
kind(kind) {
|
|
32
|
+
return this.code("kinds", kind);
|
|
33
|
+
}
|
|
34
|
+
/** Slot `name` of `op`'s record, or NaN when the record has no such slot. */
|
|
35
|
+
slot(rec, op, name) {
|
|
36
|
+
const at = this.records[op]?.indexOf(name) ?? -1;
|
|
37
|
+
return at < 0 ? NaN : rec[at];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Read a command's record. Call it right after the command, before the next
|
|
41
|
+
* status-producing member replaces `lastReason()`. */
|
|
42
|
+
function outcome(port, rec) {
|
|
43
|
+
if (rec[0] === 1)
|
|
44
|
+
return { ok: true, delta: rec[1] };
|
|
45
|
+
return { ok: false, reason: port.lastReason(), delta: rec[1] };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { PortCodes, outcome };
|
|
49
|
+
//# sourceMappingURL=portCodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portCodes.js","sources":["../../src/simport/portCodes.ts"],"sourcesContent":["import type { FacilityKind } from \"../shared/types\";\nimport type { EnginePort, PortRecord } from \"./enginePort\";\n\n/** The code tables a caller passes names through, as `viewLayout()` names\n * them. */\nexport type CodeTable = \"kinds\" | \"modes\" | \"calendars\" | \"filmPolicies\" | \"filmTiers\" | \"ticketPrices\" | \"logKinds\" | \"heatModes\";\n\n/** What a command's record says, in the shape the game's callers check. */\nexport interface PortOutcome {\n readonly ok: boolean;\n /** The refusal text, from `lastReason()`; only on a refusal. */\n readonly reason?: string;\n /** The money delta the engine measured around the command. */\n readonly delta: number;\n}\n\n/** The name lists a decoder reads a record's codes and sections by. */\nexport type NameTable = \"kinds\" | \"ledgerCats\" | \"milestones\" | \"starGates\";\n\ninterface Tables extends Record<CodeTable | NameTable, readonly string[]> {\n records: Record<string, readonly string[]>;\n}\n\n/**\n * The layout tables the game's callers need to speak to an `EnginePort`\n * (contract sections 1 and 4), read once from the port's own `viewLayout()`\n * so the game imports no engine at runtime. Build one per app; the layout\n * does not change across a swap.\n */\nexport class PortCodes {\n private readonly maps = new Map<CodeTable, ReadonlyMap<string, number>>();\n private readonly records: Record<string, readonly string[]>;\n private readonly lists: Record<NameTable, readonly string[]>;\n\n constructor(port: Pick<EnginePort, \"viewLayout\">) {\n const l = JSON.parse(port.viewLayout()) as Tables;\n for (const t of [\"kinds\", \"modes\", \"calendars\", \"filmPolicies\", \"filmTiers\", \"ticketPrices\", \"logKinds\", \"heatModes\"] as const) {\n this.maps.set(t, new Map(l[t].map((n, i) => [n, i])));\n }\n this.records = l.records;\n this.lists = { kinds: l.kinds, ledgerCats: l.ledgerCats, milestones: l.milestones, starGates: l.starGates };\n }\n\n /** The names of `table`, in code order. */\n names(table: NameTable): readonly string[] {\n return this.lists[table];\n }\n\n /** The slot names of `op`'s record, in slot order (empty for an op the\n * layout lacks). */\n fields(op: string): readonly string[] {\n return this.records[op] ?? [];\n }\n\n /** The code for `name` in `table`, or NaN for a name the table lacks (the\n * port refuses a NaN code as an invalid request). */\n code(table: CodeTable, name: string): number {\n return this.maps.get(table)!.get(name) ?? NaN;\n }\n\n kind(kind: FacilityKind): number {\n return this.code(\"kinds\", kind);\n }\n\n /** Slot `name` of `op`'s record, or NaN when the record has no such slot. */\n slot(rec: PortRecord, op: string, name: string): number {\n const at = this.records[op]?.indexOf(name) ?? -1;\n return at < 0 ? NaN : rec[at];\n }\n}\n\n/** Read a command's record. Call it right after the command, before the next\n * status-producing member replaces `lastReason()`. */\nexport function outcome(port: Pick<EnginePort, \"lastReason\">, rec: PortRecord): PortOutcome {\n if (rec[0] === 1) return { ok: true, delta: rec[1] };\n return { ok: false, reason: port.lastReason(), delta: rec[1] };\n}\n"],"names":[],"mappings":"AAuBA;;;;;AAKG;MACU,SAAS,CAAA;AAKpB,IAAA,WAAA,CAAY,IAAoC,EAAA;AAJ/B,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,GAAG,EAA0C;QAKvE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,CAAW;QACjD,KAAK,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,CAAU,EAAE;AAC9H,YAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvD;AACA,QAAA,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO;AACxB,QAAA,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE;IAC7G;;AAGA,IAAA,KAAK,CAAC,KAAgB,EAAA;AACpB,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC1B;AAEA;AACqB;AACrB,IAAA,MAAM,CAAC,EAAU,EAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE;IAC/B;AAEA;AACsD;IACtD,IAAI,CAAC,KAAgB,EAAE,IAAY,EAAA;AACjC,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG;IAC/C;AAEA,IAAA,IAAI,CAAC,IAAkB,EAAA;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;IACjC;;AAGA,IAAA,IAAI,CAAC,GAAe,EAAE,EAAU,EAAE,IAAY,EAAA;AAC5C,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,QAAA,OAAO,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC;IAC/B;AACD;AAED;AACuD;AACjD,SAAU,OAAO,CAAC,IAAoC,EAAE,GAAe,EAAA;AAC3E,IAAA,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE;AACpD,IAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE;AAChE;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { GameplayEvent } from "../events/gameplayEvents";
|
|
2
|
+
import type { EnginePort } from "./enginePort";
|
|
3
|
+
/** What the analytics bridge drains: the live `Simulation` (whose drain
|
|
4
|
+
* the WASM host overrides to answer with its engine's batch). `release` is the session's
|
|
5
|
+
* own flush (a hide, or a window closing): a host that holds a command's
|
|
6
|
+
* events back until its engine's state covers them (the WASM host, #874)
|
|
7
|
+
* lets them go then, so a page that closes keeps them. `release` is
|
|
8
|
+
* temporary, with that fallback (story-engine-retire-typescript.md). */
|
|
9
|
+
export interface GameplayEventSource {
|
|
10
|
+
drainGameplayEvents(opts?: {
|
|
11
|
+
release?: boolean;
|
|
12
|
+
}): GameplayEvent[];
|
|
13
|
+
readonly gameplayEventsDropped: number;
|
|
14
|
+
readonly gameplayEvents: {
|
|
15
|
+
readonly discardOnHandOff: boolean;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The engine's gameplay events through the port (`drainEvents`, `eventText`),
|
|
20
|
+
* in the shape the analytics bridge drains (`GameplayEventSource`). Drained
|
|
21
|
+
* once per frame and once more when the session flushes.
|
|
22
|
+
*
|
|
23
|
+
* The title backdrop is marked here (`setBackdrop`), so the bridge can drop
|
|
24
|
+
* its events while it is up. The engine forgets the mark on any swap, and so
|
|
25
|
+
* does this source: the mark holds for the generation it was set in.
|
|
26
|
+
*/
|
|
27
|
+
export declare class PortEvents implements GameplayEventSource {
|
|
28
|
+
private readonly port;
|
|
29
|
+
private dropped;
|
|
30
|
+
private backdropGeneration;
|
|
31
|
+
/** Read by the bridge on every drain, so it is one object. */
|
|
32
|
+
readonly gameplayEvents: {
|
|
33
|
+
readonly discardOnHandOff: boolean;
|
|
34
|
+
};
|
|
35
|
+
constructor(port: Pick<EnginePort, "drainEvents" | "eventText" | "setBackdrop" | "generation">);
|
|
36
|
+
setBackdrop(on: boolean): void;
|
|
37
|
+
drainGameplayEvents(): GameplayEvent[];
|
|
38
|
+
get gameplayEventsDropped(): number;
|
|
39
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine's gameplay events through the port (`drainEvents`, `eventText`),
|
|
3
|
+
* in the shape the analytics bridge drains (`GameplayEventSource`). Drained
|
|
4
|
+
* once per frame and once more when the session flushes.
|
|
5
|
+
*
|
|
6
|
+
* The title backdrop is marked here (`setBackdrop`), so the bridge can drop
|
|
7
|
+
* its events while it is up. The engine forgets the mark on any swap, and so
|
|
8
|
+
* does this source: the mark holds for the generation it was set in.
|
|
9
|
+
*/
|
|
10
|
+
class PortEvents {
|
|
11
|
+
constructor(port) {
|
|
12
|
+
this.port = port;
|
|
13
|
+
this.dropped = 0;
|
|
14
|
+
this.backdropGeneration = NaN;
|
|
15
|
+
const isBackdrop = () => this.backdropGeneration === this.port.generation();
|
|
16
|
+
this.gameplayEvents = {
|
|
17
|
+
get discardOnHandOff() {
|
|
18
|
+
return isBackdrop();
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
setBackdrop(on) {
|
|
23
|
+
this.port.setBackdrop(on);
|
|
24
|
+
this.backdropGeneration = on ? this.port.generation() : NaN;
|
|
25
|
+
}
|
|
26
|
+
drainGameplayEvents() {
|
|
27
|
+
const [dropped, count] = this.port.drainEvents();
|
|
28
|
+
this.dropped = dropped;
|
|
29
|
+
const out = [];
|
|
30
|
+
for (let i = 0; i < count; i++) {
|
|
31
|
+
const text = this.port.eventText(i);
|
|
32
|
+
if (text !== undefined)
|
|
33
|
+
out.push(JSON.parse(text));
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
get gameplayEventsDropped() {
|
|
38
|
+
return this.dropped;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { PortEvents };
|
|
43
|
+
//# sourceMappingURL=portEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portEvents.js","sources":["../../src/simport/portEvents.ts"],"sourcesContent":["import type { GameplayEvent } from \"../events/gameplayEvents\";\nimport type { EnginePort } from \"./enginePort\";\n\n/** What the analytics bridge drains: the live `Simulation` (whose drain\n * the WASM host overrides to answer with its engine's batch). `release` is the session's\n * own flush (a hide, or a window closing): a host that holds a command's\n * events back until its engine's state covers them (the WASM host, #874)\n * lets them go then, so a page that closes keeps them. `release` is\n * temporary, with that fallback (story-engine-retire-typescript.md). */\nexport interface GameplayEventSource {\n drainGameplayEvents(opts?: { release?: boolean }): GameplayEvent[];\n readonly gameplayEventsDropped: number;\n readonly gameplayEvents: { readonly discardOnHandOff: boolean };\n}\n\n/**\n * The engine's gameplay events through the port (`drainEvents`, `eventText`),\n * in the shape the analytics bridge drains (`GameplayEventSource`). Drained\n * once per frame and once more when the session flushes.\n *\n * The title backdrop is marked here (`setBackdrop`), so the bridge can drop\n * its events while it is up. The engine forgets the mark on any swap, and so\n * does this source: the mark holds for the generation it was set in.\n */\nexport class PortEvents implements GameplayEventSource {\n private dropped = 0;\n private backdropGeneration = NaN;\n /** Read by the bridge on every drain, so it is one object. */\n readonly gameplayEvents: { readonly discardOnHandOff: boolean };\n\n constructor(private readonly port: Pick<EnginePort, \"drainEvents\" | \"eventText\" | \"setBackdrop\" | \"generation\">) {\n const isBackdrop = (): boolean => this.backdropGeneration === this.port.generation();\n this.gameplayEvents = {\n get discardOnHandOff() {\n return isBackdrop();\n },\n };\n }\n\n setBackdrop(on: boolean): void {\n this.port.setBackdrop(on);\n this.backdropGeneration = on ? this.port.generation() : NaN;\n }\n\n drainGameplayEvents(): GameplayEvent[] {\n const [dropped, count] = this.port.drainEvents();\n this.dropped = dropped;\n const out: GameplayEvent[] = [];\n for (let i = 0; i < count; i++) {\n const text = this.port.eventText(i);\n if (text !== undefined) out.push(JSON.parse(text) as GameplayEvent);\n }\n return out;\n }\n\n get gameplayEventsDropped(): number {\n return this.dropped;\n }\n}\n"],"names":[],"mappings":"AAeA;;;;;;;;AAQG;MACU,UAAU,CAAA;AAMrB,IAAA,WAAA,CAA6B,IAAkF,EAAA;QAAlF,IAAA,CAAA,IAAI,GAAJ,IAAI;QALzB,IAAA,CAAA,OAAO,GAAG,CAAC;QACX,IAAA,CAAA,kBAAkB,GAAG,GAAG;AAK9B,QAAA,MAAM,UAAU,GAAG,MAAe,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QACpF,IAAI,CAAC,cAAc,GAAG;AACpB,YAAA,IAAI,gBAAgB,GAAA;gBAClB,OAAO,UAAU,EAAE;YACrB,CAAC;SACF;IACH;AAEA,IAAA,WAAW,CAAC,EAAW,EAAA;AACrB,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;AACzB,QAAA,IAAI,CAAC,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,GAAG;IAC7D;IAEA,mBAAmB,GAAA;AACjB,QAAA,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;AAChD,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;QACtB,MAAM,GAAG,GAAoB,EAAE;AAC/B,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YACnC,IAAI,IAAI,KAAK,SAAS;gBAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAkB,CAAC;QACrE;AACA,QAAA,OAAO,GAAG;IACZ;AAEA,IAAA,IAAI,qBAAqB,GAAA;QACvB,OAAO,IAAI,CAAC,OAAO;IACrB;AACD;;"}
|