ekms 8.0.0-beta.20 → 8.0.0-beta.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/common/animals.instance.json +0 -88
  2. package/common/animals.js +2 -2
  3. package/common/avatar.js +2 -2
  4. package/common/characters.js +12 -16
  5. package/common/colors.instance.json +0 -344
  6. package/common/colors.js +2 -2
  7. package/common/comparable.js +2 -15
  8. package/common/concept.js +13 -10
  9. package/common/countable.js +5 -5
  10. package/common/crew.instance.json +0 -416
  11. package/common/crew.js +4 -4
  12. package/common/currency.js +7 -7
  13. package/common/dialogues.js +52 -121
  14. package/common/dimension.instance.json +4 -4
  15. package/common/dimension.js +12 -12
  16. package/common/dimension.test.json +242 -1248
  17. package/common/edible.instance.json +30 -134
  18. package/common/edible.js +2 -2
  19. package/common/emotions.instance.json +0 -60
  20. package/common/emotions.js +4 -4
  21. package/common/events.js +6 -6
  22. package/common/fastfood.instance.json +929 -1408
  23. package/common/fastfood.js +24 -24
  24. package/common/formulas.instance.json +6 -6
  25. package/common/formulas.js +12 -12
  26. package/common/gdefaults.js +13 -13
  27. package/common/help.js +4 -4
  28. package/common/helpers/concept.js +0 -1
  29. package/common/helpers/dialogues.js +2 -3
  30. package/common/helpers/properties.js +48 -58
  31. package/common/hierarchy.js +12 -16
  32. package/common/javascript.js +8 -8
  33. package/common/kirk.js +2 -2
  34. package/common/length.instance.json +0 -60
  35. package/common/length.js +2 -2
  36. package/common/math.instance.json +12 -12
  37. package/common/math.js +7 -7
  38. package/common/meta.js +22 -29
  39. package/common/negation.js +1 -1
  40. package/common/numbers.js +2 -2
  41. package/common/ordering.js +5 -5
  42. package/common/people.js +4 -5
  43. package/common/percentages.js +4 -4
  44. package/common/pipboy.instance.json +30 -154
  45. package/common/pipboy.js +29 -32
  46. package/common/pokemon.instance.json +0 -44
  47. package/common/pokemon.js +4 -4
  48. package/common/pos.js +1 -1
  49. package/common/pressure.js +2 -2
  50. package/common/properties.js +52 -125
  51. package/common/punctuation.js +2 -2
  52. package/common/reports.instance.json +1 -1
  53. package/common/reports.js +59 -76
  54. package/common/scorekeeper.js +13 -21
  55. package/common/sdefaults.js +5 -5
  56. package/common/sizeable.js +2 -2
  57. package/common/spock.js +2 -2
  58. package/common/stgame.js +13 -9
  59. package/common/stm.js +4 -4
  60. package/common/tell.js +10 -10
  61. package/common/temperature.instance.json +0 -60
  62. package/common/temperature.js +2 -2
  63. package/common/tester.js +2 -2
  64. package/common/testing.js +5 -5
  65. package/common/time.js +7 -7
  66. package/common/tokenize.js +1 -1
  67. package/common/ui.js +9 -9
  68. package/common/weight.js +2 -2
  69. package/common/yesno.js +1 -1
  70. package/package.json +2 -2
@@ -112,7 +112,7 @@
112
112
  ],
113
113
  "level": 0,
114
114
  "bridge": "{ ...next(operator) }",
115
- "generatorp": "({context, g}) => `put on`"
115
+ "generatorp": "({context}) => `put on`"
116
116
  },
117
117
  {
118
118
  "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:161",
@@ -134,7 +134,7 @@
134
134
  ],
135
135
  "level": 0,
136
136
  "bridge": "{ ...before, marker: operator('putOn', 0), dead: false }",
137
- "generatorp": "({context, g}) => `put on ${g(context.item)}`",
137
+ "generatorp": "async ({context, g}) => `put on ${await g(context.item)}`",
138
138
  "semantic": "({api, context}) => {\n api.change(context.item.marker)\n }"
139
139
  },
140
140
  {
@@ -151,7 +151,7 @@
151
151
  "changeable"
152
152
  ]
153
153
  ],
154
- "generatorp": "({context, g}) => `change ${g(context.item)}`",
154
+ "generatorp": "async ({context, g}) => `change ${await g(context.item)}`",
155
155
  "semantic": "({api, context}) => {\n api.change(context.item.marker)\n }"
