mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
Fix content name error (#7995)
* fix: correct translation strings for pet/mount names * chore: expose potion and egg key, not object in pet content api * fix: Update feed route to use potion and egg objects * refactor: Update feed route to use petInfo * Use pet/mount text method for name * correct feed route
This commit is contained in:
parent
295463b210
commit
3d53781bd3
9 changed files with 82 additions and 120 deletions
|
|
@ -71,8 +71,8 @@
|
|||
"earnedSteed": "By completing your tasks, you've earned a faithful steed!",
|
||||
"rideNow": "Ride Now",
|
||||
"rideLater": "Ride Later",
|
||||
"petName": "<%= potion %> <%= egg %>",
|
||||
"mountName": "<%= potion %> <%= mount %>",
|
||||
"petName": "<%= potion(locale) %> <%= egg(locale) %>",
|
||||
"mountName": "<%= potion(locale) %> <%= mount(locale) %>",
|
||||
"petKeyName": "Key to the Kennels",
|
||||
"petKeyPop": "Let your pets roam free, release them to start their own adventure, and give yourself the thrill of Beast Master once more!",
|
||||
"petKeyBegin": "Key to the Kennels: Experience <%= title %> Once More!",
|
||||
|
|
|
|||
|
|
@ -26,19 +26,19 @@ function constructSet (type, eggs, potions) {
|
|||
return {
|
||||
key,
|
||||
type,
|
||||
potion,
|
||||
egg,
|
||||
potion: potion.key,
|
||||
egg: egg.key,
|
||||
text,
|
||||
};
|
||||
}
|
||||
|
||||
petInfo[key] = getAnimalData(t('petName', {
|
||||
potion: potion.text(),
|
||||
egg: egg.text(),
|
||||
potion: potion.text,
|
||||
egg: egg.text,
|
||||
}));
|
||||
mountInfo[key] = getAnimalData(t('mountName', {
|
||||
potion: potion.text(),
|
||||
mount: egg.mountText(),
|
||||
potion: potion.text,
|
||||
mount: egg.mountText,
|
||||
}));
|
||||
|
||||
pets[key] = true;
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@ import {
|
|||
NotFound,
|
||||
} from '../libs/errors';
|
||||
|
||||
function evolve (user, pet, petDisplayName, req) {
|
||||
user.items.pets[pet] = -1;
|
||||
user.items.mounts[pet] = true;
|
||||
function evolve (user, pet, req) {
|
||||
user.items.pets[pet.key] = -1;
|
||||
user.items.mounts[pet.key] = true;
|
||||
|
||||
if (pet === user.items.currentPet) {
|
||||
if (pet.key === user.items.currentPet) {
|
||||
user.items.currentPet = '';
|
||||
}
|
||||
|
||||
return i18n.t('messageEvolve', {
|
||||
egg: petDisplayName,
|
||||
egg: pet.text(req.language),
|
||||
}, req.language);
|
||||
}
|
||||
|
||||
|
|
@ -26,7 +26,9 @@ module.exports = function feed (user, req = {}) {
|
|||
|
||||
if (!pet || !foodK) throw new BadRequest(i18n.t('missingPetFoodFeed', req.language));
|
||||
|
||||
if (pet.indexOf('-') === -1) {
|
||||
pet = content.petInfo[pet];
|
||||
|
||||
if (!pet) {
|
||||
throw new BadRequest(i18n.t('invalidPetName', req.language));
|
||||
}
|
||||
|
||||
|
|
@ -37,53 +39,42 @@ module.exports = function feed (user, req = {}) {
|
|||
|
||||
let userPets = user.items.pets;
|
||||
|
||||
if (!userPets[pet]) {
|
||||
if (!userPets[pet.key]) {
|
||||
throw new NotFound(i18n.t('messagePetNotFound', req.language));
|
||||
}
|
||||
|
||||
let [egg, potion] = pet.split('-');
|
||||
|
||||
let potionText = content.hatchingPotions[potion] ? content.hatchingPotions[potion].text(req.language) : potion;
|
||||
let eggText = content.eggs[egg] ? content.eggs[egg].text(req.language) : egg;
|
||||
|
||||
let petDisplayName = i18n.t('petName', {
|
||||
potion: potionText,
|
||||
egg: eggText,
|
||||
}, req.language);
|
||||
|
||||
if (!user.items.food[food.key]) {
|
||||
throw new NotFound(i18n.t('messageFoodNotFound', req.language));
|
||||
}
|
||||
|
||||
if (content.specialPets[pet]) {
|
||||
if (pet.type === 'special') {
|
||||
throw new NotAuthorized(i18n.t('messageCannotFeedPet', req.language));
|
||||
}
|
||||
|
||||
if (user.items.mounts[pet]) {
|
||||
if (user.items.mounts[pet.key]) {
|
||||
throw new NotAuthorized(i18n.t('messageAlreadyMount', req.language));
|
||||
}
|
||||
|
||||
let message;
|
||||
|
||||
if (food.key === 'Saddle') {
|
||||
message = evolve(user, pet, petDisplayName, req);
|
||||
message = evolve(user, pet, req);
|
||||
} else {
|
||||
if (food.target === potion || content.hatchingPotions[potion].premium) {
|
||||
userPets[pet] += 5;
|
||||
message = i18n.t('messageLikesFood', {
|
||||
egg: petDisplayName,
|
||||
foodText: food.text(req.language),
|
||||
}, req.language);
|
||||
let messageParams = {
|
||||
egg: pet.text(req.language),
|
||||
foodText: food.text(req.language),
|
||||
};
|
||||
|
||||
if (food.target === pet.potion || pet.type === 'premium') {
|
||||
userPets[pet.key] += 5;
|
||||
message = i18n.t('messageLikesFood', messageParams, req.language);
|
||||
} else {
|
||||
userPets[pet] += 2;
|
||||
message = i18n.t('messageDontEnjoyFood', {
|
||||
egg: petDisplayName,
|
||||
foodText: food.text(req.language),
|
||||
}, req.language);
|
||||
userPets[pet.key] += 2;
|
||||
message = i18n.t('messageDontEnjoyFood', messageParams, req.language);
|
||||
}
|
||||
|
||||
if (userPets[pet] >= 50 && !user.items.mounts[pet]) {
|
||||
message = evolve(user, pet, petDisplayName, req);
|
||||
if (userPets[pet.key] >= 50 && !user.items.mounts[pet.key]) {
|
||||
message = evolve(user, pet, req);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -91,11 +82,11 @@ module.exports = function feed (user, req = {}) {
|
|||
|
||||
if (req.v2 === true) {
|
||||
return {
|
||||
value: userPets[pet],
|
||||
value: userPets[pet.key],
|
||||
};
|
||||
} else {
|
||||
return [
|
||||
userPets[pet],
|
||||
userPets[pet.key],
|
||||
message,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,19 +22,14 @@ describe('POST /user/feed/:pet/:food', () => {
|
|||
});
|
||||
|
||||
let food = content.food.Milk;
|
||||
let [egg, potion] = 'Wolf-Base'.split('-');
|
||||
let potionText = content.hatchingPotions[potion] ? content.hatchingPotions[potion].text() : potion;
|
||||
let eggText = content.eggs[egg] ? content.eggs[egg].text() : egg;
|
||||
let pet = content.petInfo['Wolf-Base'];
|
||||
|
||||
let res = await user.post('/user/feed/Wolf-Base/Milk');
|
||||
await user.sync();
|
||||
expect(res).to.eql({
|
||||
data: user.items.pets['Wolf-Base'],
|
||||
message: t('messageDontEnjoyFood', {
|
||||
egg: t('petName', {
|
||||
potion: potionText,
|
||||
egg: eggText,
|
||||
}),
|
||||
egg: pet.text(),
|
||||
foodText: food.text(),
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ describe('shared.ops.feed', () => {
|
|||
}
|
||||
});
|
||||
|
||||
it('does not allow feeding if food does not exists', (done) => {
|
||||
it('does not allow feeding if food does not exist', (done) => {
|
||||
try {
|
||||
feed(user, {params: {pet: 'valid-pet', food: 'invalid food name'}});
|
||||
feed(user, {params: {pet: 'Wolf-Red', food: 'invalid food name'}});
|
||||
} catch (err) {
|
||||
expect(err).to.be.an.instanceof(NotFound);
|
||||
expect(err.message).to.equal(i18n.t('messageFoodNotFound'));
|
||||
|
|
@ -50,7 +50,7 @@ describe('shared.ops.feed', () => {
|
|||
|
||||
it('does not allow feeding if pet is not owned', (done) => {
|
||||
try {
|
||||
feed(user, {params: {pet: 'not-owned', food: 'Meat'}});
|
||||
feed(user, {params: {pet: 'Wolf-Red', food: 'Meat'}});
|
||||
} catch (err) {
|
||||
expect(err).to.be.an.instanceof(NotFound);
|
||||
expect(err.message).to.equal(i18n.t('messagePetNotFound'));
|
||||
|
|
@ -100,18 +100,12 @@ describe('shared.ops.feed', () => {
|
|||
user.items.pets['Wolf-Base'] = 5;
|
||||
user.items.food.Saddle = 2;
|
||||
user.items.currentPet = 'Wolf-Base';
|
||||
let [egg, potion] = 'Wolf-Base'.split('-');
|
||||
|
||||
let potionText = content.hatchingPotions[potion] ? content.hatchingPotions[potion].text() : potion;
|
||||
let eggText = content.eggs[egg] ? content.eggs[egg].text() : egg;
|
||||
let pet = content.petInfo['Wolf-Base'];
|
||||
|
||||
let [data, message] = feed(user, {params: {pet: 'Wolf-Base', food: 'Saddle'}});
|
||||
expect(data).to.eql(user.items.pets['Wolf-Base']);
|
||||
expect(message).to.eql(i18n.t('messageEvolve', {
|
||||
egg: i18n.t('petName', {
|
||||
potion: potionText,
|
||||
egg: eggText,
|
||||
}),
|
||||
egg: pet.text(),
|
||||
}));
|
||||
|
||||
expect(user.items.food.Saddle).to.equal(1);
|
||||
|
|
@ -125,17 +119,12 @@ describe('shared.ops.feed', () => {
|
|||
user.items.food.Meat = 2;
|
||||
|
||||
let food = content.food.Meat;
|
||||
let [egg, potion] = 'Wolf-Base'.split('-');
|
||||
let potionText = content.hatchingPotions[potion] ? content.hatchingPotions[potion].text() : potion;
|
||||
let eggText = content.eggs[egg] ? content.eggs[egg].text() : egg;
|
||||
let pet = content.petInfo['Wolf-Base'];
|
||||
|
||||
let [data, message] = feed(user, {params: {pet: 'Wolf-Base', food: 'Meat'}});
|
||||
expect(data).to.eql(user.items.pets['Wolf-Base']);
|
||||
expect(message).to.eql(i18n.t('messageLikesFood', {
|
||||
egg: i18n.t('petName', {
|
||||
potion: potionText,
|
||||
egg: eggText,
|
||||
}),
|
||||
egg: pet.text(),
|
||||
foodText: food.text(),
|
||||
}));
|
||||
|
||||
|
|
@ -148,17 +137,12 @@ describe('shared.ops.feed', () => {
|
|||
user.items.food.Milk = 2;
|
||||
|
||||
let food = content.food.Milk;
|
||||
let [egg, potion] = 'Wolf-Spooky'.split('-');
|
||||
let potionText = content.hatchingPotions[potion] ? content.hatchingPotions[potion].text() : potion;
|
||||
let eggText = content.eggs[egg] ? content.eggs[egg].text() : egg;
|
||||
let pet = content.petInfo['Wolf-Spooky'];
|
||||
|
||||
let [data, message] = feed(user, {params: {pet: 'Wolf-Spooky', food: 'Milk'}});
|
||||
expect(data).to.eql(user.items.pets['Wolf-Spooky']);
|
||||
expect(message).to.eql(i18n.t('messageLikesFood', {
|
||||
egg: i18n.t('petName', {
|
||||
potion: potionText,
|
||||
egg: eggText,
|
||||
}),
|
||||
egg: pet.text(),
|
||||
foodText: food.text(),
|
||||
}));
|
||||
|
||||
|
|
@ -171,17 +155,12 @@ describe('shared.ops.feed', () => {
|
|||
user.items.food.Milk = 2;
|
||||
|
||||
let food = content.food.Milk;
|
||||
let [egg, potion] = 'Wolf-Base'.split('-');
|
||||
let potionText = content.hatchingPotions[potion] ? content.hatchingPotions[potion].text() : potion;
|
||||
let eggText = content.eggs[egg] ? content.eggs[egg].text() : egg;
|
||||
let pet = content.petInfo['Wolf-Base'];
|
||||
|
||||
let [data, message] = feed(user, {params: {pet: 'Wolf-Base', food: 'Milk'}});
|
||||
expect(data).to.eql(user.items.pets['Wolf-Base']);
|
||||
expect(message).to.eql(i18n.t('messageDontEnjoyFood', {
|
||||
egg: i18n.t('petName', {
|
||||
potion: potionText,
|
||||
egg: eggText,
|
||||
}),
|
||||
egg: pet.text(),
|
||||
foodText: food.text(),
|
||||
}));
|
||||
|
||||
|
|
@ -194,17 +173,12 @@ describe('shared.ops.feed', () => {
|
|||
user.items.food.Milk = 2;
|
||||
user.items.currentPet = 'Wolf-Base';
|
||||
|
||||
let [egg, potion] = 'Wolf-Base'.split('-');
|
||||
let potionText = content.hatchingPotions[potion] ? content.hatchingPotions[potion].text() : potion;
|
||||
let eggText = content.eggs[egg] ? content.eggs[egg].text() : egg;
|
||||
let pet = content.petInfo['Wolf-Base'];
|
||||
|
||||
let [data, message] = feed(user, {params: {pet: 'Wolf-Base', food: 'Milk'}});
|
||||
expect(data).to.eql(user.items.pets['Wolf-Base']);
|
||||
expect(message).to.eql(i18n.t('messageEvolve', {
|
||||
egg: i18n.t('petName', {
|
||||
potion: potionText,
|
||||
egg: eggText,
|
||||
}),
|
||||
egg: pet.text(),
|
||||
}));
|
||||
|
||||
expect(user.items.food.Milk).to.equal(1);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ export function expectValidTranslationString (attribute) {
|
|||
|
||||
let translatedString = attribute();
|
||||
|
||||
expect(translatedString).to.not.be.empty;
|
||||
expect(translatedString.trim()).to.not.be.empty;
|
||||
expect(translatedString).to.not.contain('function func(lang)');
|
||||
expect(translatedString).to.not.eql(STRING_ERROR_MSG);
|
||||
expect(translatedString).to.not.match(STRING_DOES_NOT_EXIST_MSG);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,11 +180,8 @@ habitrpg.controller("InventoryCtrl",
|
|||
}
|
||||
|
||||
$scope.choosePet = function(egg, potion){
|
||||
var petDisplayName = env.t('petName', {
|
||||
potion: Content.hatchingPotions[potion] ? Content.hatchingPotions[potion].text() : potion,
|
||||
egg: Content.eggs[egg] ? Content.eggs[egg].text() : egg
|
||||
}),
|
||||
pet = egg + '-' + potion;
|
||||
var pet = Content.petInfo[egg + '-' + potion];
|
||||
var petDisplayName = pet.text();
|
||||
|
||||
// Feeding Pet
|
||||
if ($scope.selectedFood) {
|
||||
|
|
@ -195,14 +192,14 @@ habitrpg.controller("InventoryCtrl",
|
|||
} else if (!$window.confirm(window.env.t('feedPet', {name: petDisplayName, article: food.article, text: food.text()}))) {
|
||||
return;
|
||||
}
|
||||
User.feed({params:{pet: pet, food: food.key}});
|
||||
User.feed({params:{pet: pet.key, food: food.key}});
|
||||
$scope.selectedFood = null;
|
||||
|
||||
_updateDropAnimalCount(user.items);
|
||||
if ($rootScope.countExists(user.items.mounts) > startingMounts && !user.preferences.suppressModals.raisePet) {
|
||||
$scope.raisedPet = {
|
||||
displayName: petDisplayName,
|
||||
spriteName: pet,
|
||||
spriteName: pet.key,
|
||||
egg: egg,
|
||||
potion: potion
|
||||
}
|
||||
|
|
@ -221,7 +218,7 @@ habitrpg.controller("InventoryCtrl",
|
|||
|
||||
// Selecting Pet
|
||||
} else {
|
||||
User.equip({params:{type: 'pet', key: pet}});
|
||||
User.equip({params:{type: 'pet', key: pet.key}});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ mixin mountList(eggSource, potionSource)
|
|||
li.customize-menu
|
||||
menu
|
||||
each potion in potionSource
|
||||
- mount = egg.key+"-"+potion.key
|
||||
div(popover-trigger='mouseenter', popover=env.t('mountName', {potion: potion.text(env.language.code), mount: egg.mountText(env.language.code)}), popover-placement='bottom')
|
||||
button(class="pet-button Mount_Icon_#{mount}", ng-show='user.items.mounts["#{mount}"]', ng-class='{active: user.items.currentMount == "#{mount}"}', ng-click='chooseMount("#{egg.key}", "#{potion.key}")')
|
||||
button(class="pet-button mount-not-owned", ng-if='!user.items.mounts["#{mount}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"] || user.items.pets["#{mount}"])')
|
||||
- var mountKey = egg.key+"-"+potion.key
|
||||
- var mount = env.Content.mountInfo[mountKey]
|
||||
div(popover-trigger='mouseenter', popover=mount.text(), popover-placement='bottom')
|
||||
button(class="pet-button Mount_Icon_#{mountKey}", ng-show='user.items.mounts["#{mountKey}"]', ng-class='{active: user.items.currentMount == "#{mountKey}"}', ng-click='chooseMount("#{egg.key}", "#{potion.key}")')
|
||||
button(class="pet-button mount-not-owned", ng-if='!user.items.mounts["#{mountKey}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"] || user.items.pets["#{mountKey}"])')
|
||||
.PixelPaw
|
||||
-}
|
||||
|
||||
|
|
@ -32,10 +33,11 @@ mixin mountList(eggSource, potionSource)
|
|||
li.customize-menu
|
||||
menu
|
||||
each egg in env.Content.dropEggs
|
||||
- mount = egg.key+"-"+potion.key
|
||||
div(popover-trigger='mouseenter', popover=env.t('mountName', {potion: potion.text(env.language.code), mount: egg.mountText(env.language.code)}), popover-placement='bottom')
|
||||
button(class="pet-button Mount_Icon_#{mount}", ng-show='user.items.mounts["#{mount}"]', ng-class='{active: user.items.currentMount == "#{mount}"}', ng-click='chooseMount("#{egg.key}", "#{potion.key}")')
|
||||
button(class="pet-button mount-not-owned", ng-if='!user.items.mounts["#{mount}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"] || user.items.pets["#{mount}"])')
|
||||
- var mountKey = egg.key + "-" + potion.key
|
||||
- var mount = env.Content.mountInfo[mountKey]
|
||||
div(popover-trigger='mouseenter', popover=mount.text(), popover-placement='bottom')
|
||||
button(class="pet-button Mount_Icon_#{mountKey}", ng-show='user.items.mounts["#{mountKey}"]', ng-class='{active: user.items.currentMount == "#{mountKey}"}', ng-click='chooseMount("#{egg.key}", "#{potion.key}")')
|
||||
button(class="pet-button mount-not-owned", ng-if='!user.items.mounts["#{mountKey}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"] || user.items.pets["#{mountKey}"])')
|
||||
.PixelPaw
|
||||
.row: .col-md-12
|
||||
h4=env.t('questMounts')
|
||||
|
|
|
|||
|
|
@ -4,14 +4,15 @@ mixin petList(eggSource, potionSource)
|
|||
li.customize-menu
|
||||
menu
|
||||
each potion in potionSource
|
||||
- pet = egg.key+"-"+potion.key
|
||||
div(popover-trigger='mouseenter', popover=env.t('petName', {potion: potion.text(env.language.code), egg: egg.text(env.language.code)}), popover-placement='bottom')
|
||||
button(class="pet-button Pet-#{pet}", ng-if='user.items.pets["#{pet}"]>0', ng-class='{active: user.items.currentPet == "#{pet}", selectableInventory: #{!egg.noMount} && selectedFood && !user.items.mounts["#{pet}"]}', ng-click='choosePet("#{egg.key}", "#{potion.key}")')
|
||||
.progress(ng-show='!user.items.mounts["#{pet}"]')
|
||||
.progress-bar.progress-bar-success(ng-style='{width: user.items.pets["#{pet}"]/.5 + "%"}')
|
||||
button(class="pet-button pet-not-owned", ng-if='!user.items.pets["#{pet}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"])')
|
||||
- var petKey = egg.key+"-"+potion.key
|
||||
- var pet = env.Content.petInfo[petKey]
|
||||
div(popover-trigger='mouseenter', popover=pet.text(), popover-placement='bottom')
|
||||
button(class="pet-button Pet-#{petKey}", ng-if='user.items.pets["#{petKey}"]>0', ng-class='{active: user.items.currentPet == "#{petKey}", selectableInventory: #{!egg.noMount} && selectedFood && !user.items.mounts["#{petKey}"]}', ng-click='choosePet("#{egg.key}", "#{potion.key}")')
|
||||
.progress(ng-show='!user.items.mounts["#{petKey}"]')
|
||||
.progress-bar.progress-bar-success(ng-style='{width: user.items.pets["#{petKey}"]/.5 + "%"}')
|
||||
button(class="pet-button pet-not-owned", ng-if='!user.items.pets["#{petKey}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"])')
|
||||
.PixelPaw
|
||||
button(class="pet-evolved pet-button Pet-#{pet}", ng-if='user.items.pets["#{pet}"]<0')
|
||||
button(class="pet-evolved pet-button Pet-#{petKey}", ng-if='user.items.pets["#{petKey}"]<0')
|
||||
|
||||
.container-fluid
|
||||
.stable.row: .col-xs-12
|
||||
|
|
@ -32,14 +33,15 @@ mixin petList(eggSource, potionSource)
|
|||
li.customize-menu(ng-if="::shouldShowPremiumPetRow('#{potion.key}')")
|
||||
menu
|
||||
each egg in env.Content.dropEggs
|
||||
- pet = egg.key+"-"+potion.key
|
||||
div(popover-trigger='mouseenter', popover=env.t('petName', {potion: potion.text(env.language.code), egg: egg.text(env.language.code)}), popover-placement='bottom')
|
||||
button(class="pet-button Pet-#{pet}", ng-if='user.items.pets["#{pet}"]>0', ng-class='{active: user.items.currentPet == "#{pet}", selectableInventory: #{!egg.noMount} && selectedFood && !user.items.mounts["#{pet}"]}', ng-click='choosePet("#{egg.key}", "#{potion.key}")')
|
||||
.progress(ng-show='!user.items.mounts["#{pet}"]')
|
||||
.progress-bar.progress-bar-success(ng-style='{width: user.items.pets["#{pet}"]/.5 + "%"}')
|
||||
button(class="pet-button pet-not-owned", ng-if='!user.items.pets["#{pet}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"])')
|
||||
- var petKey = egg.key+"-"+potion.key
|
||||
- var pet = env.Content.petInfo[petKey]
|
||||
div(popover-trigger='mouseenter', popover=pet.text(), popover-placement='bottom')
|
||||
button(class="pet-button Pet-#{petKey}", ng-if='user.items.pets["#{petKey}"]>0', ng-class='{active: user.items.currentPet == "#{petKey}", selectableInventory: #{!egg.noMount} && selectedFood && !user.items.mounts["#{petKey}"]}', ng-click='choosePet("#{egg.key}", "#{potion.key}")')
|
||||
.progress(ng-show='!user.items.mounts["#{petKey}"]')
|
||||
.progress-bar.progress-bar-success(ng-style='{width: user.items.pets["#{petKey}"]/.5 + "%"}')
|
||||
button(class="pet-button pet-not-owned", ng-if='!user.items.pets["#{petKey}"] && (#{potion.canBuy()} || user.items.hatchingPotions["#{potion.key}"])')
|
||||
.PixelPaw
|
||||
button(class="pet-evolved pet-button Pet-#{pet}", ng-if='user.items.pets["#{pet}"]<0')
|
||||
button(class="pet-evolved pet-button Pet-#{petKey}", ng-if='user.items.pets["#{petKey}"]<0')
|
||||
.row: .col-md-12
|
||||
h4=env.t('questPets')
|
||||
+petList(env.Content.questEggs,env.Content.dropHatchingPotions)
|
||||
|
|
|
|||
Loading…
Reference in a new issue