mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
fix(event): more find syntax, fix featured items, no spoilers
This commit is contained in:
@@ -14,9 +14,7 @@ import * as takeThisGear from './special-takeThis';
|
||||
import * as wonderconGear from './special-wondercon';
|
||||
import t from '../../../translation';
|
||||
|
||||
const CURRENT_EVENT = find(EVENTS, event => {
|
||||
moment().isBetween(event.start, event.end);
|
||||
});
|
||||
const CURRENT_EVENT = find(EVENTS, event => moment().isBetween(event.start, event.end));
|
||||
|
||||
const gearEvents = cloneDeep(EVENTS);
|
||||
['winter', 'birthday', 'gaymerx', 'noCurrentEvent2020', 'winter2021NoPromo', 'noCurrentEvent2021'].forEach(nonGearEvent => {
|
||||
|
||||
@@ -410,7 +410,10 @@ const premium = {
|
||||
canBuy: hasQuestAchievementFunction('blackPearl'),
|
||||
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
||||
},
|
||||
StainedGlass: {
|
||||
};
|
||||
|
||||
if (moment().isAfter('2020-12-22T08:00-04:00')) {
|
||||
premium.StainedGlass = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionStainedGlass'),
|
||||
limited: true,
|
||||
@@ -421,8 +424,8 @@ const premium = {
|
||||
canBuy () {
|
||||
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
const wacky = {
|
||||
Veggie: {
|
||||
|
||||
@@ -4,7 +4,7 @@ import moment from 'moment';
|
||||
// path: 'premiumHatchingPotions.Rainbow',
|
||||
const featuredItems = {
|
||||
market () {
|
||||
if (moment().isBefore('2020-12-17T08:00-04:00')) {
|
||||
if (moment().isBefore('2020-12-22T08:00-04:00')) {
|
||||
return [
|
||||
{
|
||||
type: 'armoire',
|
||||
|
||||
Reference in New Issue
Block a user