diff --git a/src/phases/egg-lapse-phase.ts b/src/phases/egg-lapse-phase.ts index 166d9b4be38..d94ecf64996 100644 --- a/src/phases/egg-lapse-phase.ts +++ b/src/phases/egg-lapse-phase.ts @@ -36,9 +36,11 @@ export class EggLapsePhase extends Phase { // show prompt for skip this.scene.ui.showText(i18next.t("battle:eggSkipPrompt"), 0); this.scene.ui.setModeWithoutClear(Mode.CONFIRM, () => { + console.time("hatch eggs"); for (const egg of eggsToHatch) { this.hatchEggSilently(egg); } + console.timeEnd("hatch eggs"); this.scene.unshiftPhase(new EggSummaryPhase(this.scene, this.eggHatchData)); this.end(); @@ -62,9 +64,6 @@ export class EggLapsePhase extends Phase { } this.end(); } - - - console.log(this.eggHatchData); } else { this.end(); } @@ -88,7 +87,6 @@ export class EggLapsePhase extends Phase { if (pokemon.fusionSpecies) { pokemon.clearFusionSpecies(); } - console.log(pokemon); pokemon.loadAssets().then(() => { diff --git a/src/phases/egg-summary-phase.ts b/src/phases/egg-summary-phase.ts index aed91014cf2..b864814748b 100644 --- a/src/phases/egg-summary-phase.ts +++ b/src/phases/egg-summary-phase.ts @@ -21,11 +21,12 @@ export class EggSummaryPhase extends Phase { start() { super.start(); + console.time("update egg dex"); const updateNextPokemon = (i: integer) => { - console.log(i); if (i >= this.eggHatchData.length) { - console.log("displayed all pokemon"); + console.timeEnd("update egg dex"); + this.scene.ui.setModeForceTransition(Mode.EGG_HATCH_SUMMARY, this.eggHatchData).then(() => { this.scene.fadeOutBgm(undefined, false); this.eggHatchHandler = this.scene.ui.getHandler() as EggHatchSceneHandler; @@ -35,7 +36,6 @@ export class EggSummaryPhase extends Phase { } else { this.eggHatchData[i].setDex(); this.eggHatchData[i].updatePokemon().then(() => { - console.log("updating next pokemon"); if (i < this.eggHatchData.length) { updateNextPokemon(i + 1); } diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 2bfb6e778ac..d1a9492f7ce 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1618,12 +1618,10 @@ export class GameData { } const checkPrevolution = () => { - console.log("checking prevolution"); if (hasPrevolution) { const prevolutionSpecies = pokemonPrevolutions[species.speciesId]; this.setPokemonSpeciesCaught(pokemon, getPokemonSpecies(prevolutionSpecies), incrementCount, fromEgg, showMessage).then(() => resolve()); } else { - console.log("resolving"); resolve(); } }; diff --git a/src/ui/egg-summary-ui-handler.ts b/src/ui/egg-summary-ui-handler.ts index f4ccc2ff6e0..60394d396db 100644 --- a/src/ui/egg-summary-ui-handler.ts +++ b/src/ui/egg-summary-ui-handler.ts @@ -140,6 +140,7 @@ export default class EggSummaryUiHandler extends MessageUiHandler { this.eggHatchBg.setVisible(true); this.infoContainer.hideDisplayPokemon(); + console.time("display icons"); this.eggHatchData.forEach( (value: EggHatchData, i: number) => { const x = (i % 11) * 18; @@ -213,6 +214,8 @@ export default class EggSummaryUiHandler extends MessageUiHandler { em.setVisible(value.eggMoveUnlocked); this.pokemonIconsContainer.add(em); }); + console.timeEnd("display icons"); + this.setCursor(0); // TODO nice animation reveal for all eggs hatching at once @@ -226,7 +229,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler { let success = false; const error = false; - console.log("egg handler button " + button); if (button === Button.CANCEL) { const phase = this.scene.getCurrentPhase(); if (phase instanceof EggSummaryPhase) { diff --git a/src/ui/pokemon-hatch-info-container.ts b/src/ui/pokemon-hatch-info-container.ts index 0788674f943..c98fc62f887 100644 --- a/src/ui/pokemon-hatch-info-container.ts +++ b/src/ui/pokemon-hatch-info-container.ts @@ -134,6 +134,7 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer { * Display a given pokemon sprite with animations */ displayPokemon(pokemon: PlayerPokemon) { + console.time("display pokemon" + pokemon.name); console.log("displaying pokemon", pokemon.name); const species = pokemon.species; const female = pokemon.gender === Gender.FEMALE; @@ -146,6 +147,7 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer { species.loadAssets(this.scene, female, formIndex, shiny, variant, true).then(() => { if (assetLoadCancelled.value) { console.log("interrupted"); + console.timeEnd("display pokemon" + pokemon.name); return; } this.assetLoadCancelled = null; @@ -157,6 +159,7 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer { this.currentPokemonSprite.setPipelineData("shiny", shiny); this.currentPokemonSprite.setPipelineData("variant", variant); this.currentPokemonSprite.setPipelineData("spriteKey", species.getSpriteKey(female, formIndex, shiny, variant)); + console.timeEnd("display pokemon" + pokemon.name); // this.pokemonSprite.setVisible(!this.statsMode); }); } @@ -167,7 +170,7 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer { * @param hatchInfo The EggHatchData of the pokemon / new hatch to show */ showHatchInfo(hatchInfo: EggHatchData) { - console.log("showing hatch info", hatchInfo.pokemon.name); + console.time("show hatch info" + hatchInfo.pokemon.name); this.pokemonEggMovesContainer.setVisible(true); const pokemon = hatchInfo.pokemon; @@ -208,6 +211,7 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer { } else { this.pokemonHatchedIcon.setFrame(getEggTierForSpecies(species)); } + console.timeEnd("show hatch info" + hatchInfo.pokemon.name); }