mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 08:22:16 +02:00
removing redundant time logs and code touchup
This commit is contained in:
parent
a9cf25b2ab
commit
f5a46d9f26
@ -362,9 +362,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
loadAssets(ignoreOverride: boolean = true): Promise<void> {
|
loadAssets(ignoreOverride: boolean = true): Promise<void> {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
console.time("total asset loading for " + this.name + (this.shiny ? "" : "shiny"));
|
|
||||||
const moveIds = this.getMoveset().map(m => m!.getMove().id); // TODO: is this bang correct?
|
const moveIds = this.getMoveset().map(m => m!.getMove().id); // TODO: is this bang correct?
|
||||||
console.time("loading moves " + this.name);
|
|
||||||
Promise.allSettled(moveIds.map(m => initMoveAnim(this.scene, m)))
|
Promise.allSettled(moveIds.map(m => initMoveAnim(this.scene, m)))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loadMoveAnimAssets(this.scene, moveIds);
|
loadMoveAnimAssets(this.scene, moveIds);
|
||||||
@ -394,13 +392,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
this.playAnim();
|
this.playAnim();
|
||||||
const updateFusionPaletteAndResolve = () => {
|
const updateFusionPaletteAndResolve = () => {
|
||||||
console.time("fusion loading " + this.name);
|
|
||||||
this.updateFusionPalette();
|
this.updateFusionPalette();
|
||||||
if (this.summonData?.speciesForm) {
|
if (this.summonData?.speciesForm) {
|
||||||
this.updateFusionPalette(true);
|
this.updateFusionPalette(true);
|
||||||
}
|
}
|
||||||
console.timeEnd("fusion loading " + this.name);
|
|
||||||
console.timeEnd("total asset loading for " + this.name + (this.shiny ? "" : "shiny"));
|
|
||||||
resolve();
|
resolve();
|
||||||
};
|
};
|
||||||
if (this.shiny) {
|
if (this.shiny) {
|
||||||
|
@ -90,9 +90,7 @@ export class EggLapsePhase extends Phase {
|
|||||||
pokemon.clearFusionSpecies();
|
pokemon.clearFusionSpecies();
|
||||||
}
|
}
|
||||||
|
|
||||||
// pokemon.loadAssets().then(() => {
|
|
||||||
this.loadsWaiting--;
|
this.loadsWaiting--;
|
||||||
console.log(this.loadsWaiting);
|
|
||||||
|
|
||||||
if (this.loadsWaiting === 0) {
|
if (this.loadsWaiting === 0) {
|
||||||
console.timeEnd("hatch eggs");
|
console.timeEnd("hatch eggs");
|
||||||
@ -110,7 +108,6 @@ export class EggLapsePhase extends Phase {
|
|||||||
if (pokemon.isShiny()) {
|
if (pokemon.isShiny()) {
|
||||||
this.scene.validateAchv(achvs.HATCH_SHINY);
|
this.scene.validateAchv(achvs.HATCH_SHINY);
|
||||||
}
|
}
|
||||||
// });
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler {
|
|||||||
this.eggHatchBg.setVisible(true);
|
this.eggHatchBg.setVisible(true);
|
||||||
|
|
||||||
this.infoContainer.hideDisplayPokemon();
|
this.infoContainer.hideDisplayPokemon();
|
||||||
console.time("display icons");
|
|
||||||
|
|
||||||
this.eggHatchData.forEach( (value: EggHatchData, i: number) => {
|
this.eggHatchData.forEach( (value: EggHatchData, i: number) => {
|
||||||
const x = (i % 11) * 18;
|
const x = (i % 11) * 18;
|
||||||
@ -191,6 +190,7 @@ export default class EggSummaryUiHandler extends MessageUiHandler {
|
|||||||
const variant = displayPokemon.variant;
|
const variant = displayPokemon.variant;
|
||||||
const isShiny = displayPokemon.shiny;
|
const isShiny = displayPokemon.shiny;
|
||||||
|
|
||||||
|
// set pokemon icon (and replace with base sprite if there is a mismatch)
|
||||||
const icon = this.scene.add.sprite(x-2, y+2, species.getIconAtlasKey(formIndex, isShiny, variant));
|
const icon = this.scene.add.sprite(x-2, y+2, species.getIconAtlasKey(formIndex, isShiny, variant));
|
||||||
icon.setScale(0.5);
|
icon.setScale(0.5);
|
||||||
icon.setOrigin(0, 0);
|
icon.setOrigin(0, 0);
|
||||||
@ -239,7 +239,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler {
|
|||||||
em.setVisible(value.eggMoveUnlocked);
|
em.setVisible(value.eggMoveUnlocked);
|
||||||
this.pokemonIconsContainer.add(em);
|
this.pokemonIconsContainer.add(em);
|
||||||
});
|
});
|
||||||
console.timeEnd("display icons");
|
|
||||||
|
|
||||||
this.setCursor(0);
|
this.setCursor(0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user