name key more generic

This commit is contained in:
Phillip Thelen
2026-02-02 12:34:46 +01:00
parent 35aab8d889
commit 4a9497b600
3 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -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 '';
@@ -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())) {
@@ -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'),