mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
feat(plans): time travelers tab, 1 trinket to buy 1 set
This commit is contained in:
parent
7f2b6b5cfb
commit
0fffd66588
6 changed files with 40 additions and 6 deletions
|
|
@ -181,6 +181,10 @@ window.habitrpg = angular.module('habitrpg',
|
|||
url: '/equipment',
|
||||
templateUrl: "partials/options.inventory.equipment.html"
|
||||
})
|
||||
.state('options.inventory.timetravelers', {
|
||||
url: '/timetravelers',
|
||||
templateUrl: "partials/options.inventory.timetravelers.html"
|
||||
})
|
||||
|
||||
// Options > Settings
|
||||
.state('options.settings', {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '$http', '$q', 'User', 'Members', '$state', 'Notification',
|
||||
function($scope, $rootScope, Shared, Groups, $http, $q, User, Members, $state, Notification) {
|
||||
Members.selectMember('d7f809df-81bd-4d58-992b-851d94bfaccb', function(){
|
||||
$rootScope.openModal('send-gift',{controller:'MemberModalCtrl'})
|
||||
});
|
||||
|
||||
|
||||
$scope.isMemberOfPendingQuest = function(userid, group) {
|
||||
if (!group.quest || !group.quest.members) return false;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ function revealMysteryItems(user) {
|
|||
_.each(shared.content.gear.flat, function(item) {
|
||||
if (
|
||||
item.klass === 'mystery' &&
|
||||
moment().isAfter(item.mystery.start) &&
|
||||
moment().isBefore(item.mystery.end) &&
|
||||
moment().isAfter(shared.content.mystery[item.mystery].start) &&
|
||||
moment().isBefore(shared.content.mystery[item.mystery].end) &&
|
||||
!user.items.gear.owned[item.key] &&
|
||||
!~user.purchased.plan.mysteryItems.indexOf(item.key)
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ script(type='text/ng-template', id='partials/options.inventory.html')
|
|||
li.equipment-tab(ng-class="{ active: $state.includes('options.inventory.equipment') }")
|
||||
a(ui-sref='options.inventory.equipment')
|
||||
=env.t('equipment')
|
||||
li.equipment-tab(ng-class="{ active: $state.includes('options.inventory.timetravelers') }")
|
||||
a(ui-sref='options.inventory.timetravelers')
|
||||
| Time Travelers
|
||||
|
||||
.tab-content
|
||||
.tab-pane.active
|
||||
|
|
|
|||
|
|
@ -19,6 +19,33 @@ script(type='text/ng-template', id='partials/options.inventory.equipment.html')
|
|||
div(ng-repeat='item in gear[klass]')
|
||||
button.customize-option(popover='{{::item.notes()}}', popover-title='{{::item.text()}}', popover-trigger='mouseenter', popover-placement='right', ng-click='user.ops.equip({params:{type:"costume", key:item.key}})', class='shop_{{::item.key}}', ng-class='{selectableInventory: user.items.gear.costume[item.type] == item.key}')
|
||||
|
||||
script(type='text/ng-template', id='partials/options.inventory.timetravelers.html')
|
||||
.container-fluid
|
||||
.stable.row(ng-if='user.purchased.plan.consecutive.trinkets <= 0')
|
||||
.col-md-2
|
||||
.npc_timetravelers
|
||||
.col-md-10
|
||||
.popover.static-popover.fade.right.in
|
||||
.arrow
|
||||
h3.popover-title Tyler and Vicky
|
||||
.popover-content
|
||||
p You'll need a Time Trinket to summon the mysterious Time Travelers! <a href='https://habitrpg.com/#/options/settings/subscription' target='_blank'>Subscribers</a> earn one Time Trinket for every three months of consecutive subscribing. Come back when you have a Time Trinket, and the Time Travelers will fetch you a Subscriber Item Set from the past.... or maybe even the future.
|
||||
|
||||
.row.stable(ng-if='user.purchased.plan.consecutive.trinkets > 0')
|
||||
.col-md-2
|
||||
.npc_timetravelers
|
||||
.col-md-10
|
||||
.popover.static-popover.fade.right.in
|
||||
.arrow
|
||||
h3.popover-title Mysterious Time Travelers
|
||||
.popover-content
|
||||
p We see you have a Time Trinket, so we will happily travel back in time for you! Please choose the Mystery Item Set you would like. You can see a list of the past item sets <a href='http://habitrpg.wikia.com/wiki/Mystery_Item' target='_blank'>here</a>! If those don't satisfy you, perhaps you'd be interested in one of our fashionably futuristic Steampunk Item Sets?
|
||||
.col-md-12
|
||||
li.customize-menu.inventory-gear
|
||||
menu.pets-menu(label='{{::set.text}}', ng-repeat='set in Content.timeTravelerStore(user.items.gear.owned)')
|
||||
div(ng-repeat='item in set.items')
|
||||
button.customize-option(popover='{{::item.notes()}}', popover-title='{{::item.text()}}', popover-trigger='mouseenter', popover-placement='right', ng-click='user.ops.buyMysterySet({params:{key:set.key}})', class='shop_{{::item.key}}')
|
||||
|
||||
script(type='text/ng-template', id='partials/options.inventory.drops.html')
|
||||
.container-fluid
|
||||
.row
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ nav.toolbar(ng-controller='AuthCtrl', ng-class='{active: isToolbarHidden}')
|
|||
a(ui-sref='options.inventory.mounts')=env.t('mounts')
|
||||
li
|
||||
a(ui-sref='options.inventory.equipment')=env.t('equipment')
|
||||
li
|
||||
a(ui-sref='options.inventory.timetravelers') Time Travelers
|
||||
ul.toolbar-submenu
|
||||
li
|
||||
a(target="_blank" ng-href='http://data.habitrpg.com?uuid={{user._id}}')=env.t('dataTool')
|
||||
|
|
@ -126,6 +128,8 @@ nav.toolbar(ng-controller='AuthCtrl', ng-class='{active: isToolbarHidden}')
|
|||
a(ui-sref='options.inventory.mounts')=env.t('mounts')
|
||||
li
|
||||
a(ui-sref='options.inventory.equipment')=env.t('equipment')
|
||||
li
|
||||
a(ui-sref='options.inventory.timetravelers') Time Travelers
|
||||
li.toolbar-button-dropdown
|
||||
a(target="_blank" ng-href='http://data.habitrpg.com?uuid={{user._id}}')
|
||||
span=env.t('data')
|
||||
|
|
|
|||
Loading…
Reference in a new issue