tpmkms_4wp 7.12.8 → 8.0.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/common/animals.instance.json +89 -293
  2. package/common/animals.js +1 -1
  3. package/common/avatar.js +7 -5
  4. package/common/characters.js +12 -5
  5. package/common/crew.instance.json +289 -577
  6. package/common/crew.js +1 -1
  7. package/common/currency.js +0 -2
  8. package/common/dialogues.js +122 -17
  9. package/common/dimension.instance.json +747 -73
  10. package/common/dimension.js +15 -7
  11. package/common/edible.instance.json +243 -435
  12. package/common/edible.js +1 -1
  13. package/common/emotions.instance.json +29 -65
  14. package/common/emotions.js +1 -1
  15. package/common/fastfood.instance.json +1080 -2072
  16. package/common/fastfood.js +1 -1
  17. package/common/formulas.instance.json +992 -0
  18. package/common/formulas.js +19 -6
  19. package/common/formulas.test.json +1187 -3651
  20. package/common/gdefaults.js +2 -0
  21. package/common/help.js +7 -2
  22. package/common/help.test.json +9 -5
  23. package/common/helpers.js +5 -0
  24. package/common/javascript.js +8 -6
  25. package/common/kirk.instance.json +1 -1
  26. package/common/kirk.js +1 -1
  27. package/common/length.instance.json +316 -740
  28. package/common/length.js +1 -1
  29. package/common/math.instance.json +1959 -1
  30. package/common/math.js +17 -5
  31. package/common/meta.instance.json +1 -1
  32. package/common/meta.js +35 -10
  33. package/common/numbers.js +28 -24
  34. package/common/ordering.instance.json +37 -153
  35. package/common/ordering.js +1 -1
  36. package/common/people.instance.json +50 -78
  37. package/common/people.js +1 -1
  38. package/common/pipboy.instance.json +23431 -1082
  39. package/common/pipboy.js +31 -4
  40. package/common/pipboy.test.json +13 -9
  41. package/common/pokemon.instance.json +41 -141
  42. package/common/pokemon.js +1 -1
  43. package/common/pressure.instance.json +93 -33
  44. package/common/pressure.js +1 -1
  45. package/common/properties.instance.json +21 -49
  46. package/common/properties.js +13 -8
  47. package/common/reports.instance.json +23 -63
  48. package/common/reports.js +9 -7
  49. package/common/scorekeeper.instance.json +1 -1
  50. package/common/scorekeeper.js +9 -7
  51. package/common/spock.instance.json +1 -1
  52. package/common/spock.js +1 -1
  53. package/common/tell.js +4 -2
  54. package/common/temperature.instance.json +97 -193
  55. package/common/temperature.js +1 -1
  56. package/common/time.js +36 -20
  57. package/common/time.test.json +66 -44
  58. package/common/tokenize.js +46 -0
  59. package/common/ui.instance.json +9 -1
  60. package/common/weight.instance.json +273 -217
  61. package/common/weight.js +1 -1
  62. package/main.js +4 -8
  63. package/package.json +6 -18
  64. package/common/dimensionTemplate.instance.json +0 -582
  65. package/common/dimensionTemplate.js +0 -35
  66. package/common/formulasTemplate.instance.json +0 -483
  67. package/common/formulasTemplate.js +0 -30
  68. package/common/formulasTemplate.test.json +0 -2
  69. package/common/mathTemplate.instance.json +0 -1635
  70. package/common/mathTemplate.js +0 -32
  71. package/common/mathTemplate.test.json +0 -1422
  72. package/common/pipboyTemplate.instance.json +0 -17420
  73. package/common/pipboyTemplate.js +0 -48
  74. package/common/pipboyTemplate.test.json +0 -2
  75. /package/common/{dimensionTemplate.test.json → tokenize.test.json} +0 -0
@@ -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
- queries: [
15
+ configs: [
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
+ configs: [
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,