mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
hotfix save AFTER egg is made
This commit is contained in:
parent
6c0602b3f8
commit
d6cc28ea69
@ -1414,15 +1414,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
starterData.candyCount -= sameSpeciesEggCost;
|
||||
}
|
||||
this.pokemonCandyCountText.setText(`x${starterData.candyCount}`);
|
||||
|
||||
const egg = new Egg({scene: this.scene, species: this.lastSpecies.speciesId, sourceType: EggSourceType.SAME_SPECIES_EGG});
|
||||
egg.addEggToGameData(this.scene);
|
||||
|
||||
this.scene.gameData.saveSystem().then(success => {
|
||||
if (!success) {
|
||||
return this.scene.reset(true);
|
||||
}
|
||||
});
|
||||
|
||||
const egg = new Egg({scene: this.scene, species: this.lastSpecies.speciesId, sourceType: EggSourceType.SAME_SPECIES_EGG});
|
||||
egg.addEggToGameData(this.scene);
|
||||
|
||||
ui.setMode(Mode.STARTER_SELECT);
|
||||
this.scene.playSound("buy");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user