mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
refactor(achievements): crush down to much fewer notification types
most work by @CuriousMagpie
This commit is contained in:
@@ -2,72 +2,72 @@ const ANIMAL_COLOR_ACHIEVEMENTS = [
|
||||
{
|
||||
color: 'Base',
|
||||
petAchievement: 'backToBasics',
|
||||
petNotificationType: 'ACHIEVEMENT_BACK_TO_BASICS',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'allYourBase',
|
||||
mountNotificationType: 'ACHIEVEMENT_ALL_YOUR_BASE',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Desert',
|
||||
petAchievement: 'dustDevil',
|
||||
petNotificationType: 'ACHIEVEMENT_DUST_DEVIL',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'aridAuthority',
|
||||
mountNotificationType: 'ACHIEVEMENT_ARID_AUTHORITY',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Zombie',
|
||||
petAchievement: 'monsterMagus',
|
||||
petNotificationType: 'ACHIEVEMENT_MONSTER_MAGUS',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'undeadUndertaker',
|
||||
mountNotificationType: 'ACHIEVEMENT_UNDEAD_UNDERTAKER',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'White',
|
||||
petAchievement: 'primedForPainting',
|
||||
petNotificationType: 'ACHIEVEMENT_PRIMED_FOR_PAINTING',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'pearlyPro',
|
||||
mountNotificationType: 'ACHIEVEMENT_PEARLY_PRO',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'CottonCandyPink',
|
||||
petAchievement: 'tickledPink',
|
||||
petNotificationType: 'ACHIEVEMENT_TICKLED_PINK',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'rosyOutlook',
|
||||
mountNotificationType: 'ACHIEVEMENT_ROSY_OUTLOOK',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Golden',
|
||||
petAchievement: 'goodAsGold',
|
||||
petNotificationType: 'ACHIEVEMENT_GOOD_AS_GOLD',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'allThatGlitters',
|
||||
mountNotificationType: 'ACHIEVEMENT_ALL_THAT_GLITTERS',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Skeleton',
|
||||
petAchievement: 'boneCollector',
|
||||
petNotificationType: 'ACHIEVEMENT_BONE_COLLECTOR',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'skeletonCrew',
|
||||
mountNotificationType: 'ACHIEVEMENT_SKELETON_CREW',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Red',
|
||||
petAchievement: 'seeingRed',
|
||||
petNotificationType: 'ACHIEVEMENT_SEEING_RED',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'redLetterDay',
|
||||
mountNotificationType: 'ACHIEVEMENT_RED_LETTER_DAY',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'CottonCandyBlue',
|
||||
petAchievement: 'violetsAreBlue',
|
||||
petNotificationType: 'ACHIEVEMENT_VIOLETS_ARE_BLUE',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'wildBlueYonder',
|
||||
mountNotificationType: 'ACHIEVEMENT_WILD_BLUE_YONDER',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
{
|
||||
color: 'Shade',
|
||||
petAchievement: 'shadyCustomer',
|
||||
petNotificationType: 'ACHIEVEMENT_SHADY_CUSTOMER',
|
||||
petNotificationType: 'ACHIEVEMENT_PET_COLOR',
|
||||
mountAchievement: 'shadeOfItAll',
|
||||
mountNotificationType: 'ACHIEVEMENT_SHADE_OF_IT_ALL',
|
||||
mountNotificationType: 'ACHIEVEMENT_MOUNT_COLOR',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ const ANIMAL_SET_ACHIEVEMENTS = {
|
||||
'Unicorn',
|
||||
],
|
||||
achievementKey: 'legendaryBestiary',
|
||||
notificationType: 'ACHIEVEMENT_LEGENDARY_BESTIARY',
|
||||
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
|
||||
},
|
||||
birdsOfAFeather: {
|
||||
type: 'pet',
|
||||
@@ -24,7 +24,7 @@ const ANIMAL_SET_ACHIEVEMENTS = {
|
||||
'Peacock',
|
||||
],
|
||||
achievementKey: 'birdsOfAFeather',
|
||||
notificationType: 'ACHIEVEMENT_BIRDS_OF_A_FEATHER',
|
||||
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
|
||||
},
|
||||
domesticated: {
|
||||
type: 'pet',
|
||||
@@ -39,7 +39,7 @@ const ANIMAL_SET_ACHIEVEMENTS = {
|
||||
'Cow',
|
||||
],
|
||||
achievementKey: 'domesticated',
|
||||
notificationType: 'ACHIEVEMENT_DOMESTICATED',
|
||||
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
|
||||
},
|
||||
zodiacZookeeper: {
|
||||
type: 'pet',
|
||||
@@ -53,12 +53,12 @@ const ANIMAL_SET_ACHIEVEMENTS = {
|
||||
'Monkey',
|
||||
'Rooster',
|
||||
'Wolf',
|
||||
'TigerCub',
|
||||
'Tiger',
|
||||
'FlyingPig',
|
||||
'Dragon',
|
||||
],
|
||||
achievementKey: 'zodiacZookeeper',
|
||||
notificationType: 'ACHIEVEMENT_ZODIAC_ZOOKEEPER',
|
||||
notificationType: 'ACHIEVEMENT_ANIMAL_SET',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ export { default as SEASONAL_SETS } from './seasonalSets';
|
||||
export { default as ANIMAL_COLOR_ACHIEVEMENTS } from './animalColorAchievements';
|
||||
export { default as ANIMAL_SET_ACHIEVEMENTS } from './animalSetAchievements';
|
||||
export { default as QUEST_SERIES_ACHIEVEMENTS } from './questSeriesAchievements';
|
||||
export { default as STABLE_ACHIEVEMENTS } from './stableAchievements';
|
||||
export { default as ITEM_LIST } from './itemList';
|
||||
export { default as QUEST_SERIES } from '../quests/series';
|
||||
export { default as QUEST_MASTERCLASSER } from '../quests/masterclasser';
|
||||
|
||||
@@ -17,10 +17,21 @@ const QUEST_SERIES_ACHIEVEMENTS = {
|
||||
'lostMasterclasser3',
|
||||
'lostMasterclasser4',
|
||||
],
|
||||
mindOverMatter: [
|
||||
'rock',
|
||||
'slime',
|
||||
'yarn',
|
||||
bareNecessities: [
|
||||
'monkey',
|
||||
'sloth',
|
||||
'treeling',
|
||||
],
|
||||
bugBonanza: [
|
||||
'beetle',
|
||||
'butterfly',
|
||||
'snail',
|
||||
'spider',
|
||||
],
|
||||
freshwaterFriends: [
|
||||
'axolotl',
|
||||
'frog',
|
||||
'hippo',
|
||||
],
|
||||
justAddWater: [
|
||||
'octopus',
|
||||
@@ -32,21 +43,10 @@ const QUEST_SERIES_ACHIEVEMENTS = {
|
||||
'seaserpent',
|
||||
'dolphin',
|
||||
],
|
||||
bugBonanza: [
|
||||
'beetle',
|
||||
'butterfly',
|
||||
'snail',
|
||||
'spider',
|
||||
],
|
||||
bareNecessities: [
|
||||
'monkey',
|
||||
'sloth',
|
||||
'treeling',
|
||||
],
|
||||
freshwaterFriends: [
|
||||
'axolotl',
|
||||
'frog',
|
||||
'hippo',
|
||||
mindOverMatter: [
|
||||
'rock',
|
||||
'slime',
|
||||
'yarn',
|
||||
],
|
||||
seasonalSpecialist: [
|
||||
'egg',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
const STABLE_ACHIEVEMENTS = {
|
||||
ACHIEVEMENT_BEAST_MASTER: {
|
||||
masterAchievement: 'beastMasterName',
|
||||
masterNotificationType: 'ACHIEVEMENT_STABLE',
|
||||
},
|
||||
ACHIEVEMENT_MOUNT_MASTER: {
|
||||
masterAchievement: 'mountMasterName',
|
||||
masterNotificationType: 'ACHIEVEMENT_STABLE',
|
||||
},
|
||||
ACHIEVEMENT_TRIAD_BINGO: {
|
||||
masterAchievement: 'triadBingoName',
|
||||
masterNotificationType: 'ACHIEVEMENT_STABLE',
|
||||
},
|
||||
};
|
||||
|
||||
export default STABLE_ACHIEVEMENTS;
|
||||
Reference in New Issue
Block a user