156
156
  },
157
157
  {
@@ -162,7 +162,7 @@
162
162
  ],
163
163
  "level": 0,
164
164
  "bridge": "{ ...next(operator) }",
165
- "generatorp": "({context, g}) => `disarm`",
165
+ "generatorp": "({context}) => `disarm`",
166
166
  "semantic": "({api, context}) => {\n api.disarm()\n }"
167
167
  },
168
168
  {
@@ -173,7 +173,7 @@
173
173
  ],
174
174
  "level": 0,
175
175
  "bridge": "{ ...next(operator) }",
176
- "generatorp": "({context, g}) => `strip`",
176
+ "generatorp": "({context}) => `strip`",
177
177
  "semantic": "({api, context}) => {\n api.strip()\n }"
178
178
  },
179
179
  {
@@ -184,7 +184,7 @@
184
184
  ],
185
185
  "level": 0,
186
186
  "bridge": "{ ...next(operator), item: after[0], name: after[1] }",
187
- "generatorp": "({context, g}) => `call ${g(context.item)} ${g(context.name)}`",
187
+ "generatorp": "async ({context, g}) => `call ${await g(context.item)} ${await g(context.name)}`",
188
188
  "semantic": "({api, context}) => {\n api.setName(context.item, context.name.name.value)\n }"
189
189
  },
190
190
  {
@@ -195,7 +195,7 @@
195
195
  ],
196
196
  "level": 0,
197
197
  "bridge": "{ ...next(operator), item: after[0] }",
198
- "generatorp": "({context, g}) => `put on ${g(context.item)}`",
198
+ "generatorp": "async ({context, g}) => `put on ${await g(context.item)}`",
199
199
  "semantic": "({api, context}) => {\n if (context.item.name) {\n api.wear({ name: context.item.name.value, type: 'outfit' })\n } else {\n api.wear({ type: context.item.value })\n }\n }"
200
200
  },
201
201
  {
@@ -209,7 +209,7 @@
209
209
  ],
210
210
  "level": 0,
211
211
  "bridge": "{ ...next(operator), item: after[0] }",
212
- "generatorp": "({context, g}) => `wear ${g(context.item)}`",
212
+ "generatorp": "async ({context, g}) => `wear ${await g(context.item)}`",
213
213
  "semantic": "({api, context}) => {\n if (context.item.name) {\n api.wear({ name: context.item.name.value, type: 'outfit' })\n } else {\n api.wear({ type: context.item.value })\n }\n }"
214
214
  },
215
215
  {
@@ -230,44 +230,44 @@
230
230
  ]
231
231
  ],
232
232
  "bridge": "{ ...next(operator), item: after[0] }",
233
- "generatorp": "({context, g}) => `equip ${g(context.item)}`",
234
- "semantic": "({api, context, e}) => {\n // const value = e(context.item)\n let condition\n if (context.item.condition) {\n condition = { selector: context.item.condition.marker, property: context.item.condition.property[0].marker }\n }\n api.equip({ type: context.item.value, condition })\n }"
233
+ "generatorp": "async ({context, g}) => `equip ${await g(context.item)}`",
234
+ "semantic": "async ({api, context}) => {\n let condition\n if (context.item.condition) {\n condition = { selector: context.item.condition.marker, property: context.item.condition.property[0].marker }\n }\n api.equip({ type: context.item.value, condition })\n }"
235
235
  },
236
236
  {
237
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:273",
237
+ "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:272",
238
238
  "id": "toDrink",
239
239
  "isA": [
240
240
  "verby"
241
241
  ],
242
242
  "level": 0,
243
243
  "bridge": "{ ...next(operator), item: after[0] }",
244
- "generatorp": "({context, g}) => `drink ${g(context.item)}`",
245
- "semantic": "({api, context, e}) => {\n const value = e(context.item)\n api.drink(value.value)\n }"
244
+ "generatorp": "async ({context, g}) => `drink ${await g(context.item)}`",
245
+ "semantic": "async ({api, context, e}) => {\n const value = await e(context.item)\n api.drink(value.value)\n }"
246
246
  },
