mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 06:49:35 +02:00
fixing up the logging lol
This commit is contained in:
parent
fa0527bda5
commit
1c0e1f8cd6
@ -1,4 +1,4 @@
|
|||||||
import { clientSessionId, loggedInUser } from "#app/account";
|
import { clientSessionId } from "#app/account";
|
||||||
import { BattleType } from "#app/battle";
|
import { BattleType } from "#app/battle";
|
||||||
import BattleScene from "#app/battle-scene";
|
import BattleScene from "#app/battle-scene";
|
||||||
import { getCharVariantFromDialogue } from "#app/data/dialogue";
|
import { getCharVariantFromDialogue } from "#app/data/dialogue";
|
||||||
@ -114,7 +114,9 @@ export class GameOverPhase extends BattlePhase {
|
|||||||
this.scene.gameData.gameStats.dailyRunSessionsWon++;
|
this.scene.gameData.gameStats.dailyRunSessionsWon++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.scene.gameData.saveRunHistory(this.scene, this.getRunHistoryEntry(), this.victory);
|
this.getRunHistoryEntry().then(runHistoryEntry => {
|
||||||
|
this.scene.gameData.saveRunHistory(this.scene, runHistoryEntry, this.victory);
|
||||||
|
});
|
||||||
const fadeDuration = this.victory ? 10000 : 5000;
|
const fadeDuration = this.victory ? 10000 : 5000;
|
||||||
this.scene.fadeOutBgm(fadeDuration, true);
|
this.scene.fadeOutBgm(fadeDuration, true);
|
||||||
const activeBattlers = this.scene.getField().filter(p => p?.isActive(true));
|
const activeBattlers = this.scene.getField().filter(p => p?.isActive(true));
|
||||||
@ -226,9 +228,8 @@ export class GameOverPhase extends BattlePhase {
|
|||||||
* Retrieves the session's data to log its TBD
|
* Retrieves the session's data to log its TBD
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getRunHistoryEntry(): SessionSaveData {
|
private async getRunHistoryEntry(): Promise<SessionSaveData> {
|
||||||
const preWaveSessionDataCached = localStorage.getItem(`sessionData${this.scene.sessionSlotId ? this.scene.sessionSlotId : ""}_${loggedInUser?.username}`);
|
const preWaveSessionData = await this.scene.gameData.getSession(this.scene.sessionSlotId);
|
||||||
const preWaveSessionData = preWaveSessionDataCached ? this.scene.gameData.parseSessionData(preWaveSessionDataCached) : null;
|
|
||||||
return {
|
return {
|
||||||
seed: this.scene.seed,
|
seed: this.scene.seed,
|
||||||
playTime: this.scene.sessionPlayTime,
|
playTime: this.scene.sessionPlayTime,
|
||||||
|
Loading…
Reference in New Issue
Block a user