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:
@@ -80,6 +80,8 @@ export const REPEATING_EVENTS = {
|
||||
start: new Date('1970-10-30T08:00-05:00'),
|
||||
end: new Date('1970-11-01T23:59-05:00'),
|
||||
foodSeason: 'Candy',
|
||||
season: 'habitoween',
|
||||
npcImageSuffix: '_halloween',
|
||||
},
|
||||
harvestFeast: {
|
||||
start: new Date('1970-11-22T08:00-05:00'),
|
||||
|
||||
@@ -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