removing redundant time logs and code touchup

This commit is contained in:
James Diefenbach 2024-09-02 09:01:17 +10:00
parent a9cf25b2ab
commit f5a46d9f26
3 changed files with 1 additions and 10 deletions

View File

@ -362,9 +362,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
loadAssets(ignoreOverride: boolean = true): Promise<void> {
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?
console.time("loading moves " + this.name);
Promise.allSettled(moveIds.map(m => initMoveAnim(this.scene, m)))
.then(() => {
loadMoveAnimAssets(this.scene, moveIds);
@ -394,13 +392,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
}
this.playAnim();
const updateFusionPaletteAndResolve = () => {
console.time("fusion loading " + this.name);
this.updateFusionPalette();
if (this.summonData?.speciesForm) {
this.updateFusionPalette(true);
}
console.timeEnd("fusion loading " + this.name);
console.timeEnd("total asset loading for " + this.name + (this.shiny ? "" : "shiny"));
resolve();
};
if (this.shiny) {

View File

@ -90,9 +90,7 @@ export class EggLapsePhase extends Phase {
pokemon.clearFusionSpecies();
}
// pokemon.loadAssets().then(() => {
this.loadsWaiting--;
console.log(this.loadsWaiting);
if (this.loadsWaiting === 0) {
console.timeEnd("hatch eggs");
@ -110,7 +108,6 @@ export class EggLapsePhase extends Phase {
if (pokemon.isShiny()) {
this.scene.validateAchv(achvs.HATCH_SHINY);
}
// });
}

View File

@ -156,7 +156,6 @@ 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;
@ -191,6 +190,7 @@ export default class EggSummaryUiHandler extends MessageUiHandler {
const variant = displayPokemon.variant;
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));
icon.setScale(0.5);
icon.setOrigin(0, 0);
@ -239,7 +239,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler {
em.setVisible(value.eggMoveUnlocked);
this.pokemonIconsContainer.add(em);
});
console.timeEnd("display icons");
this.setCursor(0);