Apply suggestions from code review

Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
This commit is contained in:
Mumble 2024-11-16 12:45:36 -08:00 committed by GitHub
parent 08f763f983
commit 4b3cececc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,8 +226,8 @@ export class EncounterPhase extends BattlePhase {
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
if (!this.loaded) {
this.trySetWeatherIfNewBiome(); // Set weather before session gets saved
// Game syncs to server on waves 1, X6, and X11 (As of 1.2.0)
this.scene.gameData.saveAll(this.scene, true, (battle.waveIndex % 5 === 1 || battle.waveIndex === 1) || (this.scene.lastSavePlayTime ?? 0) >= 300).then(success => {
// Game syncs to server on waves X1 and X6 (As of 1.2.0)
this.scene.gameData.saveAll(this.scene, true, battle.waveIndex % 5 === 1 || (this.scene.lastSavePlayTime ?? 0) >= 300).then(success => {
this.scene.disableMenu = false;
if (!success) {
return this.scene.reset(true);