Adds session playtime to gameInfo for Rich Presence (#738)

* Add rich presence support

* Adds playtime to gameInfo
pull/743/head
William Burleson 2024-05-11 10:11:00 -04:00 committed by GitHub
parent 60f86c85ce
commit 8707213e88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -1971,6 +1971,7 @@ export default class BattleScene extends SceneBase {
updateGameInfo(): void { updateGameInfo(): void {
const gameInfo = { const gameInfo = {
playTime: this.sessionPlayTime ? this.sessionPlayTime : 0,
gameMode: this.currentBattle ? this.gameMode.getName() : 'Title', gameMode: this.currentBattle ? this.gameMode.getName() : 'Title',
biome: this.currentBattle ? getBiomeName(this.arena.biomeType) : '', biome: this.currentBattle ? getBiomeName(this.arena.biomeType) : '',
wave: this.currentBattle?.waveIndex || 0, wave: this.currentBattle?.waveIndex || 0,