mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Add controller name and update version in tutorial user stats
This commit is contained in:
parent
a1fea65aa5
commit
f3f6317c91
3 changed files with 11 additions and 5 deletions
|
@ -25,14 +25,15 @@ void UserActivityLoggerScriptingInterface::toggledAway(bool isAway) {
|
|||
}
|
||||
|
||||
void UserActivityLoggerScriptingInterface::tutorialProgress( QString stepName, int stepNumber, float secondsToComplete,
|
||||
float tutorialElapsedTime, QString tutorialRunID, int tutorialVersion) {
|
||||
float tutorialElapsedTime, QString tutorialRunID, int tutorialVersion, QString controllerType = "") {
|
||||
logAction("tutorial_progress", {
|
||||
{ "tutorial_run_id", tutorialRunID },
|
||||
{ "tutorial_version", tutorialVersion },
|
||||
{ "step", stepName },
|
||||
{ "step_number", stepNumber },
|
||||
{ "seconds_to_complete", secondsToComplete },
|
||||
{ "tutorial_elapsed_seconds", tutorialElapsedTime }
|
||||
{ "tutorial_elapsed_seconds", tutorialElapsedTime },
|
||||
{ "controller_type", controllerType }
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
Q_INVOKABLE void openedMarketplace();
|
||||
Q_INVOKABLE void toggledAway(bool isAway);
|
||||
Q_INVOKABLE void tutorialProgress(QString stepName, int stepNumber, float secondsToComplete,
|
||||
float tutorialElapsedTime, QString tutorialRunID = "", int tutorialVersion = 0);
|
||||
float tutorialElapsedTime, QString tutorialRunID = "", int tutorialVersion = 0, QString controllerType = "");
|
||||
|
||||
private:
|
||||
void logAction(QString action, QJsonObject details = {});
|
||||
|
|
|
@ -1020,18 +1020,23 @@ TutorialManager = function() {
|
|||
var didFinishTutorial = false;
|
||||
|
||||
var wentToEntryStepNum;
|
||||
var VERSION = 1;
|
||||
var VERSION = 2;
|
||||
var tutorialID;
|
||||
|
||||
var self = this;
|
||||
|
||||
// The real controller name is the actual detected controller name, or 'unknown'
|
||||
// if one is not found.
|
||||
if (HMD.isSubdeviceContainingNameAvailable("OculusTouch")) {
|
||||
this.controllerName = "touch";
|
||||
this.realControllerName = "touch";
|
||||
} else if (HMD.isHandControllerAvailable("OpenVR")) {
|
||||
this.controllerName = "vive";
|
||||
this.realControllerName = "vive";
|
||||
} else {
|
||||
info("ERROR, no known hand controller found, defaulting to Vive");
|
||||
this.controllerName = "vive";
|
||||
this.realControllerName = "unknown";
|
||||
}
|
||||
|
||||
this.startTutorial = function() {
|
||||
|
@ -1120,7 +1125,7 @@ TutorialManager = function() {
|
|||
var tutorialTimeElapsed = (Date.now() - startedTutorialAt) / 1000;
|
||||
UserActivityLogger.tutorialProgress(
|
||||
name, stepNum, timeToFinishStep, tutorialTimeElapsed,
|
||||
tutorialID, VERSION);
|
||||
tutorialID, VERSION, this.realControllerName);
|
||||
}
|
||||
|
||||
// This is a message sent from the "entry" portal in the courtyard,
|
||||
|
|
Loading…
Reference in a new issue