Added fields to features, made features able to expire
This commit is contained in:
@@ -1,10 +1,22 @@
|
||||
Schemas.Feature = new SimpleSchema({
|
||||
_id: {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
name: {type: String},
|
||||
description:{type: String},
|
||||
buffs: {type: [Schemas.Buff], optional: true},
|
||||
enabled: {type: Boolean},
|
||||
expires: {type: Number, optional: true},
|
||||
duration: {type: Number, optional: true},
|
||||
uses: {type: Number, min: 0, optional: true},
|
||||
});
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue: function(){
|
||||
if(!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
name: {type: String},
|
||||
description:{type: String},
|
||||
source: {type: String},
|
||||
buffs: {type: [Schemas.Buff], defaultValue: []},
|
||||
enabled: {type: Boolean, defaultValue: false},
|
||||
duration: {type: Number, optional: true},
|
||||
uses: {type: Number, min: 0, optional: true},
|
||||
maxUses: {type: Number, min: 0, optional: true},
|
||||
reset: {
|
||||
type: String,
|
||||
optional: true,
|
||||
allowedValues: ["longRest", "shortRest"]
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user