mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Refactor eggs
This commit is contained in:
@@ -154,19 +154,21 @@ export function generateEggs(set, options={}) {
|
|||||||
let canBuy = options.canBuy;
|
let canBuy = options.canBuy;
|
||||||
|
|
||||||
each(set, (pet) => {
|
each(set, (pet) => {
|
||||||
|
let text = translator(`${type}Egg${pet}Text`);
|
||||||
|
let adj = translator(`${type}Egg${pet}Adjective`);
|
||||||
|
|
||||||
eggs[pet] = {
|
eggs[pet] = {
|
||||||
text: translator(`${type}Egg${pet}Text`),
|
text: text,
|
||||||
mountText: translator(`${type}Egg${pet}MountText`),
|
mountText: translator(`${type}Egg${pet}MountText`),
|
||||||
adjective: translator(`${type}Egg${pet}Adjective`),
|
adjective: adj,
|
||||||
canBuy: canBuy,
|
canBuy: canBuy,
|
||||||
value: 3,
|
value: 3,
|
||||||
key: pet,
|
key: pet,
|
||||||
|
notes: translator('eggNotes', {
|
||||||
|
eggText: text,
|
||||||
|
eggAdjective: adj,
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
eggs[pet].notes = translator('eggNotes', {
|
|
||||||
eggText: eggs[pet].text,
|
|
||||||
eggAdjective: eggs[pet].adjective
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return eggs;
|
return eggs;
|
||||||
|
|||||||
Reference in New Issue
Block a user