()
| 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 }; |
nothing calls this directly
no test coverage detected