diff --git a/common/script/src/content/hatching-potions.js b/common/script/src/content/hatching-potions.js index bbdab5e872..c230028e6a 100644 --- a/common/script/src/content/hatching-potions.js +++ b/common/script/src/content/hatching-potions.js @@ -1,5 +1,4 @@ -import {each, defaults} from 'lodash'; -import {translator as t} from './helpers'; +import {setHatchingPotionDefaults} from './helpers'; let hatchingPotions = { Base: { @@ -34,15 +33,6 @@ let hatchingPotions = { } }; -each(hatchingPotions, function(potion, key) { - defaults(potion, { - key: key, - value: 2, - text: t(`hatchingPotion${key}`), - notes: t('hatchingPotionNotes', { - potText: potion.text - }), - }); -}); +setHatchingPotionDefaults(hatchingPotions); export default hatchingPotions; diff --git a/common/script/src/content/helpers.js b/common/script/src/content/helpers.js index 4f56ae8daf..794530eab1 100644 --- a/common/script/src/content/helpers.js +++ b/common/script/src/content/helpers.js @@ -171,3 +171,21 @@ export function generateEggs(set, options={}) { return eggs; } + +//---------------------------------------- +// Hatching Potion Helpers +//---------------------------------------- + +export function setHatchingPotionDefaults(hatchingPotions) { + each(hatchingPotions, (potion, key) => { + let text = translator(`hatchingPotion${key}`); + defaults(potion, { + key: key, + value: 2, + text: text, + notes: translator('hatchingPotionNotes', { + potText: text + }), + }); + }); +}