247
247
  {
248
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:285",
248
+ "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:284",
249
249
  "id": "eat",
250
250
  "isA": [
251
251
  "verby"
252
252
  ],
253
253
  "level": 0,
254
254
  "bridge": "{ ...next(operator), item: after[0] }",
255
- "generatorp": "({context, g}) => `eat ${g(context.item)}`",
256
- "semantic": "({api, context, e}) => {\n // const value = e(context.item)\n // api.eat(value.value)\n api.eat(context.item.value)\n }"
255
+ "generatorp": "async ({context, g}) => `eat ${await g(context.item)}`",
256
+ "semantic": "async ({api, context}) => {\n api.eat(context.item.value)\n }"
257
257
  },
258
258
  {
259
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:298",
259
+ "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:295",
260
260
  "id": "take",
261
261
  "isA": [
262
262
  "verby"
263
263
  ],
264
264
  "level": 0,
265
265
  "bridge": "{ ...next(operator), item: after[0] }",
266
- "generatorp": "({context, g}) => `take ${g(context.item)}`",
267
- "semantic": "({api, context, e}) => {\n const value = e(context.item)\n api.take(value.value)\n }"
266
+ "generatorp": "async ({context, g}) => `take ${await g(context.item)}`",
267
+ "semantic": "async ({api, context, e}) => {\n const value = await e(context.item)\n api.take(value.value)\n }"
268
268
  },
269
269
  {
270
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:310",
270
+ "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:307",
271
271
  "id": "nameable",
272
272
  "isA": [
273
273
  "theAble"
@@ -327,8 +327,8 @@
327
327
  ],
328
328
  "level": 0,
329
329
  "bridge": "{ ...next(operator), item: after[0] }",
330
- "generatorp": "({context, g}) => `apply ${g(context.item)}`",
331
- "semantic": "({api, context, e}) => {\n // { item: 'stimpak', quantity: <number>, to?: [ { part: ['arm', 'leg', 'torso', head'], side?: ['left', 'right'] } ] }\n const quantity = context.item.quantity ? e(context.item.quantity).value : 1\n api.apply({ item: 'stimpak', quantity })\n }"
330
+ "generatorp": "async ({context, g}) => `apply ${await g(context.item)}`",
331
+ "semantic": "async ({api, context, e}) => {\n // { item: 'stimpak', quantity: <number>, to?: [ { part: ['arm', 'leg', 'torso', head'], side?: ['left', 'right'] } ] }\n const quantity = context.item.quantity ? (await e(context.item.quantity)).value : 1\n api.apply({ item: 'stimpak', quantity })\n }"
332
332
  },
333
333
  {
334
334
  "id": "go",
@@ -337,7 +337,7 @@
337
337
  ],
338
338
  "level": 0,
339
339
  "bridge": "{ ...next(operator), showable: after[0].showable }",
340
- "generatorp": "({context, g}) => `go to ${g(context.showable)}`",
340
+ "generatorp": "async ({context, g}) => `go to ${await g(context.showable)}`",
341
341
  "semantic": "({api, context}) => {\n api.setDisplay(context.showable.value)\n }"
342
342
  },
343
343
  {
@@ -347,7 +347,7 @@
347
347
  ],
348
348
  "level": 0,
349
349
  "bridge": "{ ...next(operator), showable: after[0] }",
350
- "generatorp": "({context, g}) => `to ${g(context.showable)}`"
350
+ "generatorp": "async ({context, g}) => `to ${await g(context.showable)}`"
351
351
  },
352
352
  {
353
353
  "id": "showWeapons",
@@ -356,7 +356,7 @@
356
356
  ],
357
357
  "level": 0,
358
358
  "bridge": "{ ...next(operator), showable: after[0] }",
359
- "generatorp": "({context, g}) => `show ${g(context.showable)}`",
359
+ "generatorp": "async ({context, g}) => `show ${await g(context.showable)}`",
360
360
  "semantic": "({api, context}) => {\n if (context.showable.quantity && context.showable.quantity.value == 'all') {\n api.showWeapons('all')\n } else {\n api.showWeapons(context.showable.value)\n }\n }"
361
361
  },
362
362
  {
@@ -366,7 +366,7 @@
366
366
  ],
367
367
  "level": 0,
368
368
  "bridge": "{ ...next(operator), showable: after[0] }",
369
- "generatorp": "({context, g}) => `show ${g(context.showable)}`",
369
+ "generatorp": "async ({context, g}) => `show ${await g(context.showable)}`",
370
370
  "semantic": "({api, context}) => {\n api.setDisplay(context.showable.value)\n }"
