mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Seasonal gear fix (#15255)
* cleanup unneeded season definitions * assign first winter seasonal gear right season * add missing winter definition * Fix enddate for winter galas * fix lint * fix halloween sprites * set season * fix loading habitoween sprites * add missing customization shop sprites * Fix test * update customization shop sprites
This commit is contained in:
@@ -844,6 +844,7 @@ export function assembleScheduledMatchers (date) {
|
||||
const gala = GALA_SCHEDULE[getGalaIndex(date)];
|
||||
const galaMatchers = gala.matchers;
|
||||
galaMatchers.forEach(matcher => {
|
||||
matcher.startMonth = gala.startMonth;
|
||||
matcher.endMonth = gala.endMonth;
|
||||
});
|
||||
items.push(...galaMatchers);
|
||||
@@ -887,6 +888,9 @@ function makeEndDate (checkedDate, matcher) {
|
||||
end.minute(0);
|
||||
end.second(0);
|
||||
if (matcher.endMonth !== undefined) {
|
||||
if (matcher.startMonth && matcher.startMonth > matcher.endMonth) {
|
||||
end.year(checkedDate.getFullYear() + 1);
|
||||
}
|
||||
end.month(matcher.endMonth);
|
||||
} else if (end.date() <= checkedDate.getDate()) {
|
||||
end = moment(end).add(1, 'months');
|
||||
|
||||
Reference in New Issue
Block a user