Added forms for Class level, damage multiplier, experience, folder, note, proficiency
This commit is contained in:
@@ -18,10 +18,6 @@ let ClassLevelSchema = schema({
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
defaultValue: true,
|
||||
},
|
||||
// The name of this class level's variable
|
||||
variableName: {
|
||||
type: String,
|
||||
@@ -31,17 +27,11 @@ let ClassLevelSchema = schema({
|
||||
baseClass: {
|
||||
type: String,
|
||||
regEx: VARIABLE_NAME_REGEX,
|
||||
},
|
||||
// The name of the class level that needs to preceed this class level
|
||||
// So a totemWarrior level 5 must be preceded by a totemWarrior level 4
|
||||
// If it's not set, any level below with the same baseClass is matched
|
||||
previousClassLevel: {
|
||||
type: String,
|
||||
regEx: VARIABLE_NAME_REGEX,
|
||||
optional: true,
|
||||
},
|
||||
level: {
|
||||
type: SimpleSchema.Integer,
|
||||
defaultValue: 1,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -27,12 +27,13 @@ let DamageMultiplierSchema = schema({
|
||||
damageType: {
|
||||
type: String,
|
||||
allowedValues: DAMAGE_TYPES,
|
||||
defaultValue: 'bludgeoning',
|
||||
},
|
||||
// The value of the damage multiplier
|
||||
value: {
|
||||
type: Number,
|
||||
defaultValue: 1,
|
||||
allowedValues: [0, 0.5, 1, 2],
|
||||
defaultValue: 0.5,
|
||||
allowedValues: [0, 0.5, 2],
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import updateSchemaMixin from '/imports/api/creature/mixins/updateSchemaMixin.js
|
||||
let Experiences = new Mongo.Collection("experience");
|
||||
|
||||
let ExperienceSchema = schema({
|
||||
name: {
|
||||
title: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
@@ -33,11 +33,9 @@ let ExperienceSchema = schema({
|
||||
date: {
|
||||
type: Date,
|
||||
autoValue: function() {
|
||||
// If the date isn't set, set it to now on insert
|
||||
if (this.isInsert && !this.isSet) {
|
||||
// If the date isn't set, set it to now
|
||||
if (!this.isSet) {
|
||||
return new Date();
|
||||
} else if (this.isUpsert && !this.isSet) {
|
||||
return {$setOnInsert: new Date()};
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -17,11 +17,6 @@ let Folders = new Mongo.Collection('folders');
|
||||
let FolderSchema = schema({
|
||||
name: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
defaultValue: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -14,21 +14,17 @@ import updateSchemaMixin from '/imports/api/creature/mixins/updateSchemaMixin.js
|
||||
let Proficiencies = new Mongo.Collection("proficiencies");
|
||||
|
||||
let ProficiencySchema = schema({
|
||||
name: {
|
||||
// The variableName of the skill to apply this to
|
||||
skill: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
// A number representing how proficient the character is
|
||||
value: {
|
||||
type: Number,
|
||||
allowedValues: [0, 0.5, 1, 2],
|
||||
allowedValues: [0.5, 1, 2],
|
||||
defaultValue: 1,
|
||||
},
|
||||
// The variableName of the skill to apply this to
|
||||
skill: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
});
|
||||
|
||||
Proficiencies.attachSchema(ProficiencySchema);
|
||||
|
||||
Reference in New Issue
Block a user