Fixed parenting. Started on UI rewrite for new parenting system
This commit is contained in:
@@ -66,7 +66,7 @@ Schemas.Attack = new SimpleSchema({
|
||||
Attacks.attachSchema(Schemas.Attack);
|
||||
|
||||
Attacks.attachBehaviour('softRemovable');
|
||||
makeChild(Attacks); //children of lots of things
|
||||
makeChild(Attacks, ['name', 'enabled']); //children of lots of things
|
||||
|
||||
Attacks.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||
Attacks.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||
|
||||
@@ -21,7 +21,7 @@ Schemas.Buff = new SimpleSchema({
|
||||
Buffs.attachSchema(Schemas.Buff);
|
||||
|
||||
Buffs.attachBehaviour('softRemovable');
|
||||
makeParent(Buffs); //parents of effects and attacks
|
||||
makeParent(Buffs, 'name'); //parents of effects and attacks
|
||||
|
||||
Buffs.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||
Buffs.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||
|
||||
@@ -22,7 +22,7 @@ Schemas.Class = new SimpleSchema({
|
||||
Classes.attachSchema(Schemas.Class);
|
||||
|
||||
Classes.attachBehaviour('softRemovable');
|
||||
makeParent(Classes); //parents of effects and attacks
|
||||
makeParent(Classes, 'name'); //parents of effects and attacks
|
||||
|
||||
Classes.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||
Classes.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||
|
||||
@@ -90,7 +90,7 @@ Characters.after.insert(function (userId, char) {
|
||||
});
|
||||
|
||||
Effects.attachBehaviour('softRemovable');
|
||||
makeChild(Effects); //children of lots of things
|
||||
makeChild(Effects, ['name', 'enabled']); //children of lots of things
|
||||
|
||||
Effects.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||
Effects.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user