classes: much better justin guide which starts with

equipment (and *shows* that you still have it), and *then* goes to
through the class system details (@wc8)
This commit is contained in:
Tyler Renelle
2013-12-17 17:12:39 -07:00
parent 2efc0972d6
commit 8833a4495d
2 changed files with 23 additions and 14 deletions
+4 -3
View File
@@ -28,7 +28,6 @@
"angular-bindonce": "~0.2.1",
"bootstrap": "v2.3.2",
"bootstrap-datepicker": "~1.2.0",
"bootstrap-tour": "0.5.0",
"bootstrap-growl": "~1.1.0",
"habitrpg-shared": "git://github.com/HabitRPG/habitrpg-shared.git#develop",
"BrowserQuest": "https://github.com/mozilla/BrowserQuest.git",
@@ -38,12 +37,14 @@
"Angular-At-Directive": "git://github.com/snicker/Angular-At-Directive#master",
"js-emoji": "git://github.com/snicker/js-emoji#master",
"gemoji": "git://github.com/github/gemoji",
"sticky": "*"
"sticky": "*",
"bootstrap-tour": "~0.8.0"
},
"resolutions": {
"jquery": "~2.0.3",
"bootstrap": "v2.3.2",
"angular": "~1.2.1"
"angular": "~1.2.1",
"bootstrap-tour": "~0.8.0"
},
"devDependencies": {
"angular-mocks": "~1.2.1"
+19 -11
View File
@@ -5,7 +5,7 @@
*/
angular.module('guideServices', []).
factory('Guide', ['$rootScope', 'User', function($rootScope, User) {
factory('Guide', ['$rootScope', 'User', '$timeout', function($rootScope, User, $timeout) {
/**
* Init and show the welcome tour. Note we do it listening to a $rootScope broadcasted 'userLoaded' message,
@@ -146,8 +146,23 @@ angular.module('guideServices', []).
* Classes Tour
*/
function classesTour(){
// TODO notice my hack-job `onShow: _.once()` functions. Without these, the syncronous path redirects won't properly handle showing tour
var tourSteps = [
{
path: '/#/options/inventory/equipment',
onShow: _.once(function(tour){
$timeout(function(){tour.goTo(0)});
}),
orphan: true,
title: "Class Gear",
content: "First: don't panic! Your old gear is in your inventory, and you're now wearing your apprentice <strong>" + User.user.stats.class + "</strong> equipment. Wearing your class's gear grants you a 1.5% bonus to stats. However, feel free to switch back to your old gear."
},
{
path: '/#/options/profile/stats',
onShow: _.once(function(tour){
$timeout(function(){tour.goTo(1)});
}),
element: ".allocate-stats",
title: "Stats",
content: "These are your class's stats, they affect the game-play. Each time you level up, you get one point to allocate to particular stat. Hover over each stat for more information.",
@@ -161,16 +176,9 @@ angular.module('guideServices', []).
title: "Spells",
content: "You can now unlock class-specific spells. You'll see your first at level 6."
}, {
// onShow: function(tour){
// $rootScope.$state.go('options.inventory.inventory');
// },
element: '.stats-equipment',
title: "Class Gear",
content: "Your old gear has been placed into your inventory, you're now wearing your apprentice " + User.user.stats.class + " equippment. Wearing your class's gear grants you a 1.5% bonus to stats. However, feel free to switch back to your old gear."
}, {
element: ".stats-equipment",
title: "Read More",
content: "For more information on the class-system, see <a href='http://habitrpg.wikia.com/wiki/Class_System' target='_blank'>Wikia</a>.",
orphan: true,
title: "Read More",
content: "For more information on the class-system, see <a href='http://habitrpg.wikia.com/wiki/Class_System' target='_blank'>Wikia</a>."
}
];
_.each(tourSteps, function(step){