mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
fix issue with seasonal quest scheduling
This commit is contained in:
committed by
Sabe Jones
parent
fe2c02679e
commit
3540a274b3
@@ -672,6 +672,13 @@ export const GALA_SCHEDULE = {
|
||||
'shinySeed',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'seasonalQuests',
|
||||
items: [
|
||||
'egg',
|
||||
'waffle',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'customizations',
|
||||
matcher: customizationMatcher([
|
||||
@@ -695,6 +702,11 @@ export const GALA_SCHEDULE = {
|
||||
'seafoam',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'seasonalQuests',
|
||||
items: [
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'customizations',
|
||||
matcher: customizationMatcher([
|
||||
@@ -717,6 +729,11 @@ export const GALA_SCHEDULE = {
|
||||
'spookySparkles',
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'seasonalQuests',
|
||||
items: [
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'customizations',
|
||||
matcher: customizationMatcher([
|
||||
@@ -799,10 +816,17 @@ export function getScheduleMatchingGroup (type, date) {
|
||||
matchers: [],
|
||||
items: [],
|
||||
match (key) {
|
||||
if (this.items.length > 0 && !inListMatcher(this.items)(key)) {
|
||||
return false;
|
||||
if (this.matchers.length === 0) {
|
||||
if (this.items.length > 0) {
|
||||
return inListMatcher(this.items)(key);
|
||||
}
|
||||
} else {
|
||||
if (this.items.length > 0 && !inListMatcher(this.items)(key)) {
|
||||
return false;
|
||||
}
|
||||
return this.matchers.every(m => m(key));
|
||||
}
|
||||
return this.matchers.every(m => m(key));
|
||||
return false;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user