Merge branch 'develop' into sabe/attributes

This commit is contained in:
Sabe Jones
2014-01-01 12:42:53 -06:00
34 changed files with 439 additions and 160 deletions
+2 -2
View File
@@ -182,7 +182,7 @@ GroupSchema.statics.collectQuest = function(user, progress, cb) {
return m;
}, []);
foundText = foundText ? foundText.join(', ') : 'nothing';
group.sendChat("`<" + user.profile.name + "> found "+foundText+".`");
group.sendChat("`" + user.profile.name + " found "+foundText+".`");
group.markModified('quest.progress.collect');
// Still needs completing
@@ -210,7 +210,7 @@ GroupSchema.statics.bossQuest = function(user, progress, cb) {
var down = progress.down * quest.boss.str; // multiply by boss strength
group.quest.progress.hp -= progress.up;
group.sendChat("`<" + user.profile.name + "> attacks <" + quest.boss.name + "> for " + (progress.up.toFixed(1)) + " damage, <" + quest.boss.name + "> attacks party for " + Math.abs(down).toFixed(1) + " damage.`");
group.sendChat("`" + user.profile.name + " attacks " + quest.boss.name + " for " + (progress.up.toFixed(1)) + " damage, " + quest.boss.name + " attacks party for " + Math.abs(down).toFixed(1) + " damage.`");
// Everyone takes damage
var series = [
+13 -1
View File
@@ -39,6 +39,14 @@ var HabitSchema = new Schema(
, { _id: false }
);
var collapseChecklist = {type:Boolean, 'default':false};
var checklist = [{
completed:{type:Boolean,'default':false},
text: String,
_id:false,
id: {type:String,'default':shared.uuid}
}];
var DailySchema = new Schema(
_.defaults({
type: {type:String, 'default': 'daily'},
@@ -53,6 +61,8 @@ var DailySchema = new Schema(
s: {type: Boolean, 'default': true},
su: {type: Boolean, 'default': true}
},
collapseChecklist:collapseChecklist,
checklist:checklist,
streak: {type: Number, 'default': 0}
}, TaskSchema)
, { _id: false }
@@ -62,7 +72,9 @@ var TodoSchema = new Schema(
_.defaults({
type: {type:String, 'default': 'todo'},
completed: {type: Boolean, 'default': false},
date: String // due date for todos // FIXME we're getting parse errors, people have stored as "today" and "3/13". Need to run a migration & put this back to type: Date
date: String, // due date for todos // FIXME we're getting parse errors, people have stored as "today" and "3/13". Need to run a migration & put this back to type: Date
collapseChecklist:collapseChecklist,
checklist:checklist
}, TaskSchema)
, { _id: false }
);
+5 -2
View File
@@ -46,7 +46,9 @@ var UserSchema = new Schema({
snowball: Number,
streak: Number,
challenges: Array,
quests: Schema.Types.Mixed
quests: Schema.Types.Mixed,
rebirths: Number,
rebirthLevel: Number
},
auth: {
facebook: Schema.Types.Mixed,
@@ -95,7 +97,8 @@ var UserSchema = new Schema({
partyEnabled: Boolean, // FIXME do we need this?
contributor: Boolean,
classSelected: {type: Boolean, 'default': false},
mathUpdates: Boolean
mathUpdates: Boolean,
rebirthEnabled: {type: Boolean, 'default': false}
},
history: {
exp: Array, // [{date: Date, value: Number}], // big peformance issues if these are defined