mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Revert "allow hatching potions to have a release date"
This reverts commit ebdac0b388.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import assign from 'lodash/assign';
|
||||
import defaults from 'lodash/defaults';
|
||||
import each from 'lodash/each';
|
||||
import t from './translation';
|
||||
import { filterReleased } from './is_released';
|
||||
import { EGGS_RELEASE_DATES } from './constants/release_dates';
|
||||
import datedMemoize from '../fns/datedMemoize';
|
||||
|
||||
function applyEggDefaults (set, config) {
|
||||
each(set, (egg, key) => {
|
||||
@@ -410,10 +412,17 @@ applyEggDefaults(quests, {
|
||||
},
|
||||
});
|
||||
|
||||
const all = assign({}, drops, quests);
|
||||
function filterEggs (eggs) {
|
||||
return filterReleased(eggs, 'key', EGGS_RELEASE_DATES);
|
||||
}
|
||||
|
||||
export {
|
||||
drops,
|
||||
quests,
|
||||
all,
|
||||
const memoizedFilter = datedMemoize(filterEggs);
|
||||
|
||||
export default {
|
||||
get drops () {
|
||||
return memoizedFilter({ memoizeConfig: true, identifier: 'drops' }, drops);
|
||||
},
|
||||
get quests () {
|
||||
return memoizedFilter({ memoizeConfig: true, identifier: 'quests' }, quests);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user