Merge branch 'develop' of github.com:HabitRPG/habitrpg into develop

This commit is contained in:
Blade Barringer 2016-10-02 12:59:09 -05:00
commit 70343079f1
2 changed files with 118 additions and 34 deletions

View file

@ -0,0 +1,73 @@
var migrationName = '20161002_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:['4bbf63b5-10bc-49f9-8e95-5bd2ac99cd1c']}
};
// 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.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);
}

View file

@ -1,48 +1,59 @@
h2 9/29/2016 - WIDGETS ON ANDROID APP, TAG MANAGEMENT ON iOS APP, GAYMERX ARMOR, AND LAST CHANCE FOR COW COSTUME
h2 10/2/2016 - NEW TAKE THIS CHALLENGE!
hr
tr
td
h3 Android Update: Widgets, Tag Editing, and More!
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> which includes a much-requested feature.... WIDGETS! Now you can easily score a Habit, check out your Dailies, and view your avatar and stats.
.promo_takeThis_gear.pull-right
h3 October Take This Challenge: Test Thy Courage!
p The next Take This Challenge has launched, "<a href='/#/options/groups/challenges/d1be0965-e909-4d30-82fa-9a0011f885b2'>Test Thy Courage!</a>", with a focus on positive social interactions. Be sure to check it out to earn additional pieces of the Take This armor set!
br
p This update also includes the ability to edit/delete tags, the ability to select your language options and which day your week starts, and various bug fixes. Be sure to download it now for a better Habitica experience!
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 If you like the improvements that weve 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, DanielKaparunakis, and jbillings
tr
td
h3 iOS Update: Tag Management, Expanded Profile, and More!
p We've released <a href='https://itunes.apple.com/us/app/habitica/id994882113?ls=1&mt=8' target='_blank'>a new iOS update</a> with lots of new features!
br
p Now you can create, edit, and delete tags directly from the app, just by tapping on the Filter button. Plus, we've expanded the profile display to show blurbs, gear, and stats when you click on someone's name. Finally, we've fixed a variety of crashes. Be sure to download it now for a better Habitica experience!
br
p If you like the improvements that weve been making to our app, please consider reviewing this new version. It really helps us out! Old reviews get hidden with each update, but if you go to the review section you can re-post them again with a single tap. We hope you enjoy the update!
p.small.muted by Viirus
tr
td
.promo_unconventional_armor2.pull-right
.promo_rainbow_armor.pull-left.slight-right-margin
h3 GaymerX Armor
p In honor of Habitica's partnership with the <a href='http://gaymerx.com' target='_blank'>GX4 Conference by GaymerX</a>, the Rainbow Warrior set is now available from the Rewards column! It will only be available until October 2nd, so be sure to get it now.
br
p For those of you in the Bay Area, the Unconventional Armor set will be available at the conference, so don't forget to pick up a promo card if you attend! There will also be a limited number of <a href='https://www.stickermule.com/uk/marketplace/9317-habitica-gryphon-sticker' target='_blank'>Habitica stickers</a>.
br
p We hope you enjoy your new armor!
p.small.muted by Lemoness and JJSpace
tr
td
.promo_mystery_201609.pull-right
h3 Last Chance for Cow Costume
p Reminder: this is the final day to <a href='/#/options/settings/subscription'>subscribe</a> and receive the Cow Costume Set! Subscribing also lets you buy gems for gold. The longer your subscription, the more gems you get!
br
p Thanks so much for your support! You help keep Habitica running.
p.small.muted by Lemoness
p Congratulations to the winners of the last Take This Challenge, "I Am the Night!": grand prize winner ladyhalation, and runners-up Khaleesi, SalientAlien, Debeys, Andrew Parkinson, and jenrosehol! 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
if menuItem !== 'oldNews'
hr
a(href='/static/old-news', target='_blank') Read older news
mixin oldNews
h2 9/29/2016 - WIDGETS ON ANDROID APP, TAG MANAGEMENT ON iOS APP, GAYMERX ARMOR, AND LAST CHANCE FOR COW COSTUME
tr
td
h3 Android Update: Widgets, Tag Editing, and More!
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> which includes a much-requested feature.... WIDGETS! Now you can easily score a Habit, check out your Dailies, and view your avatar and stats.
br
p This update also includes the ability to edit/delete tags, the ability to select your language options and which day your week starts, and various bug fixes. Be sure to download it now for a better Habitica experience!
br
p If you like the improvements that weve 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, DanielKaparunakis, and jbillings
tr
td
h3 iOS Update: Tag Management, Expanded Profile, and More!
p We've released <a href='https://itunes.apple.com/us/app/habitica/id994882113?ls=1&mt=8' target='_blank'>a new iOS update</a> with lots of new features!
br
p Now you can create, edit, and delete tags directly from the app, just by tapping on the Filter button. Plus, we've expanded the profile display to show blurbs, gear, and stats when you click on someone's name. Finally, we've fixed a variety of crashes. Be sure to download it now for a better Habitica experience!
br
p If you like the improvements that weve been making to our app, please consider reviewing this new version. It really helps us out! Old reviews get hidden with each update, but if you go to the review section you can re-post them again with a single tap. We hope you enjoy the update!
p.small.muted by Viirus
tr
td
.promo_unconventional_armor2.pull-right
.promo_rainbow_armor.pull-left.slight-right-margin
h3 GaymerX Armor
p In honor of Habitica's partnership with the <a href='http://gaymerx.com' target='_blank'>GX4 Conference by GaymerX</a>, the Rainbow Warrior set is now available from the Rewards column! It will only be available until October 2nd, so be sure to get it now.
br
p For those of you in the Bay Area, the Unconventional Armor set will be available at the conference, so don't forget to pick up a promo card if you attend! There will also be a limited number of <a href='https://www.stickermule.com/uk/marketplace/9317-habitica-gryphon-sticker' target='_blank'>Habitica stickers</a>.
br
p We hope you enjoy your new armor!
p.small.muted by Lemoness and JJSpace
tr
td
.promo_mystery_201609.pull-right
h3 Last Chance for Cow Costume
p Reminder: this is the final day to <a href='/#/options/settings/subscription'>subscribe</a> and receive the Cow Costume Set! Subscribing also lets you buy gems for gold. The longer your subscription, the more gems you get!
br
p Thanks so much for your support! You help keep Habitica running.
p.small.muted by Lemoness
h2 9/27/2016 - USER SPOTLIGHT AND FEATURED WIKI ARTICLE
tr
td