mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
* update(content): add spring fling images, items, and placeholder text * update(dates) : set canonical dates * update(dates/quests): set canonical dates for both, add egg quest availability * update(date): update quest availability start date * update(content): add magic hatching potions * fix(dates): canonical dates * fix(event): add correct event name to potions * fix(dates): canonical dates * fix(dates): fix UTC offset, remove package.json and package-lock.json * fix(dates): canonical * fix: re-added package.json and package-lock.json * update(content): add gear strings * update(content): add Rogue off-hand string, canonical dates
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
import find from 'lodash/find';
|
|
import upperFirst from 'lodash/upperFirst';
|
|
import moment from 'moment';
|
|
import {
|
|
EVENTS,
|
|
SEASONAL_SETS,
|
|
} from '../content/constants';
|
|
|
|
const CURRENT_EVENT = find(EVENTS, event => moment().isBetween(event.start, event.end)
|
|
&& ['winter', 'spring', 'summer', 'fall'].includes(event.season));
|
|
|
|
export default {
|
|
opened: CURRENT_EVENT,
|
|
|
|
currentSeason: CURRENT_EVENT ? upperFirst(CURRENT_EVENT.season) : 'Closed',
|
|
|
|
dateRange: {
|
|
start: CURRENT_EVENT ? moment(CURRENT_EVENT.start) : moment().subtract(1, 'days').toDate(),
|
|
end: CURRENT_EVENT ? moment(CURRENT_EVENT.end) : moment().subtract(1, 'seconds').toDate(),
|
|
},
|
|
|
|
availableSets: CURRENT_EVENT
|
|
? [
|
|
...SEASONAL_SETS[CURRENT_EVENT.season],
|
|
]
|
|
: [],
|
|
|
|
pinnedSets: CURRENT_EVENT
|
|
? {
|
|
rogue: 'spring2024MeltingSnowRogueSet',
|
|
warrior: 'spring2024FluoriteWarriorSet',
|
|
wizard: 'spring2024HibiscusMageSet',
|
|
healer: 'spring2024BluebirdHealerSet',
|
|
}
|
|
: {},
|
|
|
|
availableSpells: CURRENT_EVENT && moment().isBetween('2024-04-18T08:00-05:00', CURRENT_EVENT.end)
|
|
? [
|
|
'shinySeed',
|
|
]
|
|
: [],
|
|
|
|
availableQuests: CURRENT_EVENT && moment().isBetween('2024-04-18T08:00-05:00', CURRENT_EVENT.end)
|
|
? [
|
|
'egg',
|
|
]
|
|
: [],
|
|
|
|
featuredSet: 'spring2020LapisLazuliRogueSet',
|
|
};
|