Add GameLog entries for resource loading (#513)

* add log entries for resource loading

* add config for resource loading
This commit is contained in:
BoatFloater
2023-03-24 23:57:55 +09:00
committed by GitHub
parent 11f1f8063e
commit 3f0a479e1a
9 changed files with 151 additions and 2 deletions

View File

@@ -9378,6 +9378,19 @@ speechSynthesis.getVoices();
this.nowPlaying.offset = parseInt(timestamp, 10);
}
break;
case 'resource-load':
if (!this.logResourceLoad) {
break;
}
var entry = {
created_at: gameLog.dt,
type: gameLog.resourceType === 'string' ? 'StringLoad' : 'ImageLoad',
resourceUrl: gameLog.resourceUrl,
resourceType: gameLog.resourceType,
location
};
database.addGamelogResourceLoadToDatabase(entry);
break;
case 'screenshot':
if (!this.screenshotHelper) {
break;
@@ -13359,6 +13372,10 @@ speechSynthesis.getVoices();
AppApi.ExecuteVrOverlayFunction('updateHudTimeout', '[]');
}
};
$app.data.logResourceLoad = configRepository.getBool('VRCX_logResourceLoad', false);
$app.methods.saveGameLogOptions = function() {
configRepository.setBool('VRCX_logResourceLoad', this.logResourceLoad);
};
// setting defaults
if (!configRepository.getString('VRCX_notificationPosition')) {