From 4a9497b600b050c1d197f7442b88aefed37592d6 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Mon, 2 Feb 2026 12:34:46 +0100 Subject: [PATCH] name key more generic --- website/client/src/components/avatar.vue | 6 +++--- .../client/src/components/inventory/stable/petItem.vue | 8 ++++---- website/common/script/content/constants/events.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/website/client/src/components/avatar.vue b/website/client/src/components/avatar.vue index c572c8437c..297082edf4 100644 --- a/website/client/src/components/avatar.vue +++ b/website/client/src/components/avatar.vue @@ -321,10 +321,10 @@ export default { return null; }, petClass () { - const foolEvent = this.currentEventList?.find(event => event.aprilFools && moment() + const substitutionEvent = this.currentEventList?.find(event => event.spriteSubstitutions && moment() .isBetween(event.start, event.end)); - if (foolEvent && foolEvent.aprilFools.pets) { - return this.foolPet(`Pet-${this.member.items.currentPet}`, foolEvent.aprilFools.pets); + if (substitutionEvent && substitutionEvent.spriteSubstitutions.pets) { + return this.foolPet(`Pet-${this.member.items.currentPet}`, substitutionEvent.spriteSubstitutions.pets); } if (this.member?.items.currentPet) return `Pet-${this.member.items.currentPet}`; return ''; diff --git a/website/client/src/components/inventory/stable/petItem.vue b/website/client/src/components/inventory/stable/petItem.vue index 11767e8fc1..9e52c9eda6 100644 --- a/website/client/src/components/inventory/stable/petItem.vue +++ b/website/client/src/components/inventory/stable/petItem.vue @@ -182,10 +182,10 @@ export default { return 'GreyedOut'; }, imageName () { - const foolEvent = this.currentEventList?.find(event => moment() - .isBetween(event.start, event.end) && event.aprilFools); - if (this.isOwned() && foolEvent && foolEvent.aprilFools.pets) { - return `stable_${this.foolPet(`Pet-${this.item.key}`, foolEvent.aprilFools.pets)}`; + const substitutionEvent = this.currentEventList?.find(event => moment() + .isBetween(event.start, event.end) && event.spriteSubstitutions); + if (this.isOwned() && substitutionEvent && substitutionEvent.spriteSubstitutions.pets) { + return `stable_${this.foolPet(`Pet-${this.item.key}`, substitutionEvent.spriteSubstitutions.pets)}`; } if (this.isOwned() || (this.mountOwned() && this.isHatchable())) { diff --git a/website/common/script/content/constants/events.js b/website/common/script/content/constants/events.js index 34821fe3e1..ee82ebf97b 100644 --- a/website/common/script/content/constants/events.js +++ b/website/common/script/content/constants/events.js @@ -54,7 +54,7 @@ export const REPEATING_EVENTS = { aprilFools: { start: new Date('1970-04-01T04:00-04:00'), end: new Date('1970-04-02T03:59-04:00'), - aprilFools: makeSubstitutionMap('Cryptid'), + spriteSubstitutions: makeSubstitutionMap('Cryptid'), }, aprilFoolsResale: { start: new Date('1970-04-03T04:00-04:00'),