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:
Phillip Thelen
2024-07-29 17:30:23 +02:00
parent 3cbb67c71a
commit f506044aa6
28 changed files with 40 additions and 38 deletions

View File

@@ -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');