Skip to content

Commit

Permalink
May 2024 Content Prebuild (#15185)
Browse files Browse the repository at this point in the history
* 2024-05 css update

* add May subscriber items, enchanted armoire (text placeholders), potions, and quest bundles

* typo correction

* add May achievement

* content fixes after local testing

* canonical date fix

* fix potion descriptions, add periods to background descriptions

* fix canonical date

* updated armoire items

* fix stat display on item

* Fixing merge conflicts

* resolve merge conflicts

* add leading zero to mp drain for mushroom quest

* fix timezones

* proofreading pass

* fix linting errors

* date fixes & linter fixes

* correct armoire expression at end of file

* fix(autolint): roll back Prettier change

---------

Co-authored-by: Sabe Jones <sabe@habitica.com>
  • Loading branch information
CuriousMagpie and Sabe Jones authored Apr 26, 2024
1 parent ee93c8b commit de62207
Show file tree
Hide file tree
Showing 18 changed files with 322 additions and 41 deletions.
99 changes: 99 additions & 0 deletions migrations/archive/2024/20240516_pet_group_achievements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/* eslint-disable no-console */
const MIGRATION_NAME = '202405_pet_group_achievements';
import { model as User } from '../../../website/server/models/user';

const progressCount = 1000;
let count = 0;

async function updateUser (user) {
count++;

let set = {
migration: MIGRATION_NAME,
};

if (user && user.items && user.items.pets) {
const pets = user.items.pets;
if (pets['LionCub-Zombie'] > 0
&& pets['LionCub-Skeleton'] > 0
&& pets['LionCub-Base'] > 0
&& pets['LionCub-Desert'] > 0
&& pets['LionCub-Red'] > 0
&& pets['LionCub-Shade'] > 0
&& pets['LionCub-White']> 0
&& pets['LionCub-Golden'] > 0
&& pets['LionCub-CottonCandyBlue'] > 0
&& pets['LionCub-CottonCandyPink'] > 0
&& pets['TigerCub-Zombie'] > 0
&& pets['TigerCub-Skeleton'] > 0
&& pets['TigerCub-Base'] > 0
&& pets['TigerCub-Desert'] > 0
&& pets['TigerCub-Red'] > 0
&& pets['TigerCub-Shade'] > 0
&& pets['TigerCub-White'] > 0
&& pets['TigerCub-Golden'] > 0
&& pets['TigerCub-CottonCandyBlue'] > 0
&& pets['TigerCub-CottonCandyPink'] > 0
&& pets['Sabretooth-Zombie'] > 0
&& pets['Sabretooth-Skeleton'] > 0
&& pets['Sabretooth-Base'] > 0
&& pets['Sabretooth-Desert'] > 0
&& pets['Sabretooth-Red'] > 0
&& pets['Sabretooth-Shade'] > 0
&& pets['Sabretooth-White'] > 0
&& pets['Sabretooth-Golden'] > 0
&& pets['Sabretooth-CottonCandyBlue'] > 0
&& pets['Sabretooth-CottonCandyPink'] > 0
&& pets['Cheetah-Zombie'] > 0
&& pets['Cheetah-Skeleton'] > 0
&& pets['Cheetah-Base'] > 0
&& pets['Cheetah-Desert'] > 0
&& pets['Cheetah-Red'] > 0
&& pets['Cheetah-Shade'] > 0
&& pets['Cheetah-White'] > 0
&& pets['Cheetah-Golden'] > 0
&& pets['Cheetah-CottonCandyBlue'] > 0
&& pets['Cheetah-CottonCandyPink'] > 0 ) {
set['achievements.cats'] = true;

}
}

if (count % progressCount === 0) console.warn(`${count} ${user._id}`);

return await User.updateOne({ _id: user._id }, { $set: set }).exec();
}

export default async function processUsers () {
let query = {
migration: { $ne: MIGRATION_NAME },
'auth.timestamps.loggedin': { $gt: new Date('2024-03-01') },
};

const fields = {
_id: 1,
items: 1,
};

while (true) { // eslint-disable-line no-constant-condition
const users = await User // eslint-disable-line no-await-in-loop
.find(query)
.limit(250)
.sort({_id: 1})
.select(fields)
.lean()
.exec();

if (users.length === 0) {
console.warn('All appropriate users found and modified.');
console.warn(`\n${count} users processed\n`);
break;
} else {
query._id = {
$gt: users[users.length - 1]._id,
};
}

await Promise.all(users.map(updateUser)); // eslint-disable-line no-await-in-loop
}
};
105 changes: 105 additions & 0 deletions website/client/src/assets/css/sprites/spritesmith-main.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@
width: 48px;
height: 52px;
}
.achievement-cats2x {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/achievement-cats2x.png');
width: 68px;
height: 68px;
}
.achievement-cave2x {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/achievement-cave2x.png');
width: 48px;
Expand Down Expand Up @@ -975,6 +980,11 @@
width: 141px;
height: 147px;
}
.background_dragons_back {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_dragons_back.png');
width: 141px;
height: 147px;
}
.background_dragons_lair {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_dragons_lair.png');
width: 141px;
Expand Down Expand Up @@ -1600,6 +1610,11 @@
width: 141px;
height: 147px;
}
.background_maypole {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_maypole.png');
width: 141px;
height: 147px;
}
.background_meandering_cave {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_meandering_cave.png');
width: 141px;
Expand Down Expand Up @@ -1770,6 +1785,11 @@
width: 141px;
height: 147px;
}
.background_potters_studio {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_potters_studio.png');
width: 141px;
height: 147px;
}
.background_productivity_plaza {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/background_productivity_plaza.png');
width: 141px;
Expand Down Expand Up @@ -2853,6 +2873,11 @@
width: 68px;
height: 68px;
}
.icon_background_dragons_back {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_dragons_back.png');
width: 68px;
height: 68px;
}
.icon_background_dragons_lair {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_dragons_lair.png');
width: 68px;
Expand Down Expand Up @@ -3478,6 +3503,11 @@
width: 68px;
height: 68px;
}
.icon_background_maypole {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_maypole.png');
width: 68px;
height: 68px;
}
.icon_background_meandering_cave {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_meandering_cave.png');
width: 68px;
Expand Down Expand Up @@ -3648,6 +3678,11 @@
width: 68px;
height: 68px;
}
.icon_background_potters_studio {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_potters_studio.png');
width: 68px;
height: 68px;
}
.icon_background_productivity_plaza {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/icon_background_productivity_plaza.png');
width: 68px;
Expand Down Expand Up @@ -19144,6 +19179,11 @@
width: 90px;
height: 90px;
}
.broad_armor_armoire_pottersApron {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/broad_armor_armoire_pottersApron.png');
width: 114px;
height: 90px;
}
.broad_armor_armoire_ramFleeceRobes {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/broad_armor_armoire_ramFleeceRobes.png');
width: 90px;
Expand Down Expand Up @@ -19694,6 +19734,11 @@
width: 90px;
height: 90px;
}
.head_armoire_pottersBandana {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/head_armoire_pottersBandana.png');
width: 114px;
height: 90px;
}
.head_armoire_purpleSpookySorceryHat {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/head_armoire_purpleSpookySorceryHat.png');
width: 114px;
Expand Down Expand Up @@ -20174,6 +20219,11 @@
width: 114px;
height: 90px;
}
.shield_armoire_thrownVessel {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shield_armoire_thrownVessel.png');
width: 114px;
height: 90px;
}
.shield_armoire_treasureMap {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shield_armoire_treasureMap.png');
width: 114px;
Expand Down Expand Up @@ -20544,6 +20594,11 @@
width: 68px;
height: 68px;
}
.shop_armor_armoire_pottersApron {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_armor_armoire_pottersApron.png');
width: 68px;
height: 68px;
}
.shop_armor_armoire_ramFleeceRobes {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_armor_armoire_ramFleeceRobes.png');
width: 68px;
Expand Down Expand Up @@ -21154,6 +21209,11 @@
width: 68px;
height: 68px;
}
.shop_head_armoire_pottersBandana {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_head_armoire_pottersBandana.png');
width: 68px;
height: 68px;
}
.shop_head_armoire_purpleSpookySorceryHat {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_head_armoire_purpleSpookySorceryHat.png');
width: 68px;
Expand Down Expand Up @@ -21634,6 +21694,11 @@
width: 68px;
height: 68px;
}
.shop_shield_armoire_thrownVessel {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_shield_armoire_thrownVessel.png');
width: 68px;
height: 68px;
}
.shop_shield_armoire_treasureMap {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_shield_armoire_treasureMap.png');
width: 68px;
Expand Down Expand Up @@ -22059,6 +22124,11 @@
width: 68px;
height: 68px;
}
.shop_weapon_armoire_pottersWheel {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_pottersWheel.png');
width: 68px;
height: 68px;
}
.shop_weapon_armoire_pushBroom {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_weapon_armoire_pushBroom.png');
width: 68px;
Expand Down Expand Up @@ -22504,6 +22574,11 @@
width: 90px;
height: 90px;
}
.slim_armor_armoire_pottersApron {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/slim_armor_armoire_pottersApron.png');
width: 114px;
height: 90px;
}
.slim_armor_armoire_ramFleeceRobes {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/slim_armor_armoire_ramFleeceRobes.png');
width: 90px;
Expand Down Expand Up @@ -23064,6 +23139,11 @@
width: 114px;
height: 90px;
}
.weapon_armoire_pottersWheel {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_pottersWheel.png');
width: 114px;
height: 90px;
}
.weapon_armoire_pushBroom {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/weapon_armoire_pushBroom.png');
width: 114px;
Expand Down Expand Up @@ -29344,6 +29424,31 @@
width: 114px;
height: 90px;
}
.back_mystery_202405 {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/back_mystery_202405.png');
width: 114px;
height: 90px;
}
.headAccessory_mystery_202405 {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/headAccessory_mystery_202405.png');
width: 114px;
height: 90px;
}
.shop_back_mystery_202405 {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_back_mystery_202405.png');
width: 68px;
height: 68px;
}
.shop_headAccessory_mystery_202405 {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_headAccessory_mystery_202405.png');
width: 68px;
height: 68px;
}
.shop_set_mystery_202405 {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/shop_set_mystery_202405.png');
width: 68px;
height: 68px;
}
.broad_armor_mystery_301404 {
background-image: url('https://habitica-assets.s3.amazonaws.com/mobileApp/images/broad_armor_mystery_301404.png');
width: 90px;
Expand Down
8 changes: 5 additions & 3 deletions website/common/locales/en/achievements.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"achievementReptacularRumbleModalText": "You collected all the reptile pets!",
"achievementGroupsBeta2022": "Interactive Beta Tester",
"achievementGroupsBeta2022Text": "You and your group provided invaluable feedback to help Habitica test.",
"achievementGroupsBeta2022ModalText":"You and your groups helped Habitica by testing and providing feedback!",
"achievementGroupsBeta2022ModalText": "You and your groups helped Habitica by testing and providing feedback!",
"achievementWoodlandWizard": "Woodland Wizard",
"achievementWoodlandWizardText": "Has hatched all standard colors of forest creatures: Badger, Bear, Deer, Fox, Frog, Hedgehog, Owl, Snail, Squirrel, and Treeling!",
"achievementWoodlandWizardModalText": "You collected all the forest pets!",
Expand All @@ -162,6 +162,8 @@
"achievementRoughRiderModalText": "You collected all the basic colors of the uncomfortable pets and mounts!",
"achievementRodentRuler": "Rodent Ruler",
"achievementRodentRulerText": "Has hatched all standard colors of rodent pets: Guinea Pig, Rat, and Squirrel!",
"achievementRodentRulerModalText": "You collected all the rodent pets!"

"achievementRodentRulerModalText": "You collected all the rodent pets!",
"achievementCats": "Cat Herder",
"achievementCatsText": "Has hatched all the standard colors of cat pets: Cheetah, Lion, Sabretooth, and Tiger!",
"achievementCatsModalText": "You collected all the cat pets!"
}
10 changes: 9 additions & 1 deletion website/common/locales/en/backgrounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,15 @@
"backgroundWallFloweringVinesText": "Wall with Flowering Vines",
"backgroundWallFloweringVinesNotes": "Hang out by a wall of Flowering Vines.",
"backgroundContainerGardenText": "Container Garden",
"backgroundContainerGardenNotes": "Get your hands dirty wth the Container Garden.",
"backgroundContainerGardenNotes": "Get your hands dirty wth the Container Garden.",

"backgrounds052024": "SET 120: Released May 2024",
"backgroundDragonsBackText": "Dragon's Back",
"backgroundDragonsBackNotes": "Sail the sky on a Dragon's Back.",
"backgroundMaypoleText": "Maypole",
"backgroundMaypoleNotes": "Dance around a merry Maypole.",
"backgroundPottersStudioText": "Potter's Studio",
"backgroundPottersStudioNotes": "Create art in the Potter's Studio.",

"timeTravelBackgrounds": "Steampunk Backgrounds",
"backgroundAirshipText": "Airship",
Expand Down
Loading

0 comments on commit de62207

Please sign in to comment.