Fix some scheduling issues (#15274)

* fix logic for time travelers schedule

* fix potion availability

* fix tests
This commit is contained in:
Phillip Thelen
2024-07-23 18:33:59 +02:00
committed by GitHub
parent 69afa52beb
commit 6e91d51def
4 changed files with 21 additions and 13 deletions

View File

@@ -28,7 +28,8 @@ function timeTravelersMatcher (month1, month2) {
return function call (item, date) {
const month = parseInt(item.substring(4, 6), 10);
const year = parseInt(item.substring(0, 4), 10);
if (date.getFullYear() === year && (date.getMonth() + 1) >= month) {
if (date.getFullYear() < year
|| (date.getFullYear() === year && (date.getMonth() + 1) === month)) {
return false;
}
return month === month1 || month === month2;
@@ -207,6 +208,7 @@ export const MONTHLY_SCHEDULE = {
items: [
'StainedGlass',
'Porcelain',
'BirchBark',
],
},
],