mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
fixes
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
|
||||
describe('POST /user/unlock', () => {
|
||||
let user;
|
||||
const unlockPath = 'shirt.convict,shirt.cross,shirt.fire,shirt.horizon,shirt.ocean,shirt.purple,shirt.rainbow,shirt.redblue,shirt.thunder,shirt.tropical,shirt.zombie';
|
||||
const unlockPath = 'shirt.convict,shirt.fire,shirt.horizon,shirt.ocean,shirt.purple,shirt.rainbow,shirt.redblue,shirt.thunder,shirt.tropical,shirt.zombie';
|
||||
const unlockGearSetPath = 'items.gear.owned.headAccessory_special_bearEars,items.gear.owned.headAccessory_special_cactusEars,items.gear.owned.headAccessory_special_foxEars,items.gear.owned.headAccessory_special_lionEars,items.gear.owned.headAccessory_special_pandaEars,items.gear.owned.headAccessory_special_pigEars,items.gear.owned.headAccessory_special_tigerEars,items.gear.owned.headAccessory_special_wolfEars';
|
||||
const unlockCost = 1.25;
|
||||
const usersStartingGems = 5;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { TAVERN_ID } from '../../../../../website/server/models/group';
|
||||
import { updateDocument } from '../../../../helpers/mongo';
|
||||
import {
|
||||
requester,
|
||||
resetHabiticaDB,
|
||||
|
||||
@@ -7,10 +7,10 @@ import {
|
||||
BadRequest,
|
||||
} from '../../../website/common/script/libs/errors';
|
||||
|
||||
describe('shared.ops.unlock', () => {
|
||||
describe.only('shared.ops.unlock', () => {
|
||||
let user;
|
||||
let clock;
|
||||
const unlockPath = 'shirt.convict,shirt.cross,shirt.fire,shirt.horizon,shirt.ocean,shirt.purple,shirt.rainbow,shirt.redblue,shirt.thunder,shirt.tropical,shirt.zombie';
|
||||
const unlockPath = 'shirt.convict,shirt.fire,shirt.horizon,shirt.ocean,shirt.purple,shirt.rainbow,shirt.redblue,shirt.thunder,shirt.tropical,shirt.zombie';
|
||||
const unlockGearSetPath = 'items.gear.owned.headAccessory_special_bearEars,items.gear.owned.headAccessory_special_cactusEars,items.gear.owned.headAccessory_special_foxEars,items.gear.owned.headAccessory_special_lionEars,items.gear.owned.headAccessory_special_pandaEars,items.gear.owned.headAccessory_special_pigEars,items.gear.owned.headAccessory_special_tigerEars,items.gear.owned.headAccessory_special_wolfEars';
|
||||
const backgroundUnlockPath = 'background.giant_florals';
|
||||
const hairUnlockPath = 'hair.color.rainbow,hair.color.yellow,hair.color.green,hair.color.purple,hair.color.blue,hair.color.TRUred';
|
||||
@@ -165,7 +165,6 @@ describe('shared.ops.unlock', () => {
|
||||
await unlock(user, { query: { path: partialUnlockPaths[4] } });
|
||||
await unlock(user, { query: { path: partialUnlockPaths[5] } });
|
||||
await unlock(user, { query: { path: partialUnlockPaths[6] } });
|
||||
await unlock(user, { query: { path: partialUnlockPaths[7] } });
|
||||
|
||||
await unlock(user, { query: { path: unlockPath } });
|
||||
});
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<h2
|
||||
class="text-center pt-2 mt-4 mb-4"
|
||||
v-if="editing"
|
||||
class="text-center pt-2 mt-4 mb-4"
|
||||
>
|
||||
{{ $t('editAvatar')}}
|
||||
{{ $t('editAvatar') }}
|
||||
</h2>
|
||||
<div
|
||||
v-if="modalPage > 1"
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
:item-width="94"
|
||||
:item-margin="24"
|
||||
:type="category.identifier"
|
||||
:foldButton="false"
|
||||
:fold-button="false"
|
||||
>
|
||||
<template
|
||||
slot="item"
|
||||
|
||||
@@ -894,7 +894,7 @@
|
||||
"questGiraffeCompletion": "After helping the Gear-Affe with some basic organization of his stash, you’re both feeling more energized and upbeat!<br><br>He grabs his guitar and a book of beginner exercises and strums a few notes. “It feels good to take a step in the right direction, even a small one. Thanks for helping me out! Take these, I hear you have a stash of pets and these fellas could be a nice addition!”",
|
||||
"questGiraffeBoss": "Gear-affe",
|
||||
"questGiraffeDropGiraffeEgg": "Giraffe (Egg)",
|
||||
"QuestGiraffeUnlockText": "Unlocks Giraffe Eggs for purchase in the Market."
|
||||
"QuestGiraffeUnlockText": "Unlocks Giraffe Eggs for purchase in the Market.",
|
||||
"questPinkMarbleUnlockText": "Unlocks Pink Marble Hatching Potions for purchase in the Market.",
|
||||
|
||||
"questFungiText": "The Moody Mushroom",
|
||||
|
||||
@@ -50,106 +50,70 @@ const premium = {
|
||||
value: 2,
|
||||
text: t('hatchingPotionCupid'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202402,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndFebruary'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.potions202402.start, EVENTS.potions202402.end);
|
||||
},
|
||||
},
|
||||
Shimmer: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionShimmer'),
|
||||
limited: true,
|
||||
event: EVENTS.spring2024,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndApril'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.spring2024.start, EVENTS.spring2024.end);
|
||||
},
|
||||
},
|
||||
Fairy: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionFairy'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202305,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndMay'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBefore(EVENTS.potions202305.end);
|
||||
},
|
||||
},
|
||||
Floral: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionFloral'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202405,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndMay'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.potions202405.start, EVENTS.potions202405.end);
|
||||
},
|
||||
},
|
||||
Aquatic: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionAquatic'),
|
||||
limited: true,
|
||||
event: EVENTS.birthday10,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndFebruary'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.birthday10.start, EVENTS.birthday10.end);
|
||||
},
|
||||
},
|
||||
Ember: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionEmber'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202311,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndNovember'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.potions202311.start, EVENTS.potions202311.end);
|
||||
},
|
||||
},
|
||||
Thunderstorm: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionThunderstorm'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202308,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndAugust'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.potions202308.start, EVENTS.potions202308.end);
|
||||
},
|
||||
},
|
||||
Spooky: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionSpooky'),
|
||||
limited: true,
|
||||
event: EVENTS.fall2023,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndOctober'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.fall2023.start, EVENTS.fall2023.end);
|
||||
},
|
||||
},
|
||||
Ghost: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionGhost'),
|
||||
limited: true,
|
||||
event: EVENTS.fall2022,
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.fall2022.start, EVENTS.fall2022.end);
|
||||
},
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndOctober'),
|
||||
}),
|
||||
@@ -161,10 +125,6 @@ const premium = {
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndJanuary'),
|
||||
}),
|
||||
event: EVENTS.winter2023,
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.winter2023.start, EVENTS.winter2023.end);
|
||||
},
|
||||
},
|
||||
Peppermint: {
|
||||
value: 2,
|
||||
@@ -173,19 +133,11 @@ const premium = {
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndJanuary'),
|
||||
}),
|
||||
event: EVENTS.winter2024,
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.winter2024.start, EVENTS.winter2024.end);
|
||||
},
|
||||
},
|
||||
StarryNight: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionStarryNight'),
|
||||
limited: true,
|
||||
event: EVENTS.winter2023,
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.winter2023.start, EVENTS.winter2023.end);
|
||||
},
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndJanuary'),
|
||||
}),
|
||||
@@ -197,10 +149,6 @@ const premium = {
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndApril'),
|
||||
}),
|
||||
event: EVENTS.spring2024,
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.spring2024.start, EVENTS.spring2024.end);
|
||||
},
|
||||
},
|
||||
Glass: {
|
||||
value: 2,
|
||||
@@ -209,82 +157,54 @@ const premium = {
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndJuly'),
|
||||
}),
|
||||
event: EVENTS.summer2023,
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.summer2023.start, EVENTS.summer2023.end);
|
||||
},
|
||||
},
|
||||
Glow: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionGlow'),
|
||||
limited: true,
|
||||
event: EVENTS.fall2023,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndOctober'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.fall2023.start, EVENTS.fall2023.end);
|
||||
},
|
||||
},
|
||||
Frost: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionFrost'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202311,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndNovember'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.potions202311.start, EVENTS.potions202311.end);
|
||||
},
|
||||
},
|
||||
IcySnow: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionIcySnow'),
|
||||
limited: true,
|
||||
event: EVENTS.winter2024,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndJanuary'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.winter2024.start, EVENTS.winter2024.end);
|
||||
},
|
||||
},
|
||||
RoseQuartz: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionRoseQuartz'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202302,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndFebruary'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.potions202302.start, EVENTS.potions202302.end);
|
||||
},
|
||||
},
|
||||
Celestial: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionCelestial'),
|
||||
limited: true,
|
||||
event: EVENTS.spring2024,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndApril'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.spring2024.start, EVENTS.spring2024.end);
|
||||
},
|
||||
},
|
||||
Sunshine: {
|
||||
value: 2,
|
||||
text: t('hatchingPotionSunshine'),
|
||||
limited: true,
|
||||
event: EVENTS.potions202405,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndMay'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.potions202405.start, EVENTS.potions202405.end);
|
||||
},
|
||||
},
|
||||
Bronze: {
|
||||
canBuy: hasQuestAchievementFunction('bronze'),
|
||||
@@ -340,13 +260,9 @@ const wacky = {
|
||||
Veggie: {
|
||||
text: t('hatchingPotionVeggie'),
|
||||
limited: true,
|
||||
event: EVENTS.aprilFoolsQuest2024,
|
||||
_addlNotes: t('eventAvailability', {
|
||||
date: t('dateEndApril'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.aprilFoolsQuest2024.start, EVENTS.aprilFoolsQuest2024.end);
|
||||
},
|
||||
},
|
||||
Dessert: {
|
||||
canBuy: hasQuestAchievementFunction('waffle'),
|
||||
@@ -357,24 +273,18 @@ const wacky = {
|
||||
TeaShop: {
|
||||
text: t('hatchingPotionTeaShop'),
|
||||
limited: true,
|
||||
event: EVENTS.aprilFoolsQuest2024,
|
||||
_addlNotes: t('premiumPotionAddlNotes', {
|
||||
date: t('dateEndApril'),
|
||||
}),
|
||||
canBuy () {
|
||||
return moment().isBetween(EVENTS.aprilFoolsQuest2024.start, EVENTS.aprilFoolsQuest2024.end);
|
||||
},
|
||||
},
|
||||
Fungi: {
|
||||
text: t('hatchingPotionFungi'),
|
||||
limited: true,
|
||||
event: EVENTS.aprilFoolsQuest2024,
|
||||
_addlNotes: t('premiumPotionAddlNotes', {
|
||||
date: t('dateEndApril'),
|
||||
}),
|
||||
canBuy: hasQuestAchievementFunction('fungi'),
|
||||
},
|
||||
TeaShop: {},
|
||||
};
|
||||
|
||||
each(drops, (pot, key) => {
|
||||
|
||||
@@ -521,7 +521,14 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
|
||||
text: i18n.t(set),
|
||||
};
|
||||
|
||||
category.items = shops.getSeasonalGearBySet(user, set, officialPinnedItems, language, gearMatcher, false);
|
||||
category.items = shops.getSeasonalGearBySet(
|
||||
user,
|
||||
set,
|
||||
officialPinnedItems,
|
||||
language,
|
||||
gearMatcher,
|
||||
false,
|
||||
);
|
||||
|
||||
if (category.items.length > 0) {
|
||||
const item = category.items[0];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
getCurrentEvent,
|
||||
getCurrentEventList,
|
||||
getWorldBoss,
|
||||
} from '../../libs/worldState';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import filter from 'lodash/filter';
|
||||
import moment from 'moment';
|
||||
import { // eslint-disable-line import/no-cycle
|
||||
model as Group,
|
||||
|
||||
Reference in New Issue
Block a user