From 8ec3b74299aa42d9e884d7db596fbf34fd7fc0ee Mon Sep 17 00:00:00 2001 From: Thaum Date: Thu, 16 Apr 2015 09:02:00 +0000 Subject: [PATCH] Iterated on proficiencies towards making them first class assets --- rpg-docs/Model/Character/Proficiencies.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/rpg-docs/Model/Character/Proficiencies.js b/rpg-docs/Model/Character/Proficiencies.js index 3c05adde..addaa7a9 100644 --- a/rpg-docs/Model/Character/Proficiencies.js +++ b/rpg-docs/Model/Character/Proficiencies.js @@ -2,25 +2,27 @@ Proficiencies = new Mongo.Collection("proficiencies"); Schemas.Proficiency = new SimpleSchema({ charId: { - type: String, + type: String, regEx: SimpleSchema.RegEx.Id }, - name: { + name: { type: String, trim: false }, - //indicates what type of thing proficiency originated from + value: { + type: Number, + allowedValues: [0, 0.5, 1], + }, type: { type: String, - defaultValue: "editable", - allowedValues: ["editable", "feature", "buff", "equipment", "inate"] - }, + allowedValues: ["skill", "save", "weapon", "armor", "tool", "language"] + } }); Proficiencies.attachSchema(Schemas.Proficiency); Proficiencies.attachBehaviour('softRemovable'); -makeChild(Proficiencies); +makeChild(Proficiencies); Proficiencies.allow(CHARACTER_SUBSCHEMA_ALLOW); Proficiencies.deny(CHARACTER_SUBSCHEMA_DENY);