Made character arrays of objects into their own collections
This commit is contained in:
21
rpg-docs/Model/Character/Buffs.js
Normal file
21
rpg-docs/Model/Character/Buffs.js
Normal file
@@ -0,0 +1,21 @@
|
||||
Buffs = new Meteor.Collection("buffs");
|
||||
|
||||
//buffs are temporary once applied and store things which expire and their expiry time
|
||||
Schemas.Buff = new SimpleSchema({
|
||||
//buff id
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue: function(){
|
||||
if(!this.isSet) return Random.id();
|
||||
}},
|
||||
charId: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id
|
||||
},
|
||||
//expiry time
|
||||
expiry: { type: Number, optional: true},
|
||||
duration: { type: Number }
|
||||
});
|
||||
|
||||
Buffs.attachSchema(Schemas.Buff);
|
||||
Reference in New Issue
Block a user