From 941194b7c7d4bce8dfdc099aea39add22aa571f0 Mon Sep 17 00:00:00 2001 From: CuriousMagpie Date: Tue, 29 Aug 2023 16:59:05 -0400 Subject: [PATCH 1/3] feat(content): add September pet quest bundle --- website/common/script/content/bundles.js | 4 ++-- website/common/script/content/constants/events.js | 6 +++++- website/common/script/content/shop-featuredItems.js | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/website/common/script/content/bundles.js b/website/common/script/content/bundles.js index 2d0d90935a..447e2aea20 100644 --- a/website/common/script/content/bundles.js +++ b/website/common/script/content/bundles.js @@ -18,9 +18,9 @@ const bundles = { 'harpy', 'owl', ], - event: EVENTS.potions202105, + event: EVENTS.bundle202309, canBuy () { - return moment().isBefore(EVENTS.potions202105.end); + return moment().isBetween(EVENTS.bundle202309.start, EVENTS.bundle202309.end); }, type: 'quests', class: 'quest_bundle_featheredFriends', diff --git a/website/common/script/content/constants/events.js b/website/common/script/content/constants/events.js index 41dafd0ad2..9b8cd58ac9 100644 --- a/website/common/script/content/constants/events.js +++ b/website/common/script/content/constants/events.js @@ -11,10 +11,14 @@ const gemsPromo = { export const EVENTS = { noEvent: { start: '2023-08-01T23:59-04:00', - end: '2023-08-10T08:00-04:00', + end: '2023-09-12T08:00-04:00', season: 'normal', npcImageSuffix: '', }, + bundle202309: { + start: '2023-09-12T08:00-04:00', + end: '2023-09-30T23:59-04:00', + }, bundle202308: { start: '2023-08-15T08:00-04:00', end: '2023-08-31T23:59-04:00', diff --git a/website/common/script/content/shop-featuredItems.js b/website/common/script/content/shop-featuredItems.js index 3219ce9592..c26b0604a1 100644 --- a/website/common/script/content/shop-featuredItems.js +++ b/website/common/script/content/shop-featuredItems.js @@ -45,19 +45,19 @@ const featuredItems = { ]; }, quests () { - if (moment().isBetween(EVENTS.bundle202308.start, EVENTS.bundle202308.end)) { + if (moment().isBetween(EVENTS.bundle202309.start, EVENTS.bundle202309.end)) { return [ { type: 'bundles', - path: 'bundles.hugabug', + path: 'bundles.featheredFriends', }, { type: 'quests', - path: 'quests.octopus', + path: 'quests.pterodactyl', }, { type: 'quests', - path: 'quests.rock', + path: 'quests.trex', }, ]; } From ce70c73d499f330c3be440fde27e206d791ad58a Mon Sep 17 00:00:00 2001 From: SabreCat Date: Tue, 12 Sep 2023 09:45:40 -0500 Subject: [PATCH 2/3] fix(test): temporarily use real timer --- test/common/ops/buy/purchase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/ops/buy/purchase.js b/test/common/ops/buy/purchase.js index fa5f7c5473..ce38b4b7e5 100644 --- a/test/common/ops/buy/purchase.js +++ b/test/common/ops/buy/purchase.js @@ -197,7 +197,7 @@ describe('shared.ops.purchase', () => { it('purchases quest bundles', async () => { const startingBalance = user.balance; - const clock = sandbox.useFakeTimers(moment('2019-05-20').valueOf()); + // const clock = sandbox.useFakeTimers(moment('2019-05-20').valueOf()); const type = 'bundles'; const key = 'featheredFriends'; const price = 1.75; From 9e253601020e50021347577766738778e19c72ca Mon Sep 17 00:00:00 2001 From: SabreCat Date: Tue, 12 Sep 2023 09:46:28 -0500 Subject: [PATCH 3/3] 5.4.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 29e1802e11..7d59c1519d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "habitica", - "version": "5.4.0", + "version": "5.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 91ceeff32d..5626831c92 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "habitica", "description": "A habit tracker app which treats your goals like a Role Playing Game.", - "version": "5.4.0", + "version": "5.4.1", "main": "./website/server/index.js", "dependencies": { "@babel/core": "^7.22.5",