mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +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',
|
'shinySeed',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'seasonalQuests',
|
||||||
|
items: [
|
||||||
|
'egg',
|
||||||
|
'waffle',
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'customizations',
|
type: 'customizations',
|
||||||
matcher: customizationMatcher([
|
matcher: customizationMatcher([
|
||||||
@@ -695,6 +702,11 @@ export const GALA_SCHEDULE = {
|
|||||||
'seafoam',
|
'seafoam',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'seasonalQuests',
|
||||||
|
items: [
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'customizations',
|
type: 'customizations',
|
||||||
matcher: customizationMatcher([
|
matcher: customizationMatcher([
|
||||||
@@ -717,6 +729,11 @@ export const GALA_SCHEDULE = {
|
|||||||
'spookySparkles',
|
'spookySparkles',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'seasonalQuests',
|
||||||
|
items: [
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'customizations',
|
type: 'customizations',
|
||||||
matcher: customizationMatcher([
|
matcher: customizationMatcher([
|
||||||
@@ -799,10 +816,17 @@ export function getScheduleMatchingGroup (type, date) {
|
|||||||
matchers: [],
|
matchers: [],
|
||||||
items: [],
|
items: [],
|
||||||
match (key) {
|
match (key) {
|
||||||
|
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)) {
|
if (this.items.length > 0 && !inListMatcher(this.items)(key)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return this.matchers.every(m => m(key));
|
return this.matchers.every(m => m(key));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -495,6 +495,7 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
|
|||||||
categories.push(category);
|
categories.push(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(questMatcher);
|
||||||
const quests = pickBy(content.quests, (quest, key) => questMatcher.match(key));
|
const quests = pickBy(content.quests, (quest, key) => questMatcher.match(key));
|
||||||
|
|
||||||
if (keys(quests).length > 0) {
|
if (keys(quests).length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user