Time spent in world, world PC/Quest badge, fix Nuisance badge

This commit is contained in:
Natsumi
2022-01-01 00:10:08 +13:00
parent b8b996997a
commit b76858a960
3 changed files with 45 additions and 5 deletions

View File

@@ -12033,9 +12033,9 @@ speechSynthesis.getVoices();
avatarName: '',
fileCreatedAt: ''
},
lastSeen: '',
joinCount: 0,
timeSpent: ''
timeSpent: 0,
lastSeen: ''
};
$app.watch['userDialog.memo'] = function () {
@@ -12248,7 +12248,7 @@ speechSynthesis.getVoices();
};
D.lastSeen = '';
D.joinCount = 0;
D.timeSpent = '';
D.timeSpent = 0;
API.getCachedUser({
userId
})
@@ -13054,7 +13054,10 @@ speechSynthesis.getVoices();
cacheSize: 0,
cacheLocked: false,
lastVisit: '',
visitCount: 0
visitCount: 0,
timeSpent: 0,
isPC: false,
isQuest: false
};
API.$on('LOGOUT', function () {
@@ -13153,6 +13156,9 @@ speechSynthesis.getVoices();
D.rooms = [];
D.lastVisit = '';
D.visitCount = '';
D.timeSpent = 0;
D.isPC = false;
D.isQuest = false;
database.getLastVisit(D.id).then((ref) => {
if (ref.worldId === D.id) {
D.lastVisit = ref.created_at;
@@ -13163,6 +13169,11 @@ speechSynthesis.getVoices();
D.visitCount = ref.visitCount;
}
});
database.getTimeSpentInWorld(D.id).then((ref) => {
if (ref.worldId === D.id) {
D.timeSpent = ref.timeSpent;
}
});
API.getCachedWorld({
worldId: L.worldId
})
@@ -13176,6 +13187,13 @@ speechSynthesis.getVoices();
D.loading = false;
D.ref = args.ref;
D.isFavorite = API.cachedFavoritesByObjectId.has(D.id);
for (var unityPackage of args.ref.unityPackages) {
if (unityPackage.platform === 'standalonewindows') {
D.isPC = true;
} else if (unityPackage.platform === 'android') {
D.isQuest = true;
}
}
this.updateVRChatWorldCache();
if (args.cache) {
API.getWorld(args.params)