rewrite: add read-only inventory. fix empty pet issue, it was the wrong

casting type UserSchema.items.eggs.type
This commit is contained in:
Tyler Renelle
2013-09-02 14:26:59 -04:00
parent 8482439617
commit 687da68d52
4 changed files with 34 additions and 76 deletions

View File

@@ -123,29 +123,15 @@ var UserSchema = new Schema({
},
eggs: [
{
/*"Wolf",*/
text: String,
/*"Wolf",*/
name: String,
/*3*/
value: Number,
/*"Find a hatching potion to pour on this egg, and one day it will hatch into a loyal pet.",*/
notes: String,
/*"Egg",*/
type: 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." },*/
dialog: String
text: String, // Wolf
name: String, // Wolf
value: Number, //3
notes: String, //Find a hatching potion to pour on this egg, and one day it will hatch into a loyal pet.
//type: String, //Egg // FIXME 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
}
],
/* ["Base", "Skeleton",...]*/
hatchingPotions: Array,
hatchingPotions: Array, //["Base", "Skeleton",...]
lastDrop: {
date: Date,
count: Number