Merge branch 'quest-file' into quest

This commit is contained in:
Chen, Tai-Lin committed 2023-11-21 21:25:59 +08:00
commit b6b8010a60
17 files changed
+511 -19

No files matched your search

+24
View File
@@ -35,6 +35,26 @@ conditionSchema.add({
not: conditionSchema,
})
const exceptionSchema = new Schema({
condition: {
type: conditionSchema,
required: false,
},
catchAll: {
type: Boolean,
required: true,
default: false,
},
responses: {
type: [responseSchema],
required: true,
},
hints: {
type: [String],
required: true,
},
})
const stageSchema = new Schema({
id: {
type: String,
@@ -66,6 +86,10 @@ const stageSchema = new Schema({
type: [String],
required: true,
},
exceptions: {
type: [exceptionSchema],
required: true,
},
})
const Quest = model(
+1 -1
View File
@@ -54,7 +54,7 @@ const Session = model(
required: true,
},
tasks: [taskSchema],
hints: [String],
hints: [[String]],
graph: {
type: nodeSchema,
default: {