mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 04:00:36 +00:00
feat(quests): Allow purchase of quest pets
Implements purchase in the Market of the two currently available pet quest eggs, after the user has completed the corresponding quest at least twice. This is a hard-code solution; @lefnire or others a little more adept in Angular might be able to make this generic and extensible with an ng-repeat--I just couldn't get the expression quite right.
This commit is contained in:
parent
d62d94c4fc
commit
7102943aa1
1 changed files with 11 additions and 1 deletions
|
|
@ -97,11 +97,21 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
|
||||||
menu.inventory-list(type='list')
|
menu.inventory-list(type='list')
|
||||||
li.customize-menu
|
li.customize-menu
|
||||||
menu.pets-menu(label=env.t('eggs'))
|
menu.pets-menu(label=env.t('eggs'))
|
||||||
div(ng-repeat='egg in Content.eggs', ng-if='egg.canBuy||user.achievements.quests.[egg.key.toLowercase()]>1')
|
div(ng-repeat='egg in Content.eggs', ng-if='egg.canBuy')
|
||||||
button.customize-option(popover='{{egg.notes}}', popover-title='{{egg.text}} Egg', popover-trigger='mouseenter', popover-placement='left', ng-click='purchase("eggs", egg)', class='Pet_Egg_{{egg.key}}')
|
button.customize-option(popover='{{egg.notes}}', popover-title='{{egg.text}} Egg', popover-trigger='mouseenter', popover-placement='left', ng-click='purchase("eggs", egg)', class='Pet_Egg_{{egg.key}}')
|
||||||
p
|
p
|
||||||
| {{egg.value}}
|
| {{egg.value}}
|
||||||
span.Pet_Currency_Gem1x.inline-gems
|
span.Pet_Currency_Gem1x.inline-gems
|
||||||
|
div(ng-show='user.achievements.quests.gryphon > 1')
|
||||||
|
button.customize-option(popover='{{Content.eggs.Gryphon.notes}}', popover-title='{{Content.eggs.Gryphon.text}} Egg', popover-trigger='mouseenter', popover-placement='left', ng-click='purchase("eggs", Content.eggs.Gryphon)', class='Pet_Egg_Gryphon')
|
||||||
|
p
|
||||||
|
| {{Content.eggs.Gryphon.value}}
|
||||||
|
span.Pet_Currency_Gem1x.inline-gems
|
||||||
|
div(ng-show='user.achievements.quests.hedgehog > 1')
|
||||||
|
button.customize-option(popover='{{Content.eggs.Hedgehog.notes}}', popover-title='{{Content.eggs.Hedgehog.text}} Egg', popover-trigger='mouseenter', popover-placement='left', ng-click='purchase("eggs", Content.eggs.Hedgehog)', class='Pet_Egg_Hedgehog')
|
||||||
|
p
|
||||||
|
| {{Content.eggs.Hedgehog.value}}
|
||||||
|
span.Pet_Currency_Gem1x.inline-gems
|
||||||
|
|
||||||
li.customize-menu
|
li.customize-menu
|
||||||
menu.pets-menu(label=env.t('hatchingPotions'))
|
menu.pets-menu(label=env.t('hatchingPotions'))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue