name key more generic
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user