ekms 8.0.0-beta.80 → 8.0.0-beta.82
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 +97 -97
- package/common/animals.js +1 -1
- package/common/articles.js +1 -1
- package/common/asking.js +1 -1
- package/common/avatar.js +1 -1
- package/common/characters.js +1 -1
- package/common/colors.instance.json +403 -403
- package/common/colors.js +1 -1
- package/common/comparable.instance.json +22 -22
- package/common/comparable.js +1 -1
- package/common/concept.js +1 -1
- package/common/conjunction.js +1 -1
- package/common/countable.js +1 -1
- package/common/crew.instance.json +485 -393
- package/common/crew.js +1 -1
- package/common/currency.js +1 -1
- package/common/dialogues.js +2 -2
- package/common/dimension.instance.json +9 -9
- package/common/dimension.js +1 -1
- package/common/edible.instance.json +464 -464
- package/common/edible.js +1 -1
- package/common/emotions.instance.json +105 -45
- package/common/emotions.js +1 -1
- package/common/evaluate.js +1 -1
- package/common/events.js +1 -1
- package/common/fastfood.instance.json +2675 -2562
- package/common/fastfood.js +1 -1
- package/common/formulas.instance.json +2 -2
- package/common/formulas.js +1 -1
- package/common/gdefaults.js +16 -1
- package/common/help.js +2 -2
- package/common/helpers.js +24 -21
- package/common/hierarchy.js +1 -1
- package/common/javascript.js +1 -1
- package/common/kirk.instance.json +3 -3
- package/common/kirk.js +1 -1
- package/common/length.instance.json +268 -248
- package/common/length.js +1 -1
- package/common/listener.js +1 -1
- package/common/math.instance.json +2 -2
- package/common/math.js +1 -1
- package/common/meta.js +1 -1
- package/common/nameable.js +1 -1
- package/common/negation.js +1 -1
- package/common/numbers.js +1 -1
- package/common/ordering.instance.json +75 -127
- package/common/ordering.js +1 -1
- package/common/ordinals.js +1 -1
- package/common/people.instance.json +139 -79
- package/common/people.js +1 -1
- package/common/percentages.js +1 -1
- package/common/pipboy.instance.json +233 -233
- package/common/pipboy.js +1 -1
- package/common/pokemon.instance.json +125 -125
- package/common/pokemon.js +1 -1
- package/common/pos.js +1 -1
- package/common/pressure.instance.json +128 -152
- package/common/pressure.js +1 -1
- package/common/properties.instance.json +17 -17
- package/common/properties.js +1 -1
- package/common/punctuation.js +1 -1
- package/common/reports.instance.json +16 -16
- package/common/reports.js +1 -1
- package/common/scorekeeper.js +1 -1
- package/common/sdefaults.js +1 -1
- package/common/sizeable.js +1 -1
- package/common/spock.instance.json +2 -2
- package/common/spock.js +1 -1
- package/common/stgame.js +1 -1
- package/common/stm.js +9 -7
- package/common/tell.js +1 -1
- package/common/temperature.instance.json +178 -202
- package/common/temperature.js +1 -1
- package/common/time.js +1 -1
- package/common/tokenize.js +1 -1
- package/common/ui.instance.json +34 -556
- package/common/ui.js +8 -13
- package/common/ui.test.json +641 -5357
- package/common/weight.instance.json +307 -319
- package/common/weight.js +1 -1
- package/common/yesno.js +1 -1
- package/package.json +2 -2
package/common/fastfood.js
CHANGED
@@ -1021,7 +1021,7 @@ knowledgeModule( {
|
|
1021
1021
|
{ property: 'pieces', filter: ['marker', 'value', 'text' ] },
|
1022
1022
|
],
|
1023
1023
|
context: [
|
1024
|
-
...defaultContextCheck,
|
1024
|
+
...defaultContextCheck(),
|
1025
1025
|
// TODO some kind of conditional selector { match: (value) => value.marker == 'count', filter: ['marker', 'value', 'text'] },
|
1026
1026
|
{ property: 'comboNumber', filter: ['marker', 'value', 'text' ] },
|
1027
1027
|
],
|
package/common/formulas.js
CHANGED
package/common/gdefaults.js
CHANGED
@@ -29,6 +29,21 @@ let config = {
|
|
29
29
|
apply: ({context, gp}) => gp(context.response),
|
30
30
|
},
|
31
31
|
|
32
|
+
{
|
33
|
+
where: where(),
|
34
|
+
match: ({context}) => context.generate,
|
35
|
+
apply: async ({context, gs}) => {
|
36
|
+
const existing = context.generate.filter((key) => context[key] !== undefined)
|
37
|
+
const filtered = existing.filter((key) => {
|
38
|
+
if (context[key] && context[key].skipDefault) {
|
39
|
+
return false
|
40
|
+
}
|
41
|
+
return true
|
42
|
+
})
|
43
|
+
return gs(filtered.map((key) => context[key]))
|
44
|
+
}
|
45
|
+
},
|
46
|
+
|
32
47
|
{
|
33
48
|
where: where(),
|
34
49
|
//({context}) => context.paraphrase && context.modifiers,
|
@@ -208,7 +223,7 @@ knowledgeModule({
|
|
208
223
|
name: './gdefaults.test.json',
|
209
224
|
contents: gdefaults_tests,
|
210
225
|
checks: {
|
211
|
-
context: defaultContextCheck,
|
226
|
+
context: defaultContextCheck(),
|
212
227
|
},
|
213
228
|
|
214
229
|
},
|
package/common/help.js
CHANGED
@@ -67,7 +67,7 @@ const config = {
|
|
67
67
|
|
68
68
|
return help
|
69
69
|
},
|
70
|
-
optional: {
|
70
|
+
optional: { 1: "{ marker: 'km', kms: []}" },
|
71
71
|
bridge: "{ ...next(operator), kms: after[0].kms, isResponse: true }"
|
72
72
|
},
|
73
73
|
{ id: "withKM", level: 0, bridge: "{ ...next(operator), kms: after[0] }" },
|
@@ -103,7 +103,7 @@ knowledgeModule({
|
|
103
103
|
name: './help.test.json',
|
104
104
|
contents: help_tests,
|
105
105
|
checks: {
|
106
|
-
context: defaultContextCheck,
|
106
|
+
context: defaultContextCheck(),
|
107
107
|
},
|
108
108
|
},
|
109
109
|
})
|
package/common/helpers.js
CHANGED
@@ -138,27 +138,30 @@ const toEValue = (context) => {
|
|
138
138
|
}
|
139
139
|
|
140
140
|
const defaultContextCheckProperties = ['marker', 'text', 'verbatim', 'isResponse', { property: 'response', filter: ['marker', 'text', 'verbatim'] }]
|
141
|
-
const defaultContextCheck = [
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
141
|
+
const defaultContextCheck = (properties = []) => {
|
142
|
+
return [
|
143
|
+
...defaultContextCheckProperties,
|
144
|
+
...properties.map((property) => { return { property, filter: defaultContextCheckProperties } }),
|
145
|
+
(object) => {
|
146
|
+
if (typeof object.value == 'object') {
|
147
|
+
return { property: 'value', filter: defaultContextCheckProperties }
|
148
|
+
} else {
|
149
|
+
return 'value'
|
150
|
+
}
|
151
|
+
},
|
152
|
+
(object) => {
|
153
|
+
if (!Array.isArray(object.modifiers)) {
|
154
|
+
return
|
155
|
+
}
|
156
|
+
if (typeof object.modifiers[0] == 'object') {
|
157
|
+
return { property: 'modifiers', filter: defaultContextCheckProperties }
|
158
|
+
} else {
|
159
|
+
return 'modifiers'
|
160
|
+
}
|
161
|
+
},
|
162
|
+
{ property: 'modifiers', isPropertyList: true, filter: defaultContextCheckProperties }
|
163
|
+
]
|
164
|
+
}
|
162
165
|
|
163
166
|
module.exports = {
|
164
167
|
defaultContextCheck,
|
package/common/hierarchy.js
CHANGED
package/common/javascript.js
CHANGED