mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Revert "Revert "allow hatching potions to have a release date""
This reverts commit 485584c144.
# Conflicts:
# website/common/script/content/hatching-potions.js
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
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) => {
|
||||
@@ -412,17 +410,10 @@ applyEggDefaults(quests, {
|
||||
},
|
||||
});
|
||||
|
||||
function filterEggs (eggs) {
|
||||
return filterReleased(eggs, 'key', EGGS_RELEASE_DATES);
|
||||
}
|
||||
const all = assign({}, drops, quests);
|
||||
|
||||
const memoizedFilter = datedMemoize(filterEggs);
|
||||
|
||||
export default {
|
||||
get drops () {
|
||||
return memoizedFilter({ memoizeConfig: true, identifier: 'drops' }, drops);
|
||||
},
|
||||
get quests () {
|
||||
return memoizedFilter({ memoizeConfig: true, identifier: 'quests' }, quests);
|
||||
},
|
||||
export {
|
||||
drops,
|
||||
quests,
|
||||
all,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user