Fixed parenting. Started on UI rewrite for new parenting system

This commit is contained in:
Thaum
2015-03-18 13:56:41 +00:00
parent 3656a0b66f
commit ecc43752aa
12 changed files with 76 additions and 40 deletions

View File

@@ -1,13 +1,14 @@
Features = new Mongo.Collection("features");
Schemas.Feature = new SimpleSchema({
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
description:{type: String, optional: true, trim: false},
uses: {type: String, optional: true, trim: false},
used: {type: Number, defaultValue: 0},
reset: {type: String, allowedValues: ["manual", "longRest", "shortRest"], defaultValue: "manual"},
enabled: {type: String, allowedValues: ["enabled", "disabled", "alwaysEnabled"], defaultValue: "alwaysEnabled"},
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
name: {type: String, trim: false},
description: {type: String, optional: true, trim: false},
uses: {type: String, optional: true, trim: false},
used: {type: Number, defaultValue: 0},
reset: {type: String, allowedValues: ["manual", "longRest", "shortRest"], defaultValue: "manual"},
enabled: {type: Boolean, defaultValue: true},
alwaysEnabled:{type: Boolean, defaultValue: true},
color: {type: String, allowedValues: _.pluck(colorOptions, "key"), defaultValue: "q"}
});
@@ -23,7 +24,7 @@ Features.helpers({
});
Features.attachBehaviour('softRemovable');
makeParent(Features); //parents of effects and attacks
makeParent(Features, ['name', 'enabled']); //parents of effects and attacks
Features.allow(CHARACTER_SUBSCHEMA_ALLOW);
Features.deny(CHARACTER_SUBSCHEMA_DENY);