mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
fix(event): include stable
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
import content from 'common/script/content';
|
import content from 'common/script/content';
|
||||||
|
|
||||||
const specialPets = Object.keys(content.specialPets);
|
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) {
|
function getText (textOrFunction) {
|
||||||
if (textOrFunction instanceof Function) {
|
if (textOrFunction instanceof Function) {
|
||||||
@@ -33,10 +36,18 @@ export function isSpecial (animal) {
|
|||||||
|
|
||||||
export function createAnimal (egg, potion, type, _content, userItems) {
|
export function createAnimal (egg, potion, type, _content, userItems) {
|
||||||
let animalKey = `${egg.key}-${potion.key}`;
|
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 {
|
return {
|
||||||
key: animalKey,
|
key: animalKey,
|
||||||
class: type === 'pet' ? `Pet Pet-${animalKey}` : `Mount_Icon_${animalKey}`,
|
class: type === 'pet' ? `Pet Pet-${fooledKey}` : `Mount_Icon_${animalKey}`,
|
||||||
eggKey: egg.key,
|
eggKey: egg.key,
|
||||||
eggName: getText(egg.text),
|
eggName: getText(egg.text),
|
||||||
potionKey: potion.key,
|
potionKey: potion.key,
|
||||||
@@ -59,4 +70,3 @@ export function createAnimal (egg, potion, type, _content, userItems) {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ api.getNews = {
|
|||||||
<h3>Special April Fool's Social Media Challenge!</h3>
|
<h3>Special April Fool's Social Media Challenge!</h3>
|
||||||
<p>For even more fun, check out the <a href='/challenges/b0337534-ec69-4269-8cc6-f74c91881451'>official Challenge</a> 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!</p>
|
<p>For even more fun, check out the <a href='/challenges/b0337534-ec69-4269-8cc6-f74c91881451'>official Challenge</a> 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!</p>
|
||||||
<div class="small mb-3">by Beffymaroo, SabreCat, Piyo, Viirus, and Lemoness</div>
|
<div class="small mb-3">by Beffymaroo, SabreCat, Piyo, Viirus, and Lemoness</div>
|
||||||
|
<div class="npc_aprilFool center-block"></div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user