ekms 7.12.7 → 7.12.8-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/common/animals.instance.json +0 -44
  2. package/common/dialogues.js +106 -3
  3. package/common/dimension.instance.json +736 -62
  4. package/common/dimension.js +15 -7
  5. package/common/edible.instance.json +2 -190
  6. package/common/fastfood.instance.json +886 -922
  7. package/common/formulas.instance.json +992 -0
  8. package/common/formulas.js +18 -5
  9. package/common/formulas.test.json +1187 -3651
  10. package/common/length.instance.json +261 -505
  11. package/common/math.instance.json +1979 -1
  12. package/common/math.js +17 -5
  13. package/common/ordering.instance.json +0 -52
  14. package/common/pipboy.instance.json +23454 -1101
  15. package/common/pipboy.js +31 -4
  16. package/common/pipboy.test.json +13 -9
  17. package/common/pokemon.instance.json +0 -44
  18. package/common/pressure.instance.json +80 -0
  19. package/common/reports.instance.json +17 -1
  20. package/common/temperature.instance.json +80 -60
  21. package/common/ui.instance.json +8 -0
  22. package/common/weight.instance.json +272 -48
  23. package/main.js +0 -8
  24. package/package.json +4 -20
  25. package/common/dimensionTemplate.instance.json +0 -582
  26. package/common/dimensionTemplate.js +0 -35
  27. package/common/dimensionTemplate.test.json +0 -2
  28. package/common/formulasTemplate.instance.json +0 -483
  29. package/common/formulasTemplate.js +0 -30
  30. package/common/formulasTemplate.test.json +0 -2
  31. package/common/mathTemplate.instance.json +0 -1635
  32. package/common/mathTemplate.js +0 -32
  33. package/common/mathTemplate.test.json +0 -1422
  34. package/common/pipboyTemplate.instance.json +0 -17420
  35. package/common/pipboyTemplate.js +0 -48
  36. package/common/pipboyTemplate.test.json +0 -2
@@ -3,15 +3,20 @@ const { defaultContextCheck } = require('./helpers')
3
3
  const dialogues = require('./dialogues.js')
4
4
  const pos = require('./pos.js')
5
5
  const math = require('./math.js')
6
- const formulasTemplate = require('./formulasTemplate.js')
6
+ const hierarchy = require('./hierarchy.js')
7
+ const comparable = require('./comparable.js')
8
+ const countable = require('./countable.js')
7
9
  const { API, getVariables, solveFor } = require('./helpers/formulas.js')
8
- const formulas_tests = require('./formulas.test.json')
10
+ const tests = require('./formulas.test.json')
11
+ const instance = require('./formulas.instance.json')
9
12
 
13
+ /*
10
14
  const template = {
11
15
  queries: [
12
16
  // { query: "x equals y + 4", development: true },
13
17
  ]
14
18
  }
19
+ */
15
20
  /* TODO
16
21
  10 feet in inches -> 1 foot equals 12 inches => 120 inches
17
22
 
@@ -180,11 +185,18 @@ let configStruct = {
180
185
  ]
181
186
  };
182
187
 
188
+ const template = {
189
+ queries: [
190
+ "formulas are concepts",
191
+ configStruct,
192
+ ]
193
+ }
194
+
183
195
  const createConfig = () => {
184
196
  const api = new API()
185
- config = new Config(configStruct, module)
197
+ config = new Config({ name: 'formulas' }, module)
186
198
  config.stop_auto_rebuild()
187
- config.add(dialogues(), pos(), math(), formulasTemplate())
199
+ config.add(dialogues(), pos(), math(), hierarchy(), comparable(), countable())
188
200
  config.api = api
189
201
  config.restart_auto_rebuild()
190
202
  return config
@@ -194,9 +206,10 @@ knowledgeModule({
194
206
  module,
195
207
  description: 'Formulas using math',
196
208
  createConfig,
209
+ template: { template, instance },
197
210
  test: {
198
211
  name: './formulas.test.json',
199
- contents: formulas_tests,
212
+ contents: tests,
200
213
  checks: {
201
214
  objects: ['formulas'],
202
215
  context: defaultContextCheck,