diff --git a/common/locales/en/content.json b/common/locales/en/content.json index 279c7b5562..ef9240cd91 100644 --- a/common/locales/en/content.json +++ b/common/locales/en/content.json @@ -8,6 +8,7 @@ "armoireNotesEmpty": "The Armoire will have new Equipment in the first week of every month. Until then, keep clicking for Experience and Food!", "dropEggWolfText": "Wolf", + "dropEggWolfMountText": "Wolf", "dropEggWolfAdjective": "loyal", "dropEggTigerCubText": "Tiger Cub", @@ -23,15 +24,19 @@ "dropEggLionCubAdjective": "regal", "dropEggFoxText": "Fox", + "dropEggFoxMountText": "Fox", "dropEggFoxAdjective": "wily", "dropEggFlyingPigText": "Flying Pig", + "dropEggFlyingPigMountText": "Flying Pig", "dropEggFlyingPigAdjective": "whimsical", "dropEggDragonText": "Dragon", + "dropEggDragonMountText": "Dragon", "dropEggDragonAdjective": "mighty", "dropEggCactusText": "Cactus", + "dropEggCactusMountText": "Cactus", "dropEggCactusAdjective": "prickly", "dropEggBearCubText": "Bear Cub", diff --git a/common/script/content/eggs/drops.js b/common/script/content/eggs/drops.js index 91137cb4da..69afe93ede 100644 --- a/common/script/content/eggs/drops.js +++ b/common/script/content/eggs/drops.js @@ -1,46 +1,26 @@ +let each = require('lodash').each; let t = require('../helpers/translator'); -let eggs = { - Wolf: { - text: t('dropEggWolfText'), - adjective: t('dropEggWolfAdjective') - }, - TigerCub: { - text: t('dropEggTigerCubText'), - mountText: t('dropEggTigerCubMountText'), - adjective: t('dropEggTigerCubAdjective') - }, - PandaCub: { - text: t('dropEggPandaCubText'), - mountText: t('dropEggPandaCubMountText'), - adjective: t('dropEggPandaCubAdjective') - }, - LionCub: { - text: t('dropEggLionCubText'), - mountText: t('dropEggLionCubMountText'), - adjective: t('dropEggLionCubAdjective') - }, - Fox: { - text: t('dropEggFoxText'), - adjective: t('dropEggFoxAdjective') - }, - FlyingPig: { - text: t('dropEggFlyingPigText'), - adjective: t('dropEggFlyingPigAdjective') - }, - Dragon: { - text: t('dropEggDragonText'), - adjective: t('dropEggDragonAdjective') - }, - Cactus: { - text: t('dropEggCactusText'), - adjective: t('dropEggCactusAdjective') - }, - BearCub: { - text: t('dropEggBearCubText'), - mountText: t('dropEggBearCubMountText'), - adjective: t('dropEggBearCubAdjective') - }, -}; +const DROP_EGGS = [ + 'Wolf', + 'TigerCub', + 'PandaCub', + 'LionCub', + 'Fox', + 'FlyingPig', + 'Dragon', + 'Cactus', + 'BearCub', +]; + +let eggs = { }; + +each(DROP_EGGS, (pet) => { + eggs[pet] = { + text: t(`dropEgg${pet}Text`), + mountText: t(`dropEgg${pet}MountText`), + adjective: t(`dropEgg${pet}Adjective`), + } +}); module.exports = eggs;