diff --git a/website/client/assets/css/sprites.css b/website/client/assets/css/sprites.css index 21ad407737..53fe4464fc 100755 --- a/website/client/assets/css/sprites.css +++ b/website/client/assets/css/sprites.css @@ -10,8 +10,8 @@ height: 219px; } -.Pet-HatchingPotion-Veggie { - background: url("~assets/images/Pet-HatchingPotion-Veggie.gif") no-repeat; +.Pet_HatchingPotion_Veggie { + background: url("~assets/images/Pet_HatchingPotion_Veggie.gif") no-repeat; width: 68px; height: 68px; } diff --git a/website/client/assets/images/Pet-HatchingPotion-Veggie.gif b/website/client/assets/images/Pet_HatchingPotion_Veggie.gif similarity index 100% rename from website/client/assets/images/Pet-HatchingPotion-Veggie.gif rename to website/client/assets/images/Pet_HatchingPotion_Veggie.gif diff --git a/website/client/components/inventory/stable/index.vue b/website/client/components/inventory/stable/index.vue index 8e28554320..0fde846804 100644 --- a/website/client/components/inventory/stable/index.vue +++ b/website/client/components/inventory/stable/index.vue @@ -98,7 +98,7 @@ @click="selectPet(context.item)" ) - .btn.btn-flat.btn-show-more(@click="setShowMore(petGroup.key)", v-if='petGroup.key !== "specialPets"') + .btn.btn-flat.btn-show-more(@click="setShowMore(petGroup.key)", v-if='petGroup.key !== "specialPets" && petGroup.key !== "wackyPets"') | {{ $_openedItemRows_isToggled(petGroup.key) ? $t('showLess') : $t('showMore') }} h2 @@ -462,6 +462,14 @@ potions: this.content.dropHatchingPotions, }, }, + { + label: this.$t('filterByWacky'), + key: 'wackyPets', + petSource: { + eggs: this.content.dropEggs, + potions: this.content.wackyHatchingPotions, + }, + }, { label: this.$t('special'), key: 'specialPets', diff --git a/website/client/libs/createAnimal.js b/website/client/libs/createAnimal.js index 0abceb795c..84c7185ba9 100644 --- a/website/client/libs/createAnimal.js +++ b/website/client/libs/createAnimal.js @@ -4,6 +4,7 @@ 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 wackyPets = Object.keys(content.wackyPets); const dropPets = Object.keys(content.pets); function getText (textOrFunction) { @@ -26,6 +27,7 @@ export function isHatchable (animal, userItems) { export function isAllowedToFeed (animal, userItems) { return !specialPets.includes(animal.key) && + !wackyPets.includes(animal.key) && isOwned('pet', animal, userItems) && !isOwned('mount', animal, userItems); } diff --git a/website/common/locales/en/content.json b/website/common/locales/en/content.json index b30e6eb8e4..8ad0e536ac 100644 --- a/website/common/locales/en/content.json +++ b/website/common/locales/en/content.json @@ -281,6 +281,7 @@ "hatchingPotionIcySnow": "Icy Snow", "hatchingPotionRoseQuartz": "Rose Quartz", "hatchingPotionCelestial": "Celestial", + "hatchingPotionVeggie": "Veggie", "hatchingPotionNotes": "Pour this on an egg, and it will hatch as a <%= potText(locale) %> pet.", "premiumPotionAddlNotes": "Not usable on quest pet eggs.", diff --git a/website/common/locales/en/pets.json b/website/common/locales/en/pets.json index 03096ba705..c629c7bd53 100644 --- a/website/common/locales/en/pets.json +++ b/website/common/locales/en/pets.json @@ -7,6 +7,7 @@ "magicPets": "Magic Potion Pets", "rarePets": "Rare Pets", "questPets": "Quest Pets", + "wackyPets": "Wacky Pets", "mounts": "Mounts", "activeMount": "Active Mount", "noActiveMount": "No Active Mount", @@ -129,6 +130,7 @@ "filterByStandard": "Standard", "filterByMagicPotion": "Magic Potion", "filterByQuest": "Quest", + "filterByWacky": "Wacky", "standard": "Standard", "sortByColor": "Color", "sortByHatchable": "Hatchable", diff --git a/website/common/script/content/hatching-potions.js b/website/common/script/content/hatching-potions.js index 9a98781cb1..523edaf08b 100644 --- a/website/common/script/content/hatching-potions.js +++ b/website/common/script/content/hatching-potions.js @@ -229,7 +229,7 @@ each(wacky, (pot, key) => { }); }); -let all = assign({}, drops, premium); +let all = assign({}, drops, premium, wacky); module.exports = { drops, diff --git a/website/common/script/content/index.js b/website/common/script/content/index.js index 09c8e9fda5..e452f1b4bb 100644 --- a/website/common/script/content/index.js +++ b/website/common/script/content/index.js @@ -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; diff --git a/website/common/script/content/stable.js b/website/common/script/content/stable.js index 1c758b2714..bee75eea94 100644 --- a/website/common/script/content/stable.js +++ b/website/common/script/content/stable.js @@ -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, diff --git a/website/server/models/user/schema.js b/website/server/models/user/schema.js index 42871628c8..47504c1e64 100644 --- a/website/server/models/user/schema.js +++ b/website/server/models/user/schema.js @@ -316,7 +316,8 @@ let schema = new Schema({ // Then add additional pets (quest, backer, contributor, premium) _.transform(shared.content.questPets, (m, v, k) => m[k] = Number), _.transform(shared.content.specialPets, (m, v, k) => m[k] = Number), - _.transform(shared.content.premiumPets, (m, v, k) => m[k] = Number) + _.transform(shared.content.premiumPets, (m, v, k) => m[k] = Number), + _.transform(shared.content.wackyPets, (m, v, k) => m[k] = Number) ), currentPet: String, // Cactus-Desert