Revert "allow hatching potions to have a release date"

This reverts commit ebdac0b388.
This commit is contained in:
Phillip Thelen
2024-06-11 18:19:21 +02:00
parent b83f62bd82
commit 485584c144
9 changed files with 90 additions and 118 deletions

View File

@@ -1,10 +1,7 @@
import assign from 'lodash/assign';
import defaults from 'lodash/defaults';
import each from 'lodash/each';
import { assign } from 'lodash';
import t from './translation';
import datedMemoize from '../fns/datedMemoize';
import { filterReleased } from './is_released';
import { HATCHING_POTIONS_RELEASE_DATES } from './constants/releaseDates';
function hasQuestAchievementFunction (key) {
return user => user.achievements.quests && user.achievements.quests[key] > 0;
@@ -196,23 +193,8 @@ each(wacky, (pot, key) => {
});
});
function filterEggs (eggs) {
return filterReleased(eggs, 'key', HATCHING_POTIONS_RELEASE_DATES);
}
const all = assign({}, drops, premium, wacky);
const memoizedFilter = datedMemoize(filterEggs);
export default {
get drops () {
return memoizedFilter({ memoizeConfig: true, identifier: 'drops' }, drops);
},
get premium () {
return memoizedFilter({ memoizeConfig: true, identifier: 'premium' }, premium);
},
get wacky () {
return memoizedFilter({ memoizeConfig: true, identifier: 'wacky' }, wacky);
},
get all () {
return assign({}, this.drops, this.premium, this.wacky);
},
export {
drops, premium, wacky, all,
};