371
371
  },
372
372
  {
@@ -1463,24 +1463,6 @@
1463
1463
  1
1464
1464
  ]
1465
1465
  ],
1466
- [
1467
- [
1468
- "is",
1469
- 0
1470
- ],
1471
- [
1472
- "list",
1473
- 0
1474
- ],
1475
- [
1476
- "unknown",
1477
- 0
1478
- ],
1479
- [
1480
- "unknown",
1481
- 1
1482
- ]
1483
- ],
1484
1466
  [
1485
1467
  [
1486
1468
  "is",
@@ -6948,24 +6930,6 @@
6948
6930
  1
6949
6931
  ]
6950
6932
  ],
6951
- [
6952
- [
6953
- "is",
6954
- 0
6955
- ],
6956
- [
6957
- "list",
6958
- 0
6959
- ],
6960
- [
6961
- "unknown",
6962
- 0
6963
- ],
6964
- [
6965
- "unknown",
6966
- 1
6967
- ]
6968
- ],
6969
6933
  [
6970
6934
  [
6971
6935
  "is",
@@ -24451,32 +24415,6 @@
24451
24415
  1
24452
24416
  ]
24453
24417
  ],
24454
- [
24455
- [
24456
- "is",
24457
- 0
24458
- ],
24459
- [
24460
- "item",
24461
- 0
24462
- ],
24463
- [
24464
- "list",
24465
- 0
24466
- ],
24467
- [
24468
- "property",
24469
- 0
24470
- ],
24471
- [
24472
- "unknown",
24473
- 0
24474
- ],
24475
- [
24476
- "unknown",
24477
- 1
24478
- ]
24479
- ],
24480
24418
  [
24481
24419
  [
24482
24420
  "is",
@@ -24757,7 +24695,7 @@
24757
24695
  "bridge": "{ ...next(operator), item: after[0] }"
24758
24696
  },
24759
24697
  {
24760
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:273",
24698
+ "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:272",
24761
24699
  "id": "toDrink",
24762
24700
  "isA": [
24763
24701
  "verby"
@@ -24766,7 +24704,7 @@
24766
24704
  "bridge": "{ ...next(operator), item: after[0] }"
24767
24705
  },
24768
24706
  {
24769
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:285",
24707
+ "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:284",
24770
24708
  "id": "eat",
24771
24709
  "isA": [
24772
24710
  "verby"
@@ -24775,7 +24713,7 @@
24775
24713
  "bridge": "{ ...next(operator), item: after[0] }"
24776
24714
  },
24777
24715
  {
24778
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:298",
24716
+ "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:295",
24779
24717
  "id": "take",
24780
24718
  "isA": [
24781
24719
  "verby"
@@ -24784,7 +24722,7 @@
24784
24722
  "bridge": "{ ...next(operator), item: after[0] }"
24785
24723
  },
24786
24724
  {
24787
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:310",
24725
+ "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:307",
24788
24726
  "id": "nameable",
24789
24727
  "isA": [
24790
24728
  "theAble"
@@ -25457,32 +25395,6 @@
25457
25395
  1
25458
25396
  ]
25459
25397
  ],
25460
- [
25461
- [
25462
- "is",
25463
- 0
25464
- ],
25465
- [
25466
- "item",
25467
- 0
25468
- ],
25469
- [
25470
- "list",
25471
- 0
25472
- ],
25473
- [
25474
- "property",
25475
- 0
25476
- ],
25477
- [
25478
- "unknown",
25479
- 0
25480
- ],
25481
- [
25482
- "unknown",
25483
- 1
25484
- ]
25485
- ],
25486
25398
  [
25487
25399
  [
25488
25400
  "is",
@@ -25733,42 +25645,6 @@
25733
25645
  1
25734
25646
  ]
25735
25647
  ],
25736
- [
25737
- [
25738
- "is",
25739
- 0
25740
- ],
25741
- [
25742
- "list",
25743
- 0
25744
- ],
25745
- [
25746
- "unknown",
25747
- 0
25748
- ],
25749
- [
25750
- "unknown",
25751
- 1
25752
- ]
25753
- ],
25754
- [
25755
- [
25756
- "is",
25757
- 0
25758
- ],
25759
- [
25760
- "list",
25761
- 0
25762
- ],
25763
- [
25764
- "unknown",
25765
- 0
25766
- ],
25767
- [
25768
- "unknown",
25769
- 1
25770
- ]
25771
- ],
25772
25648
  [
25773
25649
  [
25774
25650
  "is",
package/common/pipboy.js CHANGED
@@ -155,7 +155,7 @@ let configStruct = {
155
155
  isA: ['verby'],
156
156
  level: 0,
157
157
  bridge: "{ ...next(operator) }",
158
- generatorp: ({context, g}) => `put on`,
158
+ generatorp: ({context}) => `put on`,
159
159
  },
160
160
  {
161
161
  where: where(),
@@ -171,7 +171,7 @@ let configStruct = {
171
171
  isA: ['preposition'],
172
172
  level: 0,
173
173
  bridge: "{ ...before, marker: operator('putOn', 0), dead: false }",
174
- generatorp: ({context, g}) => `put on ${g(context.item)}`,
174
+ generatorp: async ({context, g}) => `put on ${await g(context.item)}`,
175
175
  semantic: ({api, context}) => {
176
176
  api.change(context.item.marker)
177
177
  }
@@ -183,7 +183,7 @@ let configStruct = {
183
183
  level: 0,
184
184
  bridge: "{ ...next(operator), item: after[0] }",
185
185
  localHierarchy: [ ['weapon', 'changeable'] ],
186
- generatorp: ({context, g}) => `change ${g(context.item)}`,
186
+ generatorp: async ({context, g}) => `change ${await g(context.item)}`,
187
187
  semantic: ({api, context}) => {
188
188
  api.change(context.item.marker)
189
189
  }
@@ -194,7 +194,7 @@ let configStruct = {
194
194
  isA: ['verby'],
195
195
  level: 0,
196
196
  bridge: "{ ...next(operator) }",
197
- generatorp: ({context, g}) => `disarm`,
197
+ generatorp: ({context}) => `disarm`,
198
198
  semantic: ({api, context}) => {
199
199
  api.disarm()
200
200
  }
@@ -205,7 +205,7 @@ let configStruct = {
205
205
  isA: ['verby'],
206
206
  level: 0,
207
207
  bridge: "{ ...next(operator) }",
208
- generatorp: ({context, g}) => `strip`,
208
+ generatorp: ({context}) => `strip`,
209
209
  semantic: ({api, context}) => {
210
210
  api.strip()
211
211
  }
@@ -216,7 +216,7 @@ let configStruct = {
216
216
  isA: ['verby'],
217
217
  level: 0,
218
218
  bridge: "{ ...next(operator), item: after[0], name: after[1] }",
219
- generatorp: ({context, g}) => `call ${g(context.item)} ${g(context.name)}`,
219
+ generatorp: async ({context, g}) => `call ${await g(context.item)} ${await g(context.name)}`,
220
220
  semantic: ({api, context}) => {
221
221
  api.setName(context.item, context.name.name.value)
222
222
  }
@@ -227,7 +227,7 @@ let configStruct = {
227
227
  isA: ['verby'],
228
228
  level: 0,
229
229
  bridge: "{ ...next(operator), item: after[0] }",
230
- generatorp: ({context, g}) => `put on ${g(context.item)}`,
230
+ generatorp: async ({context, g}) => `put on ${await g(context.item)}`,
231
231
  semantic: ({api, context}) => {
232
232
  if (context.item.name) {
233
233
  api.wear({ name: context.item.name.value, type: 'outfit' })
@@ -243,7 +243,7 @@ let configStruct = {
243
243
  words: ['where'], // the speech recognizer hears 'where' not 'wear'
244
244
  level: 0,
245
245
  bridge: "{ ...next(operator), item: after[0] }",
246
- generatorp: ({context, g}) => `wear ${g(context.item)}`,
246
+ generatorp: async ({context, g}) => `wear ${await g(context.item)}`,
247
247
  semantic: ({api, context}) => {
248
248
  if (context.item.name) {
249
249
  api.wear({ name: context.item.name.value, type: 'outfit' })
@@ -259,9 +259,8 @@ let configStruct = {
259
259
  level: 0,
260
260
  localHierarchy: [ ['weapon', 'equipable'], ['thisitthat', 'equipable'] ],
261
261
  bridge: "{ ...next(operator), item: after[0] }",
262
- generatorp: ({context, g}) => `equip ${g(context.item)}`,
263
- semantic: ({api, context, e}) => {
264
- // const value = e(context.item)
262
+ generatorp: async ({context, g}) => `equip ${await g(context.item)}`,
263
+ semantic: async ({api, context}) => {
265
264
  let condition
266
265
  if (context.item.condition) {
267
266
  condition = { selector: context.item.condition.marker, property: context.item.condition.property[0].marker }
@@ -275,9 +274,9 @@ let configStruct = {
275
274
  isA: ['verby'],
276
275
  level: 0,
277
276
  bridge: "{ ...next(operator), item: after[0] }",
278
- generatorp: ({context, g}) => `drink ${g(context.item)}`,
279
- semantic: ({api, context, e}) => {
280
- const value = e(context.item)
277
+ generatorp: async ({context, g}) => `drink ${await g(context.item)}`,
278
+ semantic: async ({api, context, e}) => {
279
+ const value = await e(context.item)
281
280
  api.drink(value.value)
282
281
  }
283
282
  },
@@ -287,10 +286,8 @@ let configStruct = {
287
286
  isA: ['verby'],
288
287
  level: 0,
289
288
  bridge: "{ ...next(operator), item: after[0] }",
290
- generatorp: ({context, g}) => `eat ${g(context.item)}`,
291
- semantic: ({api, context, e}) => {
292
- // const value = e(context.item)
293
- // api.eat(value.value)
289
+ generatorp: async ({context, g}) => `eat ${await g(context.item)}`,
290
+ semantic: async ({api, context}) => {
294
291
  api.eat(context.item.value)
295
292
  }
296
293
  },
@@ -300,9 +297,9 @@ let configStruct = {
300
297
  isA: ['verby'],
301
298
  level: 0,
302
299
  bridge: "{ ...next(operator), item: after[0] }",
303
- generatorp: ({context, g}) => `take ${g(context.item)}`,
304
- semantic: ({api, context, e}) => {
305
- const value = e(context.item)
300
+ generatorp: async ({context, g}) => `take ${await g(context.item)}`,
301
+ semantic: async ({api, context, e}) => {
302
+ const value = await e(context.item)
306
303
  api.take(value.value)
307
304
  }
308
305
  },
@@ -374,10 +371,10 @@ let configStruct = {
374
371
  isA: ['verby'],
375
372
  level: 0,
376
373
  bridge: "{ ...next(operator), item: after[0] }",
377
- generatorp: ({context, g}) => `apply ${g(context.item)}`,
378
- semantic: ({api, context, e}) => {
374
+ generatorp: async ({context, g}) => `apply ${await g(context.item)}`,
375
+ semantic: async ({api, context, e}) => {
379
376
  // { item: 'stimpak', quantity: <number>, to?: [ { part: ['arm', 'leg', 'torso', head'], side?: ['left', 'right'] } ] }
380
- const quantity = context.item.quantity ? e(context.item.quantity).value : 1
377
+ const quantity = context.item.quantity ? (await e(context.item.quantity)).value : 1
381
378
  api.apply({ item: 'stimpak', quantity })
382
379
  }
383
380
  },
@@ -386,7 +383,7 @@ let configStruct = {
386
383
  isA: ['verby'],
387
384
  level: 0,
388
385
  bridge: "{ ...next(operator), showable: after[0].showable }",
389
- generatorp: ({context, g}) => `go to ${g(context.showable)}`,
386
+ generatorp: async ({context, g}) => `go to ${await g(context.showable)}`,
390
387
  semantic: ({api, context}) => {
391
388
  api.setDisplay(context.showable.value)
392
389
  }
@@ -396,14 +393,14 @@ let configStruct = {
396
393
  isA: ['preposition'],
397
394
  level: 0,
398
395
  bridge: "{ ...next(operator), showable: after[0] }",
399
- generatorp: ({context, g}) => `to ${g(context.showable)}`,
396
+ generatorp: async ({context, g}) => `to ${await g(context.showable)}`,
400
397
  },
401
398
  {
402
399
  id: "showWeapons",
403
400
  isA: ['verby'],
404
401
  level: 0,
405
402
  bridge: "{ ...next(operator), showable: after[0] }",
406
- generatorp: ({context, g}) => `show ${g(context.showable)}`,
403
+ generatorp: async ({context, g}) => `show ${await g(context.showable)}`,
407
404
  semantic: ({api, context}) => {
408
405
  if (context.showable.quantity && context.showable.quantity.value == 'all') {
409
406
  api.showWeapons('all')
@@ -417,7 +414,7 @@ let configStruct = {
417
414
  isA: ['verby'],
418
415
  level: 0,
419
416
  bridge: "{ ...next(operator), showable: after[0] }",
420
- generatorp: ({context, g}) => `show ${g(context.showable)}`,
417
+ generatorp: async ({context, g}) => `show ${await g(context.showable)}`,
421
418
  semantic: ({api, context}) => {
422
419
  api.setDisplay(context.showable.value)
423
420
  }
@@ -528,14 +525,14 @@ const template = {
528
525
  ]
529
526
  }
530
527
 
531
- const createConfig = () => {
528
+ const createConfig = async () => {
532
529
  const config = new Config({ name: 'pipboy' }, module)
533
530
  config.stop_auto_rebuild()
534
- config.add(hierarchy(), countable(), comparable(), help(), math())
531
+ await config.add(hierarchy, countable, comparable, help, math)
535
532
  // console.log('config.config.hierarchy', JSON.stringify(config.config.hierarchy, null, 2))
536
533
  // console.log('config.hierarchy', config.hierarchy)
537
- config.api = api
538
- config.restart_auto_rebuild()
534
+ await config.setApi(api)
535
+ await config.restart_auto_rebuild()
539
536
  return config
540
537
  }
541
538
 
@@ -1984,28 +1984,6 @@
1984
1984
  1
1985
1985
  ]
1986
1986
  ],
1987
- [
1988
- [
1989
- "is",
1990
- 0
1991
- ],
1992
- [
1993
- "list",
1994
- 0
1995
- ],
1996
- [
1997
- "pokemon",
1998
- 0
1999
- ],
2000
- [
2001
- "unknown",
2002
- 0
2003
- ],
2004
- [
2005
- "unknown",
2006
- 1
2007
- ]
2008
- ],
2009
1987
  [
2010
1988
  [
2011
1989
  "is",
@@ -13567,28 +13545,6 @@
13567
13545
  1
13568
13546
  ]
13569
13547
  ],
13570
- [
13571
- [
13572
- "is",
13573
- 0
13574
- ],
13575
- [
13576
- "list",
13577
- 0
13578
- ],
13579
- [
13580
- "pokemon",
13581
- 0
13582
- ],
13583
- [
13584
- "unknown",
13585
- 0
13586
- ],
13587
- [
13588
- "unknown",
13589
- 1
13590
- ]
13591
- ],
13592
13548
  [
13593
13549
  [
13594
13550
  "is",
package/common/pokemon.js CHANGED
@@ -29,7 +29,7 @@ const template = {
29
29
  // 'ashe owns pikachu who owns pikachu'
30
30
  // TODO does ashe own pikachu / ash owns pikachu? / 'ashe likes pikachu does ashe like pikachu'
31
31
 
32
- const createConfig = () => {
32
+ const createConfig = async () => {
33
33
  const config = new Config({
34
34
  name: 'pokemon',
35
35
  hierarchy: [
@@ -40,8 +40,8 @@ const createConfig = () => {
40
40
  ],
41
41
  })
42
42
  config.stop_auto_rebuild()
43
- config.add(hierarchy())
44
- config.initializer( ({config, apis}) => {
43
+ await config.add(hierarchy)
44
+ await config.initializer( ({config, apis}) => {
45
45
  const api = apis('properties')
46
46
  /*
47
47
  api.createActionPrefix({
@@ -62,7 +62,7 @@ const createConfig = () => {
62
62
  config
63
63
  })
64
64
  })
65
- config.restart_auto_rebuild()
65
+ await config.restart_auto_rebuild()
66
66
  // config.load(template, pokemon_instance)
67
67
  return config
68
68
  }
package/common/pos.js CHANGED
@@ -36,7 +36,7 @@ let configStruct = {
36
36
 
37
37
  };
38
38
 
39
- createConfig = () => new Config(configStruct, module)
39
+ createConfig = async () => new Config(configStruct, module)
40
40
 
41
41
  knowledgeModule( {
42
42
  module,
@@ -14,9 +14,9 @@ const template = {
14
14
  ],
15
15
  }
16
16
 
17
- const createConfig = () => {
17
+ const createConfig = async () => {
18
18
  const config = new Config({ name: 'pressure' }, module)
19
- config.add(dimension())
19
+ await config.add(dimension)
20
20
  return config
21
21
  }
22
22