Changed how effects are applied and removed to enable effects expiring after a set duration.
This commit is contained in:
@@ -7,7 +7,7 @@ Schemas.Effect = new SimpleSchema({
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue: function(){
|
||||
if(!isSet) return Random.id();
|
||||
if(!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
name: {
|
||||
@@ -22,14 +22,4 @@ Schemas.Effect = new SimpleSchema({
|
||||
type: String,
|
||||
optional: true
|
||||
}
|
||||
});
|
||||
|
||||
Effect = function(name, value){
|
||||
this._id = Random.id();
|
||||
this.name = name;
|
||||
if (typeof value === "string"){
|
||||
this.calculation = value;
|
||||
} else if (typeof valye === "number"){
|
||||
this.value = value;
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user