ekms 7.12.4-beta.2 → 7.12.4-beta.4
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.instance.json +44 -0
- package/common/crew.instance.json +384 -252
- package/common/dialogues.js +41 -0
- package/common/dialogues.test.json +780 -0
- package/common/edible.instance.json +1380 -0
- package/common/fastfood.instance.json +26896 -395
- package/common/fastfood.js +103 -1
- package/common/fastfood.test.json +30998 -0
- package/common/help.test.json +26 -8
- package/common/helpers/concept.js +10 -1
- package/common/hierarchy.js +1 -1
- package/common/kirk.instance.json +16 -0
- package/common/length.instance.json +180 -0
- package/common/mathTemplate.instance.json +60 -0
- package/common/ordering.instance.json +52 -0
- package/common/people.instance.json +96 -0
- package/common/pokemon.instance.json +260 -0
- package/common/pressure.instance.json +32 -0
- package/common/reports.instance.json +17 -1
- package/common/scorekeeper.test.json +299 -124
- package/common/spock.instance.json +16 -0
- package/common/temperature.instance.json +92 -0
- package/common/ui.instance.json +8 -0
- package/common/weight.instance.json +252 -0
- package/package.json +2 -2
package/common/dialogues.js
CHANGED
@@ -41,6 +41,8 @@ let configStruct = {
|
|
41
41
|
// "(([queryable]) [is:isEdBridge|is,are] ([isEdAble|]))",
|
42
42
|
"(([queryable]) [(<isEd|> ([isEdAble|]))])",
|
43
43
|
|
44
|
+
"([nevermind])",
|
45
|
+
{ pattern: "([nevermindTestSetup] (allowed))", development: true },
|
44
46
|
"([why])",
|
45
47
|
"([reason])",
|
46
48
|
"([thisitthat|])",
|
@@ -204,6 +206,44 @@ let configStruct = {
|
|
204
206
|
before: ['verby'],
|
205
207
|
bridge: "{ ...next(operator) }"
|
206
208
|
},
|
209
|
+
{
|
210
|
+
id: "nevermind",
|
211
|
+
bridge: "{ ...next(operator) }",
|
212
|
+
semantic: (args) => {
|
213
|
+
const {config, context} = args
|
214
|
+
// stop asking all questions
|
215
|
+
for (const semantic of config.semantics) {
|
216
|
+
if (semantic.isQuestion) {
|
217
|
+
let doRemove = true
|
218
|
+
if (semantic.onNevermind && semantic.getWasAsked() && !semantic.getWasApplied()) {
|
219
|
+
doRemove = semantic.onNevermind(args)
|
220
|
+
}
|
221
|
+
if (doRemove) {
|
222
|
+
config.removeSemantic(semantic)
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
}
|
227
|
+
},
|
228
|
+
{
|
229
|
+
id: "nevermindTestSetup",
|
230
|
+
development: true,
|
231
|
+
bridge: "{ ...next(operator), type: after[0], postModifiers: ['type'] }",
|
232
|
+
semantic: ({ask, context}) => {
|
233
|
+
const nevermindType = context.type.value
|
234
|
+
ask({
|
235
|
+
applyq: () => 'the test question?',
|
236
|
+
onNevermind: ({objects, context}) => {
|
237
|
+
objects.onNevermindWasCalled = true
|
238
|
+
debugger
|
239
|
+
objects.nevermindType = nevermindType
|
240
|
+
return nevermindType == 'accept'
|
241
|
+
},
|
242
|
+
matchr: () => false,
|
243
|
+
applyr: () => {},
|
244
|
+
})
|
245
|
+
}
|
246
|
+
},
|
207
247
|
{
|
208
248
|
id: "why",
|
209
249
|
level: 0,
|
@@ -903,6 +943,7 @@ knowledgeModule( {
|
|
903
943
|
name: './dialogues.test.json',
|
904
944
|
contents: dialogues_tests,
|
905
945
|
checks: {
|
946
|
+
objects: ['onNevermindWasCalled', 'nevermindType'],
|
906
947
|
context: defaultContextCheck,
|
907
948
|
},
|
908
949
|
|