diff --git a/website/client/libs/createAnimal.js b/website/client/libs/createAnimal.js index d2f273b3b6..0abceb795c 100644 --- a/website/client/libs/createAnimal.js +++ b/website/client/libs/createAnimal.js @@ -2,6 +2,9 @@ import content from 'common/script/content'; const specialPets = Object.keys(content.specialPets); +const premiumPets = Object.keys(content.premiumPets); +const questPets = Object.keys(content.questPets); +const dropPets = Object.keys(content.pets); function getText (textOrFunction) { if (textOrFunction instanceof Function) { @@ -33,10 +36,18 @@ export function isSpecial (animal) { export function createAnimal (egg, potion, type, _content, userItems) { let animalKey = `${egg.key}-${potion.key}`; + let fooledKey = ''; + if (questPets.includes(animalKey)) { + fooledKey = 'Fox-Veggie'; + } else if (dropPets.includes(animalKey) || premiumPets.includes(animalKey)) { + fooledKey = `${egg.key}-Veggie`; + } else { + fooledKey = animalKey; + } return { key: animalKey, - class: type === 'pet' ? `Pet Pet-${animalKey}` : `Mount_Icon_${animalKey}`, + class: type === 'pet' ? `Pet Pet-${fooledKey}` : `Mount_Icon_${animalKey}`, eggKey: egg.key, eggName: getText(egg.text), potionKey: potion.key, @@ -59,4 +70,3 @@ export function createAnimal (egg, potion, type, _content, userItems) { }, }; } - diff --git a/website/server/controllers/api-v3/news.js b/website/server/controllers/api-v3/news.js index 8b7ca9cae2..8e36f2b911 100644 --- a/website/server/controllers/api-v3/news.js +++ b/website/server/controllers/api-v3/news.js @@ -44,6 +44,7 @@ api.getNews = {
For even more fun, check out the official Challenge posted especially for today! Share your avatar featuring your new fruit and veggie pet on social media between now and April 3, and you'll have a chance to win gems and have your avatar featured on the Habitica Blog!