Improved property viewers, added some new ones

This commit is contained in:
Stefan Zermatten
2019-08-06 13:16:46 +02:00
parent b70634f5de
commit 45c84e28a3
33 changed files with 379 additions and 197 deletions

View File

@@ -5,13 +5,6 @@ import SimpleSchema from 'simpl-schema';
* that modify their final value or presentation in some way
*/
let EffectSchema = new SimpleSchema({
_id: {
type: String,
regEx: SimpleSchema.RegEx.Id,
autoValue(){
if (!this.isSet) return Random.id();
}
},
name: {
type: String,
optional: true,
@@ -43,6 +36,16 @@ 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 ComputedEffectSchema = new SimpleSchema({
// The computed result of the effect
result: {
@@ -51,4 +54,4 @@ const ComputedEffectSchema = new SimpleSchema({
},
}).extend(EffectSchema);
export { EffectSchema, ComputedEffectSchema };
export { EffectSchema, StoredEffectSchema, ComputedEffectSchema };