Overhauled computations to allow for toggles :'( that sucked
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import SimpleSchema from 'simpl-schema';
|
||||
import { Random } from 'meteor/random';
|
||||
|
||||
/*
|
||||
* Effects are reason-value attached to skills and abilities
|
||||
@@ -42,16 +41,6 @@ let EffectSchema = new SimpleSchema({
|
||||
},
|
||||
});
|
||||
|
||||
const StoredEffectSchema = new SimpleSchema({
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue(){
|
||||
if (!this.isSet) return Random.id();
|
||||
}
|
||||
},
|
||||
}).extend(EffectSchema);
|
||||
|
||||
const ComputedOnlyEffectSchema = new SimpleSchema({
|
||||
// The computed result of the effect
|
||||
result: {
|
||||
@@ -64,4 +53,4 @@ const ComputedEffectSchema = new SimpleSchema()
|
||||
.extend(ComputedOnlyEffectSchema)
|
||||
.extend(EffectSchema);
|
||||
|
||||
export { EffectSchema, StoredEffectSchema, ComputedEffectSchema, ComputedOnlyEffectSchema };
|
||||
export { EffectSchema, ComputedEffectSchema, ComputedOnlyEffectSchema };
|
||||
|
||||
Reference in New Issue
Block a user