backgrounds and Armoire 2016-11 (#8178)
* feat(content): backgrounds and Armoire 2016-11 * chore(event): November Take This migration * chore(news): Bailey
75
migrations/20161102_takeThis.js
Normal file
@@ -0,0 +1,75 @@
|
||||
var migrationName = '20161102_takeThis.js';
|
||||
var authorName = 'Sabe'; // in case script author needs to know when their ...
|
||||
var authorUuid = '7f14ed62-5408-4e1b-be83-ada62d504931'; //... own data is done
|
||||
|
||||
/*
|
||||
* Award Take This ladder items to participants in this month's challenge
|
||||
*/
|
||||
|
||||
var mongo = require('mongoskin');
|
||||
|
||||
var connectionString = 'mongodb://localhost:27017/habitrpg?auto_reconnect=true'; // FOR TEST DATABASE
|
||||
|
||||
var dbUsers = mongo.db(connectionString).collection('users');
|
||||
|
||||
// specify a query to limit the affected users (empty for all users):
|
||||
var query = {
|
||||
'migration':{$ne:migrationName},
|
||||
'challenges':{$in:['d1be0965-e909-4d30-82fa-9a0011f885b2']}
|
||||
};
|
||||
|
||||
// specify fields we are interested in to limit retrieved data (empty if we're not reading data):
|
||||
var fields = {
|
||||
'items.gear.owned': 1
|
||||
};
|
||||
|
||||
console.warn('Updating users...');
|
||||
var progressCount = 1000;
|
||||
var count = 0;
|
||||
dbUsers.findEach(query, fields, {batchSize:250}, function(err, user) {
|
||||
if (err) { return exiting(1, 'ERROR! ' + err); }
|
||||
if (!user) {
|
||||
console.warn('All appropriate users found and modified.');
|
||||
setTimeout(displayData, 300000);
|
||||
return;
|
||||
}
|
||||
count++;
|
||||
|
||||
// specify user data to change:
|
||||
var set = {};
|
||||
|
||||
if (typeof user.items.gear.owned.head_special_takeThis !== 'undefined') {
|
||||
set = {'migration':migrationName, 'items.gear.owned.body_special_takeThis':false};
|
||||
} else if (typeof user.items.gear.owned.armor_special_takeThis !== 'undefined') {
|
||||
set = {'migration':migrationName, 'items.gear.owned.head_special_takeThis':false};
|
||||
} else if (typeof user.items.gear.owned.weapon_special_takeThis !== 'undefined') {
|
||||
set = {'migration':migrationName, 'items.gear.owned.armor_special_takeThis':false};
|
||||
} else if (typeof user.items.gear.owned.shield_special_takeThis !== 'undefined') {
|
||||
set = {'migration':migrationName, 'items.gear.owned.weapon_special_takeThis':false};
|
||||
} else {
|
||||
set = {'migration':migrationName, 'items.gear.owned.shield_special_takeThis':false};
|
||||
}
|
||||
|
||||
dbUsers.update({_id:user._id}, {$set:set});
|
||||
|
||||
if (count%progressCount == 0) console.warn(count + ' ' + user._id);
|
||||
if (user._id == authorUuid) console.warn(authorName + ' processed');
|
||||
});
|
||||
|
||||
|
||||
function displayData() {
|
||||
console.warn('\n' + count + ' users processed\n');
|
||||
return exiting(0);
|
||||
}
|
||||
|
||||
|
||||
function exiting(code, msg) {
|
||||
code = code || 0; // 0 = success
|
||||
if (code && !msg) { msg = 'ERROR!'; }
|
||||
if (msg) {
|
||||
if (code) { console.error(msg); }
|
||||
else { console.log( msg); }
|
||||
}
|
||||
process.exit(code);
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 632 B |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 776 B |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 618 B |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 17 KiB |
@@ -409,6 +409,20 @@ let backgrounds = {
|
||||
notes: t('backgroundStrangeSewersNotes'),
|
||||
},
|
||||
},
|
||||
backgrounds112016: {
|
||||
midnight_clouds: {
|
||||
text: t('backgroundMidnightCloudsText'),
|
||||
notes: t('backgroundMidnightCloudsNotes'),
|
||||
},
|
||||
stormy_rooftops: {
|
||||
text: t('backgroundStormyRooftopsText'),
|
||||
notes: t('backgroundStormyRooftopsNotes'),
|
||||
},
|
||||
windy_autumn: {
|
||||
text: t('backgroundWindyAutumnText'),
|
||||
notes: t('backgroundWindyAutumnNotes'),
|
||||
},
|
||||
},
|
||||
};
|
||||
/* eslint-enable quote-props */
|
||||
|
||||
|
||||
@@ -174,6 +174,24 @@ let armor = {
|
||||
set: 'ogre',
|
||||
canOwn: ownsItem('armor_armoire_ogreArmor'),
|
||||
},
|
||||
ironBlueArcherArmor: {
|
||||
text: t('armorArmoireIronBlueArcherArmorText'),
|
||||
notes: t('armorArmoireIronBlueArcherArmorNotes', { str: 12 }),
|
||||
value: 100,
|
||||
str: 12,
|
||||
set: 'blueArcher',
|
||||
canOwn: ownsItem('armor_armoire_ironBlueArcherArmor'),
|
||||
},
|
||||
redPartyDress: {
|
||||
text: t('armorArmoireRedPartyDressText'),
|
||||
notes: t('armorArmoireRedPartyDressNotes', { attrs: 7 }),
|
||||
value: 100,
|
||||
str: 7,
|
||||
con: 7,
|
||||
int: 7,
|
||||
set: 'redHairbow',
|
||||
canOwn: ownsItem('armor_armoire_redPartyDress'),
|
||||
},
|
||||
};
|
||||
|
||||
let eyewear = {
|
||||
@@ -203,6 +221,7 @@ let head = {
|
||||
str: 5,
|
||||
int: 5,
|
||||
con: 5,
|
||||
set: 'redHairbow',
|
||||
canOwn: ownsItem('head_armoire_redHairbow'),
|
||||
},
|
||||
violetFloppyHat: {
|
||||
@@ -429,6 +448,14 @@ let head = {
|
||||
set: 'ogre',
|
||||
canOwn: ownsItem('head_armoire_ogreMask'),
|
||||
},
|
||||
ironBlueArcherHelm: {
|
||||
text: t('headArmoireIronBlueArcherHelmText'),
|
||||
notes: t('headArmoireIronBlueArcherHelmNotes', { con: 9 }),
|
||||
value: 100,
|
||||
con: 9,
|
||||
set: 'blueArcher',
|
||||
canOwn: ownsItem('head_armoire_ironBlueArcherHelm'),
|
||||
},
|
||||
};
|
||||
|
||||
let shield = {
|
||||
@@ -599,6 +626,7 @@ let weapon = {
|
||||
con: 8,
|
||||
str: 7,
|
||||
twoHanded: true,
|
||||
set: 'blueArcher',
|
||||
canOwn: ownsItem('weapon_armoire_blueLongbow'),
|
||||
},
|
||||
glowingSpear: {
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
h2 10/31/2016 - HAPPY HABITOWEEN!
|
||||
h2 11/02/2016 - BACKGROUNDS, ARMOIRE, ANDROID APP, TAKE THIS, AND COSTUME CHALLENGE
|
||||
hr
|
||||
tr
|
||||
td
|
||||
.promo_backgrounds_armoire_201611.pull-right
|
||||
h3 November Backgrounds and Armoire Items!
|
||||
p We’ve added three new backgrounds to the <a href='/#/options/profile/backgrounds'>Background Shop</a>! Now your avatar can chase leaves during a Windy Autumn, creep across Stormy Rooftops, and fly through the Midnight Clouds.
|
||||
br
|
||||
p Plus, there’s new gold-purchasable equipment in the Enchanted Armoire, including the Iron Archer Set and the Red Party Dress. Better work hard on your real-life tasks to earn all the pieces! Enjoy :)
|
||||
p.small.muted Backgrounds by Laurelei Kirsch, FirozTaverbi, and KusSv
|
||||
p.small.muted Armoire Items by Balduranne and emmavig
|
||||
tr
|
||||
td
|
||||
h3 New Android Update: Custom Day Start!
|
||||
p We've released <a href='https://play.google.com/store/apps/details?id=com.habitrpg.android.habitica&hl=en' target='_blank'>a new Android update</a> that includes the ability to change your custom day start!
|
||||
br
|
||||
p Do you want your Dailies to roll over at a different time than midnight? Now you can change your Custom Day Start under Settings! Plus, we fixed a bunch of bugs, so be sure to download it now for a better Habitica experience!
|
||||
br
|
||||
p If you like the improvements that we’ve been making to our app, please consider reviewing this new version. It really helps us out! We hope you enjoy the update.
|
||||
p.small.muted by viirus
|
||||
tr
|
||||
td
|
||||
h3 New Take This Challenge!
|
||||
p The next Take This Challenge has launched, <a href='/#/options/groups/challenges/ff674aba-a114-4a6f-8ebc-1de27ffb646e'>Keep Calm and Carry On</a>, with a focus on alleviating anger and stress. Be sure to check it out to earn additional pieces of the Take This armor set!
|
||||
br
|
||||
p <a href='http://www.takethis.org/' target='_blank'>Take This</a> is a nonprofit that seeks to inform the gamer community about mental health issues, to provide education about mental disorders and mental illness prevention, and to reduce the stigma of mental illness.
|
||||
br
|
||||
p Congratulations to the winners of the last Take This Challenge, "Test Thy Courage!": grand prize winner taranion, and runners-up Lenny Pepperbottom, Captain Jolly, Red, vorpalblade, and G! Plus, all participants in that Challenge have received a piece of the <a href='http://habitica.wikia.com/wiki/Event_Item_Sequences#Take_This_Armor_Set' target='_blank'>Take This item set</a>. It is located in your Rewards column. Enjoy!
|
||||
p.small.muted by Lemoness, SabreCat, Doctor B, and the Take This team
|
||||
tr
|
||||
td
|
||||
h3 Costume Challenge Closed
|
||||
p Thanks so much to everyone who participated in our Community Costume Challenge! We're still sorting through the entries, but as soon as we're done, we will distribute the badges to the participants and post another announcement to let people know. We hope you had fun!
|
||||
|
||||
if menuItem !== 'oldNews'
|
||||
hr
|
||||
a(href='/static/old-news', target='_blank') Read older news
|
||||
|
||||
mixin oldNews
|
||||
h2 10/31/2016 - HAPPY HABITOWEEN!
|
||||
tr
|
||||
td
|
||||
h3 Happy Habitoween!
|
||||
@@ -28,12 +66,6 @@ h2 10/31/2016 - HAPPY HABITOWEEN!
|
||||
br
|
||||
p Thanks so much for your supporting the site -- you're helping us keep Habitica alive. Happy Habitoween!
|
||||
p.small.muted by Lemoness
|
||||
|
||||
if menuItem !== 'oldNews'
|
||||
hr
|
||||
a(href='/static/old-news', target='_blank') Read older news
|
||||
|
||||
mixin oldNews
|
||||
h2 10/27/2016 - HABITICA BLOG: GUILDS FOR WRITERS AND HABITICA PLAYLIST
|
||||
tr
|
||||
td
|
||||
|
||||