Player count and instance time on wrist overlay

This commit is contained in:
Natsumi
2021-03-03 14:23:55 +13:00
parent e73ee80ef5
commit a9d8003408
4 changed files with 80 additions and 22 deletions

View File

@@ -694,7 +694,14 @@ speechSynthesis.getVoices();
config: {},
isGameRunning: false,
isGameNoVR: false,
lastLocation: {},
lastLocation: {
date: 0,
location: '',
name: '',
playerCount: 0,
friendCount: 0
},
lastLocationTimer: '',
wristFeedLastEntry: '',
notyFeedLastEntry: '',
wristFeed: [],
@@ -738,6 +745,11 @@ speechSynthesis.getVoices();
this.isGameRunning = sharedRepository.getBool('is_game_running');
this.isGameNoVR = sharedRepository.getBool('is_Game_No_VR');
this.lastLocation = sharedRepository.getObject('last_location');
if (this.lastLocation.date !== 0) {
this.lastLocationTimer = timeToText(Date.now() - this.lastLocation.date);
} else {
this.lastLocationTimer = '';
}
var newConfig = sharedRepository.getObject('VRConfigVars');
if (newConfig) {
if (JSON.stringify(newConfig) !== JSON.stringify(this.config)) {
@@ -810,7 +822,7 @@ speechSynthesis.getVoices();
$app.methods.updateCpuUsageLoop = async function () {
try {
var cpuUsage = await AppApi.CpuUsage();
this.cpuUsage = cpuUsage.toFixed(2);
this.cpuUsage = cpuUsage.toFixed(0);
} catch (err) {
console.error(err);
}