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 * as wonderconGear from './special-wondercon';
|
||||||
import t from '../../../translation';
|
import t from '../../../translation';
|
||||||
|
|
||||||
const CURRENT_EVENT = find(EVENTS, event => {
|
const CURRENT_EVENT = find(EVENTS, event => moment().isBetween(event.start, event.end));
|
||||||
moment().isBetween(event.start, event.end);
|
|
||||||
});
|
|
||||||
|
|
||||||
const gearEvents = cloneDeep(EVENTS);
|
const gearEvents = cloneDeep(EVENTS);
|
||||||
['winter', 'birthday', 'gaymerx', 'noCurrentEvent2020', 'winter2021NoPromo', 'noCurrentEvent2021'].forEach(nonGearEvent => {
|
['winter', 'birthday', 'gaymerx', 'noCurrentEvent2020', 'winter2021NoPromo', 'noCurrentEvent2021'].forEach(nonGearEvent => {
|
||||||
|
|||||||
@@ -410,7 +410,10 @@ const premium = {
|
|||||||
canBuy: hasQuestAchievementFunction('blackPearl'),
|
canBuy: hasQuestAchievementFunction('blackPearl'),
|
||||||
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
_addlNotes: t('premiumPotionUnlimitedNotes'),
|
||||||
},
|
},
|
||||||
StainedGlass: {
|
};
|
||||||
|
|
||||||
|
if (moment().isAfter('2020-12-22T08:00-04:00')) {
|
||||||
|
premium.StainedGlass = {
|
||||||
value: 2,
|
value: 2,
|
||||||
text: t('hatchingPotionStainedGlass'),
|
text: t('hatchingPotionStainedGlass'),
|
||||||
limited: true,
|
limited: true,
|
||||||
@@ -421,8 +424,8 @@ const premium = {
|
|||||||
canBuy () {
|
canBuy () {
|
||||||
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
return moment().isBetween('2020-12-22T08:00-04:00', '2021-01-31T20:00-04:00');
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
const wacky = {
|
const wacky = {
|
||||||
Veggie: {
|
Veggie: {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import moment from 'moment';
|
|||||||
// path: 'premiumHatchingPotions.Rainbow',
|
// path: 'premiumHatchingPotions.Rainbow',
|
||||||
const featuredItems = {
|
const featuredItems = {
|
||||||
market () {
|
market () {
|
||||||
if (moment().isBefore('2020-12-17T08:00-04:00')) {
|
if (moment().isBefore('2020-12-22T08:00-04:00')) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
type: 'armoire',
|
type: 'armoire',
|
||||||
|
|||||||
Reference in New Issue
Block a user