Add back step names in tutorial

This commit is contained in:
Ryan Huffman 2016-12-13 11:37:38 -08:00
parent 188bf600d1
commit 280c5d2460

View file

@ -419,6 +419,7 @@ function reenableEverything() {
// // // //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
var stepStart = function() { var stepStart = function() {
this.name = 'start';
}; };
stepStart.prototype = { stepStart.prototype = {
start: function(onFinish) { start: function(onFinish) {
@ -463,6 +464,7 @@ stepEnableControllers.prototype = {
// // // //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
var stepOrient = function(tutorialManager) { var stepOrient = function(tutorialManager) {
this.name = 'orient';
this.tags = ["orient", "orient-" + tutorialManager.controllerName]; this.tags = ["orient", "orient-" + tutorialManager.controllerName];
} }
stepOrient.prototype = { stepOrient.prototype = {
@ -516,6 +518,7 @@ stepOrient.prototype = {
// // // //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
var stepNearGrab = function() { var stepNearGrab = function() {
this.name = 'nearGrab';
this.tag = "nearGrab"; this.tag = "nearGrab";
this.tempTag = "nearGrab-temporary"; this.tempTag = "nearGrab-temporary";
this.birdIDs = []; this.birdIDs = [];
@ -589,6 +592,7 @@ stepNearGrab.prototype = {
// // // //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
var stepFarGrab = function() { var stepFarGrab = function() {
this.name = 'farGrab';
this.tag = "farGrab"; this.tag = "farGrab";
this.tempTag = "farGrab-temporary"; this.tempTag = "farGrab-temporary";
this.finished = true; this.finished = true;
@ -694,6 +698,8 @@ PositionWatcher.prototype = {
var stepEquip = function(tutorialManager) { var stepEquip = function(tutorialManager) {
const controllerName = tutorialManager.controllerName; const controllerName = tutorialManager.controllerName;
this.name = 'equip';
this.tags = ["equip", "equip-" + controllerName]; this.tags = ["equip", "equip-" + controllerName];
this.tagsPart1 = ["equip-part1", "equip-part1-" + controllerName]; this.tagsPart1 = ["equip-part1", "equip-part1-" + controllerName];
this.tagsPart2 = ["equip-part2", "equip-part2-" + controllerName]; this.tagsPart2 = ["equip-part2", "equip-part2-" + controllerName];
@ -834,6 +840,8 @@ stepEquip.prototype = {
// // // //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
var stepTurnAround = function(tutorialManager) { var stepTurnAround = function(tutorialManager) {
this.name = 'turnAround';
this.tags = ["turnAround", "turnAround-" + tutorialManager.controllerName]; this.tags = ["turnAround", "turnAround-" + tutorialManager.controllerName];
this.tempTag = "turnAround-temporary"; this.tempTag = "turnAround-temporary";
@ -922,6 +930,8 @@ stepTurnAround.prototype = {
// // // //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
var stepTeleport = function(tutorialManager) { var stepTeleport = function(tutorialManager) {
this.name = 'teleport';
this.tags = ["teleport", "teleport-" + tutorialManager.controllerName]; this.tags = ["teleport", "teleport-" + tutorialManager.controllerName];
this.tempTag = "teleport-temporary"; this.tempTag = "teleport-temporary";
} }
@ -984,6 +994,8 @@ stepTeleport.prototype = {
// // // //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
var stepFinish = function() { var stepFinish = function() {
this.name = 'finish';
this.tag = "finish"; this.tag = "finish";
this.tempTag = "finish-temporary"; this.tempTag = "finish-temporary";
} }
@ -999,6 +1011,8 @@ stepFinish.prototype = {
}; };
var stepCleanupFinish = function() { var stepCleanupFinish = function() {
this.name = 'cleanup';
this.shouldLog = false; this.shouldLog = false;
} }
stepCleanupFinish.prototype = { stepCleanupFinish.prototype = {
@ -1073,7 +1087,7 @@ TutorialManager = function() {
this.onFinish = function() { this.onFinish = function() {
debug("onFinish", currentStepNum); debug("onFinish", currentStepNum);
if (currentStep && currentStep.shouldLog !== false) { if (currentStep && currentStep.shouldLog !== false) {
self.trackStep(currentStep.tag, currentStepNum); self.trackStep(currentStep.name, currentStepNum);
} }
self.startNextStep(); self.startNextStep();