[#1520] add defaults to items.lastDrop date & count
This commit is contained in:
+13
-14
@@ -95,6 +95,7 @@ var UserSchema = new Schema({
|
|||||||
weapon: Number,
|
weapon: Number,
|
||||||
head: Number,
|
head: Number,
|
||||||
shield: Number,
|
shield: Number,
|
||||||
|
|
||||||
/*FIXME - tidy this up, not the best way to store current pet*/
|
/*FIXME - tidy this up, not the best way to store current pet*/
|
||||||
|
|
||||||
currentPet: {
|
currentPet: {
|
||||||
@@ -118,22 +119,20 @@ var UserSchema = new Schema({
|
|||||||
str: String
|
str: String
|
||||||
},
|
},
|
||||||
|
|
||||||
// FIXME revert this back to definition once we've replaced Derby and can run a migration to remove all corrupt eggs
|
eggs: [
|
||||||
eggs: Schema.Types.Mixed,
|
{
|
||||||
// [
|
dialog: String, //You've found a Wolf Egg! Find a hatching potion to pour on this egg, and one day it will hatch into a loyal pet
|
||||||
// {
|
name: String, // Wolf
|
||||||
// text: String, // Wolf
|
notes: String, //Find a hatching potion to pour on this egg, and one day it will hatch into a loyal pet.
|
||||||
// name: String, // Wolf
|
text: String, // Wolf
|
||||||
// value: Number, //3
|
//type: String, //Egg // this is forcing mongoose to return object as "[object Object]", but I don't think this is needed anyway?
|
||||||
// notes: String, //Find a hatching potion to pour on this egg, and one day it will hatch into a loyal pet.
|
value: Number //3
|
||||||
// //type: String, //Egg // this is forcing mongoose to return object as "[object Object]", but I don't think this is needed anyway?
|
}
|
||||||
// dialog: String //You've found a Wolf Egg! Find a hatching potion to pour on this egg, and one day it will hatch into a loyal pet
|
],
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
hatchingPotions: Array, //["Base", "Skeleton",...]
|
hatchingPotions: Array, //["Base", "Skeleton",...]
|
||||||
lastDrop: {
|
lastDrop: {
|
||||||
date: Date,
|
date: {type: Date, 'default': Date.now},
|
||||||
count: Number
|
count: {type: Number, 'default': 0}
|
||||||
},
|
},
|
||||||
/* ["BearCub-Base", "Cactus-Base", ...]*/
|
/* ["BearCub-Base", "Cactus-Base", ...]*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user