Made character arrays of objects into their own collections

This commit is contained in:
Thaum
2015-01-28 10:20:23 +00:00
parent 80c2c3249d
commit 4f205eb970
8 changed files with 59 additions and 40 deletions

View File

@@ -0,0 +1,28 @@
Actions = new Meteor.Collection("actions");
/*
* Actions are given to a character by items and features
*/
Schemas.Action = new SimpleSchema({
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id
},
name: {
type: String
},
description: {
type: String
},
type: {
type: String,
allowedValues: ["action, bonus, reaction, free"],
defaultValue: "action"
},
//the immediate impact of doing this action (eg. -1 rages)
adjustments: {
type: [Schemas.Adjustment], defaultValue: []
}
});
Actions.attachSchema(Schemas.Action);