tpmkms 7.12.4 → 7.12.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/animals.instance.json +96 -0
- package/common/crew.instance.json +480 -0
- package/common/dialogues.js +45 -2
- package/common/dialogues.test.json +780 -0
- package/common/dimension.test.json +170 -26
- package/common/dimensionTemplate.instance.json +4 -0
- package/common/edible.instance.json +1508 -0
- package/common/emotions.instance.json +4 -0
- package/common/fastfood.instance.json +27642 -427
- package/common/fastfood.js +332 -66
- package/common/fastfood.test.json +85364 -916
- package/common/formulasTemplate.instance.json +4 -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 +20 -0
- package/common/length.instance.json +240 -0
- package/common/mathTemplate.instance.json +68 -0
- package/common/ordering.instance.json +60 -0
- package/common/people.instance.json +128 -0
- package/common/pokemon.instance.json +312 -0
- package/common/pressure.instance.json +48 -0
- package/common/properties.instance.json +4 -0
- package/common/reports.instance.json +25 -1
- package/common/reports.js +3 -2
- package/common/scorekeeper.test.json +299 -124
- package/common/spock.instance.json +20 -0
- package/common/stm.js +21 -6
- package/common/temperature.instance.json +104 -192
- package/common/ui.instance.json +12 -0
- package/common/weight.instance.json +300 -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|])",
|
@@ -131,6 +133,7 @@ let configStruct = {
|
|
131
133
|
where: where(),
|
132
134
|
id: "to",
|
133
135
|
level: 0,
|
136
|
+
isA: ['preposition'],
|
134
137
|
bridge: "{ ...next(operator), toObject: after[0] }",
|
135
138
|
generatorp: ({context, gp}) => {
|
136
139
|
return `to ${gp(context.toObject)}`
|
@@ -203,6 +206,44 @@ let configStruct = {
|
|
203
206
|
before: ['verby'],
|
204
207
|
bridge: "{ ...next(operator) }"
|
205
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
|
+
},
|
206
247
|
{
|
207
248
|
id: "why",
|
208
249
|
level: 0,
|
@@ -569,8 +610,8 @@ let configStruct = {
|
|
569
610
|
where: where(),
|
570
611
|
notes: 'pull from context',
|
571
612
|
// match: ({context}) => context.marker == 'it' && context.pullFromContext, // && context.value,
|
572
|
-
match: ({context}) => context.pullFromContext && !context.same, // && context.value,
|
573
|
-
apply: ({context, s, kms, e, log, retry}) => {
|
613
|
+
match: ({context, callId}) => context.pullFromContext && !context.same, // && context.value,
|
614
|
+
apply: ({callId, context, s, kms, e, log, retry}) => {
|
574
615
|
if (true) {
|
575
616
|
/*
|
576
617
|
{
|
@@ -803,6 +844,7 @@ let configStruct = {
|
|
803
844
|
{
|
804
845
|
where: where(),
|
805
846
|
notes: 'get variable from stm',
|
847
|
+
// match: ({context, kms}) => !context.determiner && context.evaluate && kms.stm.api.getVariable(context.value) != context.value,
|
806
848
|
match: ({context, kms}) => context.evaluate && kms.stm.api.getVariable(context.value) != context.value,
|
807
849
|
// match: ({context, kms}) => context.evaluate,
|
808
850
|
priority: -1,
|
@@ -901,6 +943,7 @@ knowledgeModule( {
|
|
901
943
|
name: './dialogues.test.json',
|
902
944
|
contents: dialogues_tests,
|
903
945
|
checks: {
|
946
|
+
objects: ['onNevermindWasCalled', 'nevermindType'],
|
904
947
|
context: defaultContextCheck,
|
905
948
|
},
|
906
949
|
|