Migrations
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import {makeChild} from "/imports/api/parenting.js";
|
||||
|
||||
let Actions = new Mongo.Collection("actions");
|
||||
|
||||
@@ -28,17 +29,17 @@ let actionSchema = new SimpleSchema({
|
||||
},
|
||||
//the immediate impact of doing this action (eg. -1 rages)
|
||||
adjustments: {
|
||||
type: [Schemas.Adjustment],
|
||||
type: Array,
|
||||
defaultValue: [],
|
||||
},
|
||||
"adjustments.$": {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
|
||||
Actions.attachSchema(actionSchema);
|
||||
|
||||
Actions.attachBehaviour("softRemovable");
|
||||
// Actions.attachBehaviour("softRemovable");
|
||||
makeChild(Actions);
|
||||
|
||||
Actions.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||
Actions.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||
|
||||
export default Actions
|
||||
|
||||
@@ -20,6 +20,9 @@ conditionSchema = new SimpleSchema({
|
||||
optional: true,
|
||||
trim: false,
|
||||
},
|
||||
lifeTime: {
|
||||
type: Object,
|
||||
},
|
||||
"lifeTime.total": {
|
||||
type: Number,
|
||||
defaultValue: 0, //0 is infinite
|
||||
|
||||
@@ -33,10 +33,10 @@ let creatureSchema = new SimpleSchema({
|
||||
//permissions
|
||||
party: {type: String, regEx: SimpleSchema.RegEx.Id, optional: true},
|
||||
owner: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
|
||||
readers: {type: Array, defaultValue: []},
|
||||
"readers.$": {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
|
||||
writers: {type: Array, defaultValue: []},
|
||||
"writers.$": {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
|
||||
readers: {type: Array, defaultValue: [], index: 1},
|
||||
"readers.$": {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
writers: {type: Array, defaultValue: [], index: 1},
|
||||
"writers.$": {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
settings: {type: Object},
|
||||
//how many experiences to load at a time in XP table
|
||||
"settings.experiencesInc": {type: SimpleSchema.Integer, defaultValue: 20},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import {makeChild} from "/imports/api/parenting.js";
|
||||
|
||||
DamageMultipliers = new Mongo.Collection("damageMultipliers");
|
||||
|
||||
@@ -31,8 +32,5 @@ Schemas.DamageMultiplier = new SimpleSchema({
|
||||
|
||||
DamageMultipliers.attachSchema(Schemas.DamageMultiplier);
|
||||
|
||||
DamageMultipliers.attachBehaviour("softRemovable");
|
||||
// DamageMultipliers.attachBehaviour("softRemovable");
|
||||
makeChild(DamageMultipliers, ["enabled"]); //children of lots of things
|
||||
|
||||
DamageMultipliers.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||
DamageMultipliers.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||
|
||||
@@ -5,8 +5,10 @@ Libraries = new Mongo.Collection("library");
|
||||
librarySchema = new SimpleSchema({
|
||||
name: {type: String},
|
||||
owner: {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
readers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
||||
writers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
||||
readers: {type: Array, defaultValue: []},
|
||||
"readers.$": {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
writers: {type: Array, defaultValue: []},
|
||||
"writers.$": {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
public: {type: Boolean, defaultValue: false},
|
||||
});
|
||||
|
||||
|
||||
@@ -46,8 +46,10 @@ Schemas.LibrarySpells = new SimpleSchema({
|
||||
allowedValues: magicSchools,
|
||||
},
|
||||
library: {type: String, regEx: SimpleSchema.RegEx.Id, index: 1},
|
||||
effects: {type: [Schemas.LibraryEffects], defaultValue: []},
|
||||
attacks: {type: [Schemas.LibraryAttacks], defaultValue: []},
|
||||
effects: {type: Array},
|
||||
"effects.$": {type: Schemas.LibraryEffects, defaultValue: []},
|
||||
attacks: {type: Array},
|
||||
"attacks.$": {type: Schemas.LibraryAttacks, defaultValue: []},
|
||||
});
|
||||
|
||||
LibrarySpells.attachSchema(Schemas.LibrarySpells);
|
||||
|
||||
Reference in New Issue
Block a user