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
@@ -123,7 +123,7 @@ describe('GET /world-state', () => {
|
|||||||
|
|
||||||
const res = await requester().get('/world-state');
|
const res = await requester().get('/world-state');
|
||||||
|
|
||||||
expect(res.npcImageSuffix).to.equal('winter');
|
expect(res.npcImageSuffix).to.equal('fall');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -123,6 +123,12 @@ describe('Content Schedule', () => {
|
|||||||
expect(matchers.seasonalGear.end).to.eql(moment.utc(`2024-06-21T${String(switchoverTime).padStart(2, '0')}:00:00.000Z`).toDate());
|
expect(matchers.seasonalGear.end).to.eql(moment.utc(`2024-06-21T${String(switchoverTime).padStart(2, '0')}:00:00.000Z`).toDate());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('sets the end date for a winter gala', () => {
|
||||||
|
const date = new Date('2024-12-22');
|
||||||
|
const matchers = getAllScheduleMatchingGroups(date);
|
||||||
|
expect(matchers.seasonalGear.end).to.eql(moment.utc(`2025-03-21T${String(switchoverTime).padStart(2, '0')}:00:00.000Z`).toDate());
|
||||||
|
});
|
||||||
|
|
||||||
it('contains content for repeating events', () => {
|
it('contains content for repeating events', () => {
|
||||||
const date = new Date('2024-04-15');
|
const date = new Date('2024-04-15');
|
||||||
const matchers = getAllScheduleMatchingGroups(date);
|
const matchers = getAllScheduleMatchingGroups(date);
|
||||||
|
|||||||
|
After Width: | Height: | Size: 3.9 KiB |
BIN
website/client/public/static/npc/birthday/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
BIN
website/client/public/static/npc/fall/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
website/client/public/static/npc/nye/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
website/client/public/static/npc/spring/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
BIN
website/client/public/static/npc/summer/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
website/client/public/static/npc/winter/customizations_npc.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
@@ -109,6 +109,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import find from 'lodash/find';
|
||||||
import shops from '@/../../common/script/libs/shops';
|
import shops from '@/../../common/script/libs/shops';
|
||||||
import throttle from 'lodash/throttle';
|
import throttle from 'lodash/throttle';
|
||||||
import { mapState } from '@/libs/store';
|
import { mapState } from '@/libs/store';
|
||||||
@@ -145,9 +146,16 @@ export default {
|
|||||||
return Object.values(this.viewOptions).some(g => g.selected);
|
return Object.values(this.viewOptions).some(g => g.selected);
|
||||||
},
|
},
|
||||||
imageURLs () {
|
imageURLs () {
|
||||||
|
const currentEvent = find(this.currentEventList, event => Boolean(event.season));
|
||||||
|
if (!currentEvent) {
|
||||||
|
return {
|
||||||
|
background: 'url(/static/npc/normal/customizations_background.png)',
|
||||||
|
npc: 'url(/static/npc/normal/customizations_npc.png)',
|
||||||
|
};
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
background: 'url(/static/npc/normal/customizations_background.png)',
|
background: `url(/static/npc/${currentEvent.season}/customizations_background.png)`,
|
||||||
npc: 'url(/static/npc/normal/customizations_npc.png)',
|
npc: `url(/static/npc/${currentEvent.season}/customizations_npc.png)`,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
categories () {
|
categories () {
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await this.triggerGetWorldState();
|
await this.triggerGetWorldState();
|
||||||
this.currentEvent = _find(this.currentEventList, event => Boolean(['winter', 'spring', 'summer', 'fall'].includes(event.season)));
|
this.currentEvent = _find(this.currentEventList, event => Boolean(event.season));
|
||||||
this.imageURLs.background = `url(/static/npc/${this.currentEvent.season}/seasonal_shop_opened_background.png)`;
|
this.imageURLs.background = `url(/static/npc/${this.currentEvent.season}/seasonal_shop_opened_background.png)`;
|
||||||
this.imageURLs.npc = `url(/static/npc/${this.currentEvent.season}/seasonal_shop_opened_npc.png)`;
|
this.imageURLs.npc = `url(/static/npc/${this.currentEvent.season}/seasonal_shop_opened_npc.png)`;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ export const REPEATING_EVENTS = {
|
|||||||
start: new Date('1970-10-30T08:00-05:00'),
|
start: new Date('1970-10-30T08:00-05:00'),
|
||||||
end: new Date('1970-11-01T23:59-05:00'),
|
end: new Date('1970-11-01T23:59-05:00'),
|
||||||
foodSeason: 'Candy',
|
foodSeason: 'Candy',
|
||||||
|
season: 'habitoween',
|
||||||
|
npcImageSuffix: '_halloween',
|
||||||
},
|
},
|
||||||
harvestFeast: {
|
harvestFeast: {
|
||||||
start: new Date('1970-11-22T08:00-05:00'),
|
start: new Date('1970-11-22T08:00-05:00'),
|
||||||
|
|||||||
@@ -844,6 +844,7 @@ export function assembleScheduledMatchers (date) {
|
|||||||
const gala = GALA_SCHEDULE[getGalaIndex(date)];
|
const gala = GALA_SCHEDULE[getGalaIndex(date)];
|
||||||
const galaMatchers = gala.matchers;
|
const galaMatchers = gala.matchers;
|
||||||
galaMatchers.forEach(matcher => {
|
galaMatchers.forEach(matcher => {
|
||||||
|
matcher.startMonth = gala.startMonth;
|
||||||
matcher.endMonth = gala.endMonth;
|
matcher.endMonth = gala.endMonth;
|
||||||
});
|
});
|
||||||
items.push(...galaMatchers);
|
items.push(...galaMatchers);
|
||||||
@@ -887,6 +888,9 @@ function makeEndDate (checkedDate, matcher) {
|
|||||||
end.minute(0);
|
end.minute(0);
|
||||||
end.second(0);
|
end.second(0);
|
||||||
if (matcher.endMonth !== undefined) {
|
if (matcher.endMonth !== undefined) {
|
||||||
|
if (matcher.startMonth && matcher.startMonth > matcher.endMonth) {
|
||||||
|
end.year(checkedDate.getFullYear() + 1);
|
||||||
|
}
|
||||||
end.month(matcher.endMonth);
|
end.month(matcher.endMonth);
|
||||||
} else if (end.date() <= checkedDate.getDate()) {
|
} else if (end.date() <= checkedDate.getDate()) {
|
||||||
end = moment(end).add(1, 'months');
|
end = moment(end).add(1, 'months');
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ const armor = {
|
|||||||
notes: t('armorSpecialYetiNotes', { con: 9 }),
|
notes: t('armorSpecialYetiNotes', { con: 9 }),
|
||||||
con: 9,
|
con: 9,
|
||||||
value: 90,
|
value: 90,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
ski: {
|
ski: {
|
||||||
specialClass: 'rogue',
|
specialClass: 'rogue',
|
||||||
@@ -157,6 +158,7 @@ const armor = {
|
|||||||
notes: t('armorSpecialSkiNotes', { per: 15 }),
|
notes: t('armorSpecialSkiNotes', { per: 15 }),
|
||||||
per: 15,
|
per: 15,
|
||||||
value: 90,
|
value: 90,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
candycane: {
|
candycane: {
|
||||||
specialClass: 'wizard',
|
specialClass: 'wizard',
|
||||||
@@ -165,6 +167,7 @@ const armor = {
|
|||||||
notes: t('armorSpecialCandycaneNotes', { int: 9 }),
|
notes: t('armorSpecialCandycaneNotes', { int: 9 }),
|
||||||
int: 9,
|
int: 9,
|
||||||
value: 90,
|
value: 90,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
snowflake: {
|
snowflake: {
|
||||||
specialClass: 'healer',
|
specialClass: 'healer',
|
||||||
@@ -173,6 +176,7 @@ const armor = {
|
|||||||
notes: t('armorSpecialSnowflakeNotes', { con: 15 }),
|
notes: t('armorSpecialSnowflakeNotes', { con: 15 }),
|
||||||
con: 15,
|
con: 15,
|
||||||
value: 90,
|
value: 90,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
birthday: {
|
birthday: {
|
||||||
event: EVENTS.birthday,
|
event: EVENTS.birthday,
|
||||||
@@ -182,51 +186,39 @@ const armor = {
|
|||||||
},
|
},
|
||||||
springRogue: {
|
springRogue: {
|
||||||
set: 'stealthyKittySet',
|
set: 'stealthyKittySet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
springWarrior: {
|
springWarrior: {
|
||||||
set: 'mightyBunnySet',
|
set: 'mightyBunnySet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
springMage: {
|
springMage: {
|
||||||
set: 'magicMouseSet',
|
set: 'magicMouseSet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
springHealer: {
|
springHealer: {
|
||||||
set: 'lovingPupSet',
|
set: 'lovingPupSet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
summerRogue: {
|
summerRogue: {
|
||||||
set: 'roguishPirateSet',
|
set: 'roguishPirateSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
summerWarrior: {
|
summerWarrior: {
|
||||||
set: 'daringSwashbucklerSet',
|
set: 'daringSwashbucklerSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
summerMage: {
|
summerMage: {
|
||||||
set: 'emeraldMermageSet',
|
set: 'emeraldMermageSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
summerHealer: {
|
summerHealer: {
|
||||||
set: 'reefSeahealerSet',
|
set: 'reefSeahealerSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
fallRogue: {
|
fallRogue: {
|
||||||
set: 'vampireSmiterSet',
|
set: 'vampireSmiterSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
fallWarrior: {
|
fallWarrior: {
|
||||||
set: 'monsterOfScienceSet',
|
set: 'monsterOfScienceSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
fallMage: {
|
fallMage: {
|
||||||
set: 'witchyWizardSet',
|
set: 'witchyWizardSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
fallHealer: {
|
fallHealer: {
|
||||||
set: 'mummyMedicSet',
|
set: 'mummyMedicSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
winter2015Rogue: {
|
winter2015Rogue: {
|
||||||
set: 'icicleDrakeSet',
|
set: 'icicleDrakeSet',
|
||||||
@@ -1228,6 +1220,7 @@ const head = {
|
|||||||
notes: t('headSpecialYetiNotes', { str: 9 }),
|
notes: t('headSpecialYetiNotes', { str: 9 }),
|
||||||
str: 9,
|
str: 9,
|
||||||
value: 60,
|
value: 60,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
ski: {
|
ski: {
|
||||||
specialClass: 'rogue',
|
specialClass: 'rogue',
|
||||||
@@ -1236,6 +1229,7 @@ const head = {
|
|||||||
notes: t('headSpecialSkiNotes', { per: 9 }),
|
notes: t('headSpecialSkiNotes', { per: 9 }),
|
||||||
per: 9,
|
per: 9,
|
||||||
value: 60,
|
value: 60,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
candycane: {
|
candycane: {
|
||||||
specialClass: 'wizard',
|
specialClass: 'wizard',
|
||||||
@@ -1244,6 +1238,7 @@ const head = {
|
|||||||
notes: t('headSpecialCandycaneNotes', { per: 7 }),
|
notes: t('headSpecialCandycaneNotes', { per: 7 }),
|
||||||
per: 7,
|
per: 7,
|
||||||
value: 60,
|
value: 60,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
snowflake: {
|
snowflake: {
|
||||||
specialClass: 'healer',
|
specialClass: 'healer',
|
||||||
@@ -1252,54 +1247,43 @@ const head = {
|
|||||||
notes: t('headSpecialSnowflakeNotes', { int: 7 }),
|
notes: t('headSpecialSnowflakeNotes', { int: 7 }),
|
||||||
int: 7,
|
int: 7,
|
||||||
value: 60,
|
value: 60,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
springRogue: {
|
springRogue: {
|
||||||
set: 'stealthyKittySet',
|
set: 'stealthyKittySet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
springWarrior: {
|
springWarrior: {
|
||||||
set: 'mightyBunnySet',
|
set: 'mightyBunnySet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
springMage: {
|
springMage: {
|
||||||
set: 'magicMouseSet',
|
set: 'magicMouseSet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
springHealer: {
|
springHealer: {
|
||||||
set: 'lovingPupSet',
|
set: 'lovingPupSet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
summerRogue: {
|
summerRogue: {
|
||||||
set: 'roguishPirateSet',
|
set: 'roguishPirateSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
summerWarrior: {
|
summerWarrior: {
|
||||||
set: 'daringSwashbucklerSet',
|
set: 'daringSwashbucklerSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
summerMage: {
|
summerMage: {
|
||||||
set: 'emeraldMermageSet',
|
set: 'emeraldMermageSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
summerHealer: {
|
summerHealer: {
|
||||||
set: 'reefSeahealerSet',
|
set: 'reefSeahealerSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
fallRogue: {
|
fallRogue: {
|
||||||
set: 'vampireSmiterSet',
|
set: 'vampireSmiterSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
fallWarrior: {
|
fallWarrior: {
|
||||||
set: 'monsterOfScienceSet',
|
set: 'monsterOfScienceSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
fallMage: {
|
fallMage: {
|
||||||
set: 'witchyWizardSet',
|
set: 'witchyWizardSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
fallHealer: {
|
fallHealer: {
|
||||||
set: 'mummyMedicSet',
|
set: 'mummyMedicSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
winter2015Rogue: {
|
winter2015Rogue: {
|
||||||
set: 'icicleDrakeSet',
|
set: 'icicleDrakeSet',
|
||||||
@@ -2114,6 +2098,7 @@ const shield = {
|
|||||||
notes: t('shieldSpecialYetiNotes', { con: 7 }),
|
notes: t('shieldSpecialYetiNotes', { con: 7 }),
|
||||||
con: 7,
|
con: 7,
|
||||||
value: 70,
|
value: 70,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
ski: {
|
ski: {
|
||||||
specialClass: 'rogue',
|
specialClass: 'rogue',
|
||||||
@@ -2122,6 +2107,7 @@ const shield = {
|
|||||||
notes: t('weaponSpecialSkiNotes', { str: 8 }),
|
notes: t('weaponSpecialSkiNotes', { str: 8 }),
|
||||||
str: 8,
|
str: 8,
|
||||||
value: 90,
|
value: 90,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
snowflake: {
|
snowflake: {
|
||||||
specialClass: 'healer',
|
specialClass: 'healer',
|
||||||
@@ -2130,42 +2116,34 @@ const shield = {
|
|||||||
notes: t('shieldSpecialSnowflakeNotes', { con: 9 }),
|
notes: t('shieldSpecialSnowflakeNotes', { con: 9 }),
|
||||||
con: 9,
|
con: 9,
|
||||||
value: 70,
|
value: 70,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
springRogue: {
|
springRogue: {
|
||||||
set: 'stealthyKittySet',
|
set: 'stealthyKittySet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
springWarrior: {
|
springWarrior: {
|
||||||
set: 'mightyBunnySet',
|
set: 'mightyBunnySet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
springHealer: {
|
springHealer: {
|
||||||
set: 'lovingPupSet',
|
set: 'lovingPupSet',
|
||||||
season: 'spring',
|
|
||||||
},
|
},
|
||||||
summerRogue: {
|
summerRogue: {
|
||||||
set: 'roguishPirateSet',
|
set: 'roguishPirateSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
summerWarrior: {
|
summerWarrior: {
|
||||||
set: 'daringSwashbucklerSet',
|
set: 'daringSwashbucklerSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
summerHealer: {
|
summerHealer: {
|
||||||
set: 'reefSeahealerSet',
|
set: 'reefSeahealerSet',
|
||||||
season: 'summer',
|
|
||||||
},
|
},
|
||||||
fallRogue: {
|
fallRogue: {
|
||||||
set: 'vampireSmiterSet',
|
set: 'vampireSmiterSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
fallWarrior: {
|
fallWarrior: {
|
||||||
set: 'monsterOfScienceSet',
|
set: 'monsterOfScienceSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
fallHealer: {
|
fallHealer: {
|
||||||
set: 'mummyMedicSet',
|
set: 'mummyMedicSet',
|
||||||
season: 'fall',
|
|
||||||
},
|
},
|
||||||
winter2015Rogue: {
|
winter2015Rogue: {
|
||||||
set: 'icicleDrakeSet',
|
set: 'icicleDrakeSet',
|
||||||
@@ -2665,6 +2643,7 @@ const weapon = {
|
|||||||
notes: t('weaponSpecialYetiNotes', { str: 15 }),
|
notes: t('weaponSpecialYetiNotes', { str: 15 }),
|
||||||
str: 15,
|
str: 15,
|
||||||
value: 90,
|
value: 90,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
ski: {
|
ski: {
|
||||||
specialClass: 'rogue',
|
specialClass: 'rogue',
|
||||||
@@ -2673,6 +2652,7 @@ const weapon = {
|
|||||||
notes: t('weaponSpecialSkiNotes', { str: 8 }),
|
notes: t('weaponSpecialSkiNotes', { str: 8 }),
|
||||||
str: 8,
|
str: 8,
|
||||||
value: 90,
|
value: 90,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
candycane: {
|
candycane: {
|
||||||
specialClass: 'wizard',
|
specialClass: 'wizard',
|
||||||
@@ -2683,6 +2663,7 @@ const weapon = {
|
|||||||
int: 15,
|
int: 15,
|
||||||
per: 7,
|
per: 7,
|
||||||
value: 160,
|
value: 160,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
snowflake: {
|
snowflake: {
|
||||||
specialClass: 'healer',
|
specialClass: 'healer',
|
||||||
@@ -2691,6 +2672,7 @@ const weapon = {
|
|||||||
notes: t('weaponSpecialSnowflakeNotes', { int: 9 }),
|
notes: t('weaponSpecialSnowflakeNotes', { int: 9 }),
|
||||||
int: 9,
|
int: 9,
|
||||||
value: 90,
|
value: 90,
|
||||||
|
season: 'winter',
|
||||||
},
|
},
|
||||||
springRogue: {
|
springRogue: {
|
||||||
set: 'stealthyKittySet',
|
set: 'stealthyKittySet',
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ api.getWorldState = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
worldState.currentEventList.forEach(event => {
|
worldState.currentEventList.forEach(event => {
|
||||||
if (event.npcImageSuffix) {
|
if (event.npcImageSuffix && !worldState.npcImageSuffix) {
|
||||||
worldState.npcImageSuffix = event.npcImageSuffix;
|
worldState.npcImageSuffix = event.npcImageSuffix;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||