Moved subschema folder
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import deathSaveSchema from "/imports/api/creature/subSchemas/DeathSavesSchema.js"
|
||||
import ColorSchema from "/imports/api/creature/subSchemas/ColorSchema.js";
|
||||
import deathSaveSchema from "/imports/api/properties/subSchemas/DeathSavesSchema.js"
|
||||
import ColorSchema from "/imports/api/properties/subSchemas/ColorSchema.js";
|
||||
import SharingSchema from '/imports/api/sharing/SharingSchema.js';
|
||||
|
||||
//Methods
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import { Random } from 'meteor/random';
|
||||
import DAMAGE_TYPES from '/imports/constants/DAMAGE_TYPES.js';
|
||||
|
||||
const AdjustmentSchema = new SimpleSchema({
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue(){
|
||||
if (!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
// The roll that determines how much to damage the attribute
|
||||
damage: {
|
||||
type: String,
|
||||
optional: true,
|
||||
defaultValue: '1',
|
||||
},
|
||||
// Who this adjustment applies to
|
||||
target: {
|
||||
type: String,
|
||||
defaultValue: 'every',
|
||||
allowedValues: [
|
||||
'self', // the character who took the action
|
||||
'each', // rolled once for `each` target
|
||||
'every', // rolled once and applied to `every` target
|
||||
],
|
||||
},
|
||||
// The stat this rolls applies to, if damage type is set, this is ignored
|
||||
stat: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
// If set, the type of damage this adjustment causes
|
||||
damageType: {
|
||||
type: String,
|
||||
allowedValues: DAMAGE_TYPES,
|
||||
optional: true,
|
||||
},
|
||||
});
|
||||
|
||||
export default AdjustmentSchema;
|
||||
@@ -1,12 +0,0 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
|
||||
const ColorSchema = new SimpleSchema({
|
||||
color: {
|
||||
type: String,
|
||||
// match hex colors of the form #A23 or #A23f56
|
||||
regEx: /^#([a-f0-9]{3}){1,2}\b$/i,
|
||||
optional: true,
|
||||
},
|
||||
});
|
||||
|
||||
export default ColorSchema;
|
||||
@@ -1,26 +0,0 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
|
||||
const DeathSavesSchema = new SimpleSchema({
|
||||
pass: {
|
||||
type: SimpleSchema.Integer,
|
||||
min: 0,
|
||||
max: 3,
|
||||
defaultValue: 0,
|
||||
},
|
||||
fail: {
|
||||
type: SimpleSchema.Integer,
|
||||
min: 0,
|
||||
max: 3,
|
||||
defaultValue: 0,
|
||||
},
|
||||
canDeathSave: {
|
||||
type: Boolean,
|
||||
defaultValue: true,
|
||||
},
|
||||
stable: {
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
},
|
||||
});
|
||||
|
||||
export default DeathSavesSchema;
|
||||
Reference in New Issue
Block a user