MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / apply

Method apply

src/actions/Preload.ts:386–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

384 }
385
386 override async apply(): Promise<void> {
387 // Start the preload operation
388 if (this.isBlock) {
389 this.preloadPromise = this.preloadBlock(this.blockId);
390 } else if (this.category === 'characters') {
391 this.preloadPromise = this.preloadCharacterSprite(this.characterId, this.assetName);
392 } else if (Preload.hasLoader(this.category)) {
393 this.preloadPromise = this.preloadAsset(this.category, this.assetName);
394 } else {
395 console.warn(`Preload: No loader registered for category "${this.category}"`);
396 }
397
398 // If blocking, wait for the preload to complete
399 if (this.isBlocking && this.preloadPromise) {
400 await this.preloadPromise;
401 }
402 }
403
404 override async didApply(): Promise<ActionApplyResult> {
405 return { advance: true };

Callers

nothing calls this directly

Calls 4

preloadBlockMethod · 0.95
preloadAssetMethod · 0.95
hasLoaderMethod · 0.80

Tested by

no test coverage detected