Fix crash related to moves without battle animations

This commit is contained in:
Flashfyre 2024-03-23 15:29:22 -04:00
parent a333f7886c
commit a3cde2df59
2 changed files with 2 additions and 1 deletions

View File

@ -560,6 +560,8 @@ function loadAnimAssets(scene: BattleScene, anims: AnimConfig[], startLoad?: boo
const backgrounds = new Set<string>(); const backgrounds = new Set<string>();
const sounds = new Set<string>(); const sounds = new Set<string>();
for (let a of anims) { for (let a of anims) {
if (!a.frames?.length)
continue;
const animSounds = a.getSoundResourceNames(); const animSounds = a.getSoundResourceNames();
for (let ms of animSounds) for (let ms of animSounds)
sounds.add(ms); sounds.add(ms);

View File

@ -6,7 +6,6 @@ import * as Utils from "../utils";
import { EGG_SEED, Egg, GachaType, getEggTierDefaultHatchWaves, getEggDescriptor, getLegendaryGachaSpeciesForTimestamp } from "../data/egg"; import { EGG_SEED, Egg, GachaType, getEggTierDefaultHatchWaves, getEggDescriptor, getLegendaryGachaSpeciesForTimestamp } from "../data/egg";
import { VoucherType, getVoucherTypeIcon } from "../system/voucher"; import { VoucherType, getVoucherTypeIcon } from "../system/voucher";
import { getPokemonSpecies } from "../data/pokemon-species"; import { getPokemonSpecies } from "../data/pokemon-species";
import { Type } from "../data/type";
import { addWindow } from "./window"; import { addWindow } from "./window";
import { Tutorial, handleTutorial } from "../tutorial"; import { Tutorial, handleTutorial } from "../tutorial";
import { EggTier } from "../data/enums/egg-type"; import { EggTier } from "../data/enums/egg-type";