feat(content): Veggie Hatching Potions

This commit is contained in:
Sabe Jones
2019-03-26 15:45:29 -05:00
parent 33c639e28b
commit 1195560b0c
10 changed files with 52 additions and 5 deletions

View File

@@ -229,7 +229,7 @@ each(wacky, (pot, key) => {
});
});
let all = assign({}, drops, premium);
let all = assign({}, drops, premium, wacky);
module.exports = {
drops,

View File

@@ -356,12 +356,14 @@ api.timeTravelStable = {
api.dropHatchingPotions = hatchingPotions.drops;
api.premiumHatchingPotions = hatchingPotions.premium;
api.wackyHatchingPotions = hatchingPotions.wacky;
api.hatchingPotions = hatchingPotions.all;
api.pets = stable.dropPets;
api.premiumPets = stable.premiumPets;
api.questPets = stable.questPets;
api.specialPets = stable.specialPets;
api.wackyPets = stable.wackyPets;
api.petInfo = stable.petInfo;
api.mounts = stable.dropMounts;

View File

@@ -6,6 +6,7 @@ import {
import {
drops as dropPotions,
premium as premiumPotions,
wacky as wackyPotions,
} from './hatching-potions';
import t from './translation';
@@ -47,9 +48,38 @@ function constructSet (type, eggs, potions) {
return [pets, mounts];
}
function constructPetOnlySet (type, eggs, potions) {
let pets = {};
each(eggs, (egg) => {
each(potions, (potion) => {
let key = `${egg.key}-${potion.key}`;
function getAnimalData (text) {
return {
key,
type,
potion: potion.key,
egg: egg.key,
text,
};
}
petInfo[key] = getAnimalData(t('petName', {
potion: potion.text,
egg: egg.text,
}));
pets[key] = true;
});
});
return pets;
}
let [dropPets, dropMounts] = constructSet('drop', dropEggs, dropPotions);
let [premiumPets, premiumMounts] = constructSet('premium', dropEggs, premiumPotions);
let [questPets, questMounts] = constructSet('quest', questEggs, dropPotions);
let wackyPets = constructPetOnlySet('wacky', dropEggs, wackyPotions);
let specialPets = {
'Wolf-Veteran': 'veteranWolf',
@@ -113,6 +143,7 @@ module.exports = {
dropPets,
premiumPets,
questPets,
wackyPets,
dropMounts,
questMounts,
premiumMounts,