tpmkms_4wp 9.5.1 → 9.6.0-beta.1
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 +151 -61
- package/common/animals.js +3 -5
- package/common/asking.js +116 -106
- package/common/avatar.test.json +1001 -860
- package/common/can.instance.json +2194 -0
- package/common/can.js +251 -0
- package/common/can.test.json +51307 -0
- package/common/characters.js +5 -5
- package/common/colors.instance.json +152 -12
- package/common/colors.js +3 -6
- package/common/comparable.instance.json +33 -3
- package/common/comparable.js +3 -6
- package/common/concept.js +25 -27
- package/common/concept.test.json +180 -144
- package/common/conjunction.js +13 -5
- package/common/conjunction.test.json +32 -42
- package/common/crew.instance.json +433 -173
- package/common/crew.js +4 -7
- package/common/crew.test.json +4148 -3324
- package/common/currency.js +1 -1
- package/common/dateTimeSelectors.instance.json +2 -2
- package/common/dateTimeSelectors.js +6 -9
- package/common/dateTimeSelectors.test.json +76935 -35739
- package/common/dates.instance.json +53 -3
- package/common/dates.js +3 -6
- package/common/dates.test.json +284 -287
- package/common/dialogues.js +43 -122
- package/common/dialogues.test.json +1248 -1152
- package/common/dimension.instance.json +21493 -561
- package/common/dimension.js +150 -55
- package/common/dimension.test.json +10979 -4625
- package/common/drone.instance.json +24709 -0
- package/common/drone.js +662 -0
- package/common/drone.test.json +30522 -0
- package/common/drone_v1.instance.json +24703 -0
- package/common/drone_v1.js +596 -0
- package/common/drone_v1.test.json +115538 -0
- package/common/edible.instance.json +388 -32
- package/common/edible.js +3 -5
- package/common/emotions.instance.json +85 -76
- package/common/emotions.js +4 -7
- package/common/emotions.test.json +242 -174
- package/common/english_helpers.js +336 -0
- package/common/errors.js +6 -6
- package/common/evaluate.js +2 -2
- package/common/events.js +8 -8
- package/common/fastfood.instance.json +1071 -393
- package/common/fastfood.js +14 -16
- package/common/fastfood.test.json +6970 -6829
- package/common/formulas.instance.json +11 -1
- package/common/formulas.js +3 -2
- package/common/gdefaults.js +111 -17
- package/common/help.js +12 -12
- package/common/help.test.json +65 -11
- package/common/helpers/concept.js +1 -1
- package/common/helpers/conjunction.js +54 -44
- package/common/helpers/dateTimeSelectors.js +2 -2
- package/common/helpers/dialogues.js +10 -2
- package/common/helpers/formulas.js +13 -11
- package/common/helpers/menus.js +12 -12
- package/common/helpers/meta.js +9 -9
- package/common/helpers/properties.js +186 -64
- package/common/helpers.js +167 -48
- package/common/hierarchy.js +12 -10
- package/common/kirk.instance.json +11 -1
- package/common/kirk.js +4 -6
- package/common/kirk.test.json +600 -424
- package/common/latin.instance.json +12 -12
- package/common/latin.js +12 -14
- package/common/length.instance.json +34660 -3158
- package/common/length.js +11 -6
- package/common/length.test.json +54357 -2557
- package/common/math.instance.json +39 -29
- package/common/math.js +49 -47
- package/common/menus.instance.json +77 -10
- package/common/menus.js +4 -13
- package/common/meta.js +80 -65
- package/common/nameable.js +36 -22
- package/common/nameable.test.json +436 -0
- package/common/numbers.js +1 -1
- package/common/ordering.instance.json +107 -19
- package/common/ordering.js +4 -6
- package/common/ordering.test.json +835 -417
- package/common/people.instance.json +176 -348
- package/common/people.js +9 -9
- package/common/people.test.json +4135 -3606
- package/common/pipboy.instance.json +187 -17
- package/common/pipboy.js +4 -4
- package/common/pokemon.instance.json +143 -13
- package/common/pokemon.js +4 -6
- package/common/pressure.instance.json +3610 -1601
- package/common/pressure.js +3 -5
- package/common/pressure.test.json +433 -477
- package/common/properties.instance.json +16 -17
- package/common/properties.js +32 -13
- package/common/properties.test.json +9565 -6951
- package/common/rates.instance.json +59 -0
- package/common/rates.js +95 -0
- package/common/rates.test.json +27702 -0
- package/common/reminders.instance.json +4 -4
- package/common/reminders.js +8 -11
- package/common/reminders.test.json +64635 -25787
- package/common/reports.instance.json +23 -3
- package/common/reports.js +21 -21
- package/common/scorekeeper.js +9 -12
- package/common/sdefaults.js +22 -2
- package/common/spock.instance.json +11 -1
- package/common/spock.js +4 -7
- package/common/spock.test.json +606 -430
- package/common/stgame.js +1 -1
- package/common/stm.js +41 -24
- package/common/tell.js +1 -1
- package/common/temperature.instance.json +3163 -1154
- package/common/temperature.js +3 -5
- package/common/temperature.test.json +433 -477
- package/common/tester.js +3 -3
- package/common/time.instance.json +24852 -0
- package/common/time.js +138 -141
- package/common/time.test.json +31876 -3757
- package/common/tokenize.js +5 -2
- package/common/ui.instance.json +12 -5
- package/common/ui.js +4 -13
- package/common/weight.instance.json +10501 -4099
- package/common/weight.js +3 -5
- package/common/weight.test.json +2601 -2263
- package/common/words.instance.json +9 -0
- package/common/words.js +50 -0
- package/common/words.test.json +2 -0
- package/common/wp.instance.json +548 -8
- package/common/wp.js +10 -8
- package/common/wp.test.json +7385 -6906
- package/main.js +6 -2
- package/package.json +25 -6
- package/common/listener.js +0 -50
- package/common/listener.test.json +0 -142
package/common/stgame.js
CHANGED
package/common/stm.js
CHANGED
|
@@ -40,7 +40,16 @@ class API {
|
|
|
40
40
|
return this._objects.mentioned.filter( (context) => this.isA(context.marker, type) )
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
mentioned(
|
|
43
|
+
mentioned(args) {
|
|
44
|
+
let concept, value, frameOfReference
|
|
45
|
+
if (!args.context) {
|
|
46
|
+
concept = args
|
|
47
|
+
} else {
|
|
48
|
+
concept = args.context
|
|
49
|
+
value = args.value
|
|
50
|
+
frameOfReference = args.frameOfReference
|
|
51
|
+
}
|
|
52
|
+
|
|
44
53
|
if (!frameOfReference) {
|
|
45
54
|
frameOfReference = this._objects
|
|
46
55
|
}
|
|
@@ -71,10 +80,9 @@ class API {
|
|
|
71
80
|
|
|
72
81
|
mentions({ context, frameOfReference, useHierarchy=true, all, condition = (() => true) } = {}) {
|
|
73
82
|
const mentioned = frameOfReference?.mentioned || this._objects.mentioned
|
|
74
|
-
|
|
75
83
|
const findPrevious = !!context.stm_previous
|
|
76
84
|
const forAll = []
|
|
77
|
-
|
|
85
|
+
function addForAll(context) {
|
|
78
86
|
if (!forAll.find( (c) => c.stm.id == context.stm.id)) {
|
|
79
87
|
forAll.push(context)
|
|
80
88
|
}
|
|
@@ -88,7 +96,7 @@ class API {
|
|
|
88
96
|
if (findPrevious && findCounter < 2) {
|
|
89
97
|
continue
|
|
90
98
|
}
|
|
91
|
-
if (condition()) {
|
|
99
|
+
if (condition(m)) {
|
|
92
100
|
if (all) {
|
|
93
101
|
allForAll(m)
|
|
94
102
|
} else {
|
|
@@ -162,19 +170,19 @@ class API {
|
|
|
162
170
|
}
|
|
163
171
|
}
|
|
164
172
|
|
|
165
|
-
getVariable(
|
|
166
|
-
if (!
|
|
173
|
+
getVariable(context) {
|
|
174
|
+
if (!context) {
|
|
167
175
|
return
|
|
168
176
|
}
|
|
169
|
-
let valueNew = this.mentions({ context
|
|
177
|
+
let valueNew = this.mentions({ context, useHierarchy: false, condition: (context) => context.isVariable })
|
|
170
178
|
if (valueNew && valueNew.value) {
|
|
171
179
|
valueNew = valueNew.value
|
|
172
180
|
}
|
|
173
181
|
return valueNew
|
|
174
182
|
}
|
|
175
183
|
|
|
176
|
-
setVariable(
|
|
177
|
-
this.mentioned({ context: { marker:
|
|
184
|
+
setVariable(variableName, value) {
|
|
185
|
+
this.mentioned({ context: { marker: variableName, isVariable: true }, value })
|
|
178
186
|
}
|
|
179
187
|
}
|
|
180
188
|
|
|
@@ -183,14 +191,15 @@ const api = new API()
|
|
|
183
191
|
const config = {
|
|
184
192
|
name: 'stm',
|
|
185
193
|
operators: [
|
|
186
|
-
"(
|
|
187
|
-
"(([memorable])
|
|
194
|
+
"(<stm_current|current> ([memorable]))",
|
|
195
|
+
"(<stm_previous|previous> ([memorable]))",
|
|
196
|
+
"(([memorable]) <stm_before|before>)",
|
|
188
197
|
"([remember] (memorable/*))",
|
|
189
198
|
],
|
|
190
199
|
words: {
|
|
191
200
|
literals: {
|
|
192
|
-
"m1": [{"id": "memorable",
|
|
193
|
-
"m2": [{"id": "memorable",
|
|
201
|
+
"m1": [{"id": "memorable", scope: "testing", "initial": "{ value: 'm1' }" }],
|
|
202
|
+
"m2": [{"id": "memorable", scope: "testing", "initial": "{ value: 'm2' }" }],
|
|
194
203
|
},
|
|
195
204
|
},
|
|
196
205
|
bridges: [
|
|
@@ -213,8 +222,14 @@ const config = {
|
|
|
213
222
|
},
|
|
214
223
|
{
|
|
215
224
|
id: 'stm_previous',
|
|
225
|
+
isA: ['adjective'],
|
|
216
226
|
bridge: '{ ...after[0], modifiers: ["stm_previous"], stm_previous: operator, pullFromContext: true }',
|
|
217
227
|
},
|
|
228
|
+
{
|
|
229
|
+
id: 'stm_current',
|
|
230
|
+
isA: ['adjective'],
|
|
231
|
+
bridge: '{ ...after[0], modifiers: ["stm_current"], stm_current: operator, pullFromContext: true }',
|
|
232
|
+
},
|
|
218
233
|
{
|
|
219
234
|
id: 'stm_before',
|
|
220
235
|
isA: ['adjective'],
|
|
@@ -247,16 +262,16 @@ const config = {
|
|
|
247
262
|
],
|
|
248
263
|
}
|
|
249
264
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
265
|
+
function initializer({config}) {
|
|
266
|
+
config.addArgs(({kms}) => ({
|
|
267
|
+
mentioned: (args) => {
|
|
268
|
+
kms.stm.api.mentioned(args)
|
|
269
|
+
},
|
|
270
|
+
mentions: (args) => {
|
|
271
|
+
return kms.stm.api.mentions(args)
|
|
272
|
+
},
|
|
273
|
+
}))
|
|
274
|
+
}
|
|
260
275
|
|
|
261
276
|
knowledgeModule( {
|
|
262
277
|
config,
|
|
@@ -271,7 +286,9 @@ knowledgeModule( {
|
|
|
271
286
|
contents: stm_tests,
|
|
272
287
|
checks: {
|
|
273
288
|
context: [defaultContextCheck({ extra: ['pullFromContext', 'stm_id'] })],
|
|
274
|
-
|
|
289
|
+
objects: [ { path: ['mentioned'] }],
|
|
290
|
+
// objects: [defaultContextCheck({ extra: ['mentioned'] })],
|
|
291
|
+
// objects: [{ property: 'mentioned', check: helpers.defaultContextCheckProperties }],
|
|
275
292
|
},
|
|
276
293
|
},
|
|
277
294
|
})
|
package/common/tell.js
CHANGED
|
@@ -98,7 +98,7 @@ const config = {
|
|
|
98
98
|
],
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
function initializer({config, isModule}) {
|
|
102
102
|
if (!isModule) {
|
|
103
103
|
config.addSemantic({
|
|
104
104
|
match: ({context, hierarchy}) => context.happening && hierarchy.isA(context.marker, 'event'),
|