mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +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:
@@ -2,9 +2,6 @@ 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/release_dates';
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user