Fixed Roll form
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import { RollResultsSchema } from '/imports/api/properties/subSchemas/RollResultsSchema.js'
|
||||
import RollResultsSchema from '/imports/api/properties/subSchemas/RollResultsSchema.js'
|
||||
|
||||
/**
|
||||
* Rolls are children to actions or other rolls, they are triggered with 0 or
|
||||
@@ -20,8 +20,8 @@ import { RollResultsSchema } from '/imports/api/properties/subSchemas/RollResult
|
||||
* child rolls are applied
|
||||
*/
|
||||
let RollSchema = new SimpleSchema({
|
||||
// The number to add to a d20 roll
|
||||
rollBonus: {
|
||||
// The roll
|
||||
roll: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
|
||||
@@ -2,6 +2,13 @@ import SimpleSchema from 'simpl-schema';
|
||||
import ResultsSchema from '/imports/api/properties/subSchemas/ResultsSchema.js';
|
||||
|
||||
let RollResultsSchema = new SimpleSchema ({
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue(){
|
||||
if (!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
// Expression of whether or not to apply the roll
|
||||
// Evaluates to an expression which gets compared to the roll
|
||||
// or a number which the roll must equal
|
||||
@@ -15,4 +22,4 @@ let RollResultsSchema = new SimpleSchema ({
|
||||
},
|
||||
});
|
||||
|
||||
export { RollResultsSchema };
|
||||
export default RollResultsSchema ;
|
||||
|
||||
Reference in New Issue
Block a user