Added color options for containers, added spell lists

This commit is contained in:
Thaum
2015-02-12 13:08:20 +00:00
parent 5e98154e8d
commit 7441f09f37
32 changed files with 226 additions and 84 deletions

View File

@@ -187,7 +187,8 @@ Schemas.Character = new SimpleSchema({
//permissions
owner: { type: String, regEx: SimpleSchema.RegEx.Id },
readers: { type: [String], regEx: SimpleSchema.RegEx.Id },
writers: { type: [String], regEx: SimpleSchema.RegEx.Id }
writers: { type: [String], regEx: SimpleSchema.RegEx.Id },
color: {type: String, allowedValues: _.keys(colorOptions), defaultValue: "grey"}
//TODO add per-character settings
});

View File

@@ -7,6 +7,7 @@ Schemas.Feature = new SimpleSchema({
uses: {type: String, optional: true, trim: false},
used: {type: Number, defaultValue: 0},
reset: {type: String, allowedValues: ["manual", "longRest", "shortRest"], defaultValue: "manual"},
color: {type: String, allowedValues: _.keys(colorOptions), defaultValue: "green"}
});
Features.attachSchema(Schemas.Feature);

View File

@@ -3,8 +3,7 @@ Spells = new Meteor.Collection("spells");
Schemas.Spell = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
listId: {type: String, regEx: SimpleSchema.RegEx.Id},
prepared: {type: Boolean, defaultValue: false},
prepareCost: {type: Number, defaultValue: 1}, //0 for spells that "dont count against your max number of spells prepared", 1 otherwise
prepared: {type: String, defaultValue: "unprepared", allowedValues: ["prepared","unprepared","always"]},
name: {type: String},
description: {type: String, optional: true},
castingTime: {type: String, optional: true},