Added Soft remove and a character asset parenting system

This commit is contained in:
Thaum
2015-03-18 08:59:02 +00:00
parent 06b0ad7eba
commit 3656a0b66f
24 changed files with 215 additions and 121 deletions

View File

@@ -35,11 +35,9 @@ Schemas.Effect = new SimpleSchema({
defaultValue: "editable",
allowedValues: ["editable", "feature", "class", "buff", "equipment", "racial", "inate"]
},
//the id of the feature, buff or item that created this effect
sourceId: {
type: String,
regEx: SimpleSchema.RegEx.Id,
optional: true
//the thing that created this effect
parent: {
type: Schemas.Parent
},
//which stat the effect is applied to
stat: {
@@ -91,5 +89,8 @@ Characters.after.insert(function (userId, char) {
}
});
Effects.attachBehaviour('softRemovable');
makeChild(Effects); //children of lots of things
Effects.allow(CHARACTER_SUBSCHEMA_ALLOW);
Effects.deny(CHARACTER_SUBSCHEMA_DENY);