Merge remote-tracking branch 'origin/develop' into negue/ui/setting

# Conflicts:
#	website/client/src/components/settings/api.vue
#	website/client/src/components/settings/site.vue
This commit is contained in:
negue
2023-04-06 00:18:07 +02:00
89 changed files with 2274 additions and 335 deletions
@@ -183,6 +183,11 @@ const animalSetAchievs = {
titleKey: 'achievementDomesticated',
textKey: 'achievementDomesticatedText',
},
plantParent: {
icon: 'achievement-plantParent',
titleKey: 'achievementPlantParent',
textKey: 'achievementPlantParentText',
},
polarPro: {
icon: 'achievement-polarPro',
titleKey: 'achievementPolarPro',
@@ -12,7 +12,7 @@ export default prefill({
pastelHairColors: { setPrice: 5, availableUntil: '2016-01-01' },
rainbowHairColors: { setPrice: 5, text: t('rainbowColors') },
shimmerHairColors: {
setPrice: 5, availableFrom: '2022-04-14T08:00-05:00', availableUntil: '2022-04-30T20:00-05:00', text: t('shimmerColors'),
setPrice: 5, availableFrom: '2023-04-11T08:00-05:00', availableUntil: EVENTS.spring2023.end, text: t('shimmerColors'),
},
hauntedHairColors: {
setPrice: 5, availableFrom: '2022-10-04T08:00-04:00', availableUntil: EVENTS.fall2022.end, text: t('hauntedColors'),
@@ -23,7 +23,7 @@ export default prefill({
rainbowSkins: { setPrice: 5, text: t('rainbowSkins') },
animalSkins: { setPrice: 5, text: t('animalSkins') },
pastelSkins: {
setPrice: 5, availableFrom: '2022-04-14T08:00-05:00', availableUntil: '2022-04-30T20:00-05:00', text: t('pastelSkins'),
setPrice: 5, availableFrom: '2022-04-11T08:00-05:00', availableUntil: EVENTS.spring2023.end, text: t('pastelSkins'),
},
spookySkins: { setPrice: 5, availableUntil: '2016-01-01', text: t('spookySkins') },
supernaturalSkins: {
+3 -2
View File
@@ -235,14 +235,15 @@ const bundles = {
jungleBuddies: {
key: 'jungleBuddies',
text: t('jungleBuddiesText'),
notes: t('jungleBuddiesNotes', { date: moment('2020-05-31').format('LL') }),
notes: t('jungleBuddiesNotes', { date: moment('2023-03-31').format('LL') }),
bundleKeys: [
'monkey',
'sloth',
'treeling',
],
event: EVENTS.bundle202303,
canBuy () {
return moment().isBetween('2020-05-19', '2020-06-02');
return moment().isBetween(EVENTS.bundle202303.start, EVENTS.bundle202303.end);
},
type: 'quests',
value: 7,
@@ -41,6 +41,15 @@ const ANIMAL_SET_ACHIEVEMENTS = {
achievementKey: 'domesticated',
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
},
plantParent: {
type: 'pet',
species: [
'Cactus',
'Treeling',
],
achievementKey: 'plantParent',
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
},
polarPro: {
type: 'pet',
species: [
@@ -10,11 +10,27 @@ const gemsPromo = {
export const EVENTS = {
noEvent: {
start: '2023-02-28T23:59-05:00',
end: '2023-03-21T08:00-05:00',
start: '2023-05-01T23:59-04:00',
end: '2023-06-22T08:00-04:00',
season: 'normal',
npcImageSuffix: '',
},
aprilFools2023: {
start: '2023-04-01T08:00-04:00',
end: '2023-04-02T08:00-04:00',
aprilFools: 'teaShop',
},
spring2023: {
start: '2023-03-21T08:00-04:00',
end: '2023-04-30T23:59-04:00',
npcImageSuffix: '_spring',
season: 'spring',
gear: true,
},
bundle202303: {
start: '2023-03-16T08:00-04:00',
end: '2023-03-31T23:59-04:00',
},
bundle202302: {
start: '2023-02-21T08:00-05:00',
end: '2023-02-28T23:59-05:00',
@@ -52,6 +52,7 @@ const SEASONAL_SETS = {
'winter2023WalrusWarriorSet',
'winter2023FairyLightsMageSet',
'winter2023CardinalHealerSet',
],
spring: [
// spring 2014
@@ -101,6 +102,11 @@ const SEASONAL_SETS = {
'spring2022PeridotHealerSet',
'spring2022RainstormWarriorSet',
'spring2022MagpieRogueSet',
'spring2023CaterpillarRogueSet',
'spring2023HummingbirdWarriorSet',
'spring2023MoonstoneMageSet',
'spring2023LilyHealerSet',
],
summer: [
@@ -60,6 +60,7 @@ const armor = {
202207: { },
202210: { },
202212: { },
202304: { },
301404: { },
301703: { },
301704: { },
@@ -203,6 +204,7 @@ const head = {
202211: { },
202301: { },
202303: { },
202304: { },
301404: { },
301405: { },
301703: { },
@@ -789,15 +789,19 @@ const armor = {
},
winter2023Rogue: {
set: 'winter2023RibbonRogueSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Warrior: {
set: 'winter2023WalrusWarriorSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Mage: {
set: 'winter2023FairyLightsMageSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Healer: {
set: 'winter2023CardinalHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
birthday2023: {
text: t('armorSpecialBirthday2023Text'),
@@ -805,6 +809,18 @@ const armor = {
value: 0,
canOwn: ownsItem('armor_special_birthday2023'),
},
spring2023Rogue: {
set: 'spring2023CaterpillarRogueSet',
},
spring2023Warrior: {
set: 'spring2023HummingbirdWarriorSet',
},
spring2023Mage: {
set: 'spring2023MoonstoneMageSet',
},
spring2023Healer: {
set: 'spring2023LilyHealerSet',
},
};
const armorStats = {
@@ -1947,15 +1963,19 @@ const head = {
},
winter2023Rogue: {
set: 'winter2023RibbonRogueSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Warrior: {
set: 'winter2023WalrusWarriorSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Mage: {
set: 'winter2023FairyLightsMageSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Healer: {
set: 'winter2023CardinalHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
nye2022: {
text: t('headSpecialNye2022Text'),
@@ -1963,6 +1983,18 @@ const head = {
value: 0,
canOwn: ownsItem('head_special_nye2022'),
},
spring2023Rogue: {
set: 'spring2023CaterpillarRogueSet',
},
spring2023Warrior: {
set: 'spring2023HummingbirdWarriorSet',
},
spring2023Mage: {
set: 'spring2023MoonstoneMageSet',
},
spring2023Healer: {
set: 'spring2023LilyHealerSet',
},
};
const headStats = {
@@ -2742,7 +2774,7 @@ const shield = {
},
spring2022Healer: {
set: 'spring2022PeridotHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'summer',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'spring',
},
summer2022Rogue: {
set: 'summer2022CrabRogueSet',
@@ -2770,12 +2802,24 @@ const shield = {
},
winter2023Rogue: {
set: 'winter2023RibbonRogueSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Warrior: {
set: 'winter2023WalrusWarriorSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Healer: {
set: 'winter2023CardinalHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
spring2023Rogue: {
set: 'spring2023CaterpillarRogueSet',
},
spring2023Warrior: {
set: 'spring2023HummingbirdWarriorSet',
},
spring2023Healer: {
set: 'spring2023LilyHealerSet',
},
};
@@ -3519,15 +3563,31 @@ const weapon = {
},
winter2023Rogue: {
set: 'winter2023RibbonRogueSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Warrior: {
set: 'winter2023WalrusWarriorSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Mage: {
set: 'winter2023FairyLightsMageSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
winter2023Healer: {
set: 'winter2023CardinalHealerSet',
canBuy: () => CURRENT_EVENT && CURRENT_EVENT.season === 'winter',
},
spring2023Rogue: {
set: 'spring2023CaterpillarRogueSet',
},
spring2023Warrior: {
set: 'spring2023HummingbirdWarriorSet',
},
spring2023Mage: {
set: 'spring2023MoonstoneMageSet',
},
spring2023Healer: {
set: 'spring2023LilyHealerSet',
},
};
@@ -219,12 +219,12 @@ const premium = {
text: t('hatchingPotionRainbow'),
limited: true,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMarch'),
previousDate: t('marchYYYY', { year: 2019 }),
availableDate: t('dateEndApril'),
previousDate: t('marchYYYY', { year: 2021 }),
}),
event: EVENTS.spring2021,
event: EVENTS.spring2023,
canBuy () {
return moment().isBefore(EVENTS.spring2021.end);
return moment().isBefore(EVENTS.spring2023.end);
},
},
Glass: {
@@ -389,13 +389,13 @@ const premium = {
value: 2,
text: t('hatchingPotionBirchBark'),
limited: true,
event: EVENTS.spring2021,
event: EVENTS.spring2023,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMarch'),
previousDate: t('marchYYYY', { year: 2020 }),
availableDate: t('dateEndApril'),
previousDate: t('marchYYYY', { year: 2021 }),
}),
canBuy () {
return moment().isBefore(EVENTS.spring2021.end);
return moment().isBefore(EVENTS.spring2023.end);
},
},
Fluorite: {
@@ -482,13 +482,13 @@ const premium = {
value: 2,
text: t('hatchingPotionPolkaDot'),
limited: true,
event: EVENTS.spring2022,
event: EVENTS.spring2023,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndMarch'),
previousDate: t('marchYYYY', { year: 2021 }),
availableDate: t('dateEndApril'),
previousDate: t('marchYYYY', { year: 2022 }),
}),
canBuy () {
return moment().isBefore(EVENTS.spring2022.end);
return moment().isBefore(EVENTS.spring2023.end);
},
},
MossyStone: {
@@ -564,13 +564,13 @@ const wacky = {
Veggie: {
text: t('hatchingPotionVeggie'),
limited: true,
event: EVENTS.spring2022,
event: EVENTS.spring2023,
_addlNotes: t('eventAvailabilityReturning', {
availableDate: t('dateEndApril'),
previousDate: t('aprilYYYY', { year: 2021 }),
previousDate: t('aprilYYYY', { year: 2022 }),
}),
canBuy () {
return moment().isBetween('2022-04-07T08:00-05:00', EVENTS.spring2022.end);
return moment().isBetween('2023-04-06T08:00-04:00', EVENTS.spring2023.end);
},
},
Dessert: {
@@ -585,6 +585,17 @@ const wacky = {
_addlNotes: t('premiumPotionUnlimitedNotes'),
canBuy: hasQuestAchievementFunction('virtualpet'),
},
TeaShop: {
text: t('hatchingPotionTeaShop'),
limited: true,
event: EVENTS.spring2023,
_addlNotes: t('premiumPotionAddlNotes', {
date: t('dateEndApril'),
}),
canBuy () {
return moment().isBetween('2023-04-06T08:00-04:00', EVENTS.spring2023.end);
},
},
};
each(drops, (pot, key) => {
@@ -74,7 +74,7 @@ const QUEST_SEASONAL = {
egg: {
event: CURRENT_EVENT && CURRENT_EVENT.season === 'spring' ? CURRENT_EVENT : null,
canBuy () {
return this.event && moment().isBetween(this.event.start, this.event.end);
return this.event && moment().isBetween('2023-03-28T08:00-05:00', this.event.end);
},
text: t('questEggHuntText'),
notes: t('questEggHuntNotes'),
@@ -5,7 +5,7 @@ import { EVENTS } from './constants';
// path: 'premiumHatchingPotions.Rainbow',
const featuredItems = {
market () {
if (moment().isBetween(EVENTS.potions202302.start, EVENTS.potions202302.end)) {
if (moment().isBetween(EVENTS.spring2023.start, EVENTS.spring2023.end)) {
return [
{
type: 'armoire',
@@ -13,15 +13,15 @@ const featuredItems = {
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.RoseQuartz',
path: 'premiumHatchingPotions.PolkaDot',
},
{
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Cupid',
path: 'premiumHatchingPotions.BirchBark',
},
{
type: 'hatchingPotions',
path: 'hatchingPotions.CottonCandyPink',
type: 'premiumHatchingPotion',
path: 'premiumHatchingPotions.Rainbow',
},
];
}
@@ -32,51 +32,68 @@ const featuredItems = {
},
{
type: 'food',
path: 'food.RottenMeat',
path: 'food.Honey',
},
{
type: 'hatchingPotions',
path: 'hatchingPotions.CottonCandyBlue',
path: 'hatchingPotions.Golden',
},
{
type: 'eggs',
path: 'eggs.FlyingPig',
path: 'eggs.Dragon',
},
];
},
quests () {
if (moment().isBetween(EVENTS.bundle202302.start, EVENTS.bundle202302.end)) {
quests () { // start date is 3/28
if (moment().isBetween(EVENTS.bundle202303.start, EVENTS.bundle202303.end)) {
return [
{
type: 'bundles',
path: 'bundles.mythicalMarvels',
path: 'bundles.jungleBuddies',
},
{
type: 'quests',
path: 'quests.treeling',
path: 'quests.kraken',
},
{
type: 'quests',
path: 'quests.rock',
path: 'quests.nudibranch',
},
];
}
if (moment().isBetween('2023-03-28T08:00-05:00', EVENTS.spring2023.end)) {
return [
{
type: 'quests',
path: 'quests.egg',
},
{
type: 'quests',
path: 'quests.yarn',
},
{
type: 'quests',
path: 'quests.ghost_stag',
},
];
}
return [
{
type: 'quests',
path: 'quests.slime',
path: 'quests.rat',
},
{
type: 'quests',
path: 'quests.seaserpent',
path: 'quests.kraken',
},
{
type: 'quests',
path: 'quests.unicorn',
path: 'quests.nudibranch',
},
];
},
seasonal: 'winter2022Healer',
seasonal: 'spring2022Healer',
timeTravelers: [
// TODO
],
+2 -2
View File
@@ -360,9 +360,9 @@ spells.special = {
previousPurchase: true,
target: 'user',
notes: t('spellSpecialShinySeedNotes'),
event: EVENTS.spring2022,
event: EVENTS.spring2023,
canOwn () {
return moment().isBetween('2022-04-14T08:00-05:00', EVENTS.spring2022.end);
return moment().isBetween('2023-04-18T08:00-05:00', EVENTS.spring2023.end);
},
cast (user, target, req) {
if (!user.items.special.shinySeed) throw new NotAuthorized(t('spellNotOwned')(req.language));
+1 -1
View File
@@ -292,7 +292,7 @@ export function getPlanContext (user, now) {
if (planMonths > 1) {
monthsTillNextHourglass = plan.consecutive.offset + 1;
} else {
monthsTillNextHourglass = 3 - (plan.consecutive.count % 3);
monthsTillNextHourglass = 3 - plan.perkMonthCount;
}
const possibleNextHourglassDate = moment(plan.dateUpdated)
@@ -221,6 +221,7 @@ function _getBasicAchievements (user, language) {
_addSimple(result, user, { path: 'woodlandWizard', language });
_addSimple(result, user, { path: 'boneToPick', language });
_addSimple(result, user, { path: 'polarPro', language });
_addSimple(result, user, { path: 'plantParent', language });
_addSimpleWithMasterCount(result, user, { path: 'beastMaster', language });
_addSimpleWithMasterCount(result, user, { path: 'mountMaster', language });
@@ -29,24 +29,23 @@ export default {
pinnedSets: CURRENT_EVENT
? {
rogue: 'winter2023RibbonRogueSet',
warrior: 'winter2023WalrusWarriorSet',
wizard: 'winter2023FairyLightsMageSet',
healer: 'winter2023CardinalHealerSet',
rogue: 'spring2023CaterpillarRogueSet',
warrior: 'spring2023HummingbirdWarriorSet',
wizard: 'spring2023MoonstoneMageSet',
healer: 'spring2023LilyHealerSet',
}
: {},
availableSpells: CURRENT_EVENT && moment().isBetween('2022-12-27T08:00-05:00', CURRENT_EVENT.end)
availableSpells: CURRENT_EVENT && moment().isBetween('2023-04-18T08:00-05:00', CURRENT_EVENT.end)
? [
'snowball',
'shinySeed',
]
: [],
availableQuests: CURRENT_EVENT && CURRENT_EVENT.season === 'winter'
availableQuests: CURRENT_EVENT && moment().isBetween('2023-03-28T08:00-05:00', CURRENT_EVENT.end)
? [
'evilsanta',
'evilsanta2',
'egg',
]
: [],
featuredSet: 'winter2022PomegranateMageSet',
featuredSet: 'spring2022MagpieRogueSet',
};