ekms 7.12.8 → 8.0.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. package/common/animals.instance.json +192 -406
  2. package/common/animals.js +1 -1
  3. package/common/avatar.js +7 -5
  4. package/common/characters.js +12 -6
  5. package/common/{pipboyTemplate.instance.json → colors.instance.json} +13784 -8900
  6. package/common/colors.js +71 -0
  7. package/common/colors.test.json +4860 -0
  8. package/common/concept.js +2 -2
  9. package/common/crew.instance.json +3945 -3636
  10. package/common/crew.js +5 -3
  11. package/common/currency.js +0 -2
  12. package/common/dialogues.js +152 -20
  13. package/common/dialogues.test.json +1053 -33
  14. package/common/dimension.instance.json +750 -86
  15. package/common/dimension.js +15 -7
  16. package/common/dimension.test.json +289 -312
  17. package/common/edible.instance.json +446 -578
  18. package/common/edible.js +1 -1
  19. package/common/emotions.instance.json +67 -39
  20. package/common/emotions.js +1 -1
  21. package/common/fastfood.instance.json +1769 -2136
  22. package/common/fastfood.js +2 -2
  23. package/common/fastfood.test.json +7941 -3647
  24. package/common/formulas.instance.json +996 -0
  25. package/common/formulas.js +19 -6
  26. package/common/formulas.test.json +504 -2896
  27. package/common/gdefaults.js +2 -0
  28. package/common/help.js +7 -2
  29. package/common/help.test.json +18 -10
  30. package/common/helpers/concept.js +29 -9
  31. package/common/helpers/dialogues.js +17 -1
  32. package/common/helpers/formulas.js +0 -14
  33. package/common/helpers/meta.js +0 -1
  34. package/common/helpers/properties.js +6 -13
  35. package/common/helpers.js +5 -0
  36. package/common/javascript.js +8 -6
  37. package/common/kirk.instance.json +5 -1
  38. package/common/kirk.js +1 -1
  39. package/common/length.instance.json +417 -811
  40. package/common/length.js +1 -1
  41. package/common/math.instance.json +1938 -1
  42. package/common/math.js +17 -5
  43. package/common/meta.instance.json +1 -1
  44. package/common/meta.js +33 -10
  45. package/common/numbers.js +28 -24
  46. package/common/ordering.instance.json +98 -138
  47. package/common/ordering.js +1 -1
  48. package/common/people.instance.json +68 -121
  49. package/common/people.js +1 -1
  50. package/common/pipboy.instance.json +23411 -1076
  51. package/common/pipboy.js +31 -4
  52. package/common/pipboy.test.json +13 -9
  53. package/common/pokemon.instance.json +172 -223
  54. package/common/pokemon.js +1 -1
  55. package/common/pressure.instance.json +131 -81
  56. package/common/pressure.js +1 -1
  57. package/common/properties.instance.json +25 -49
  58. package/common/properties.js +20 -15
  59. package/common/properties.test.json +17605 -4030
  60. package/common/punctuation.js +8 -0
  61. package/common/punctuation.test.json +233 -5
  62. package/common/reports.instance.json +33 -65
  63. package/common/reports.js +9 -9
  64. package/common/scorekeeper.instance.json +1 -1
  65. package/common/scorekeeper.js +9 -7
  66. package/common/sizeable.js +7 -2
  67. package/common/spock.instance.json +5 -1
  68. package/common/spock.js +1 -1
  69. package/common/stm.js +16 -5
  70. package/common/tell.js +4 -2
  71. package/common/temperature.instance.json +142 -252
  72. package/common/temperature.js +1 -1
  73. package/common/testing.js +0 -1
  74. package/common/time.js +36 -20
  75. package/common/time.test.json +66 -44
  76. package/common/tokenize.js +47 -0
  77. package/common/tokenize.test.json +87 -0
  78. package/common/ui.instance.json +13 -1
  79. package/common/ui.js +0 -1
  80. package/common/weight.instance.json +335 -228
  81. package/common/weight.js +1 -1
  82. package/common/weight.test.json +242 -238
  83. package/main.js +6 -8
  84. package/package.json +10 -18
  85. package/common/dimensionTemplate.instance.json +0 -582
  86. package/common/dimensionTemplate.js +0 -35
  87. package/common/dimensionTemplate.test.json +0 -2
  88. package/common/formulasTemplate.instance.json +0 -483
  89. package/common/formulasTemplate.js +0 -30
  90. package/common/formulasTemplate.test.json +0 -2
  91. package/common/mathTemplate.instance.json +0 -1635
  92. package/common/mathTemplate.js +0 -32
  93. package/common/mathTemplate.test.json +0 -1422
  94. package/common/pipboyTemplate.js +0 -48
  95. package/common/pipboyTemplate.test.json +0 -2
@@ -153,7 +153,12 @@ let configStruct = {
153
153
  { id: "doesnt", level: 0, bridge: "{ ...context, number: operator.number, object.number: operator.number, negation: true }*" },
154
154
  { id: "have", level: 0, bridge: "{ ...next(operator), object: { number: operator.number, ...before }, property: after[0], do: { left: 'object', right: 'property' } }" },
155
155
  { id: "have", level: 1, bridge: "{ ...next(operator) }" },
156
- { id: "property", level: 0, bridge: "{ ...next(operator) }" },
156
+ {
157
+ id: "property",
158
+ words: ['properties'],
159
+ level: 0,
160
+ bridge: "{ ...next(operator) }"
161
+ },
157
162
  { id: "object", level: 0, bridge: "{ ...next(operator) }" },
158
163
 
159
164
  // old
@@ -172,14 +177,19 @@ let configStruct = {
172
177
  { id: "objectPrefix", level: 0, bridge: '{ ...after[0], object: operator, objects: [after[0], operator] }' },
173
178
  ],
174
179
  words: {
175
- "<<possession>>": [{ id: 'possession', initial: "{ value: 'possession' }" }],
176
- " 's": [{ id: 'possession', initial: "{ value: 'possession' }" }],
177
- "have": [{ id: 'have', initial: "{ doesable: true, number: 'many' }" }],
178
- "has": [{ id: 'have', initial: "{ doesable: true, number: 'one' }" }],
179
- "dont": [{ id: 'doesnt', initial: "{ number: 'many' }" }],
180
- "doesnt": [{ id: 'doesnt', initial: "{ number: 'one' }" }],
181
- // "my": [{ id: 'objectPrefix', initial: "{ value: 'other' }" }],
182
- // "your": [{ id: 'objectPrefix', initial: "{ value: 'self' }" }],
180
+ literals: {
181
+ "<<possession>>": [{ id: 'possession', initial: "{ value: 'possession' }" }],
182
+ " 's": [{ id: 'possession', initial: "{ value: 'possession' }" }],
183
+ "have": [{ id: 'have', initial: "{ doesable: true, number: 'many' }" }],
184
+ "has": [{ id: 'have', initial: "{ doesable: true, number: 'one' }" }],
185
+ "dont": [{ id: 'doesnt', initial: "{ number: 'many' }" }],
186
+ "doesnt": [{ id: 'doesnt', initial: "{ number: 'one' }" }],
187
+ // "my": [{ id: 'objectPrefix', initial: "{ value: 'other' }" }],
188
+ // "your": [{ id: 'objectPrefix', initial: "{ value: 'self' }" }],
189
+ },
190
+ patterns: [
191
+ { "pattern": ["'s"], defs: [{id: "possession", uuid: '1', initial: "{ value: 'possession' }" }]},
192
+ ],
183
193
  },
184
194
  priorities: [
185
195
  { "context": [['list', 0], ['between', 0], ], "choose": [0] },
@@ -261,7 +271,6 @@ let configStruct = {
261
271
  // */
262
272
  // where: where(),
263
273
  // match: ({context}) => {
264
- // // debugger;
265
274
  // if (!context.paraphrase) {
266
275
  // return
267
276
  // }
@@ -560,15 +569,12 @@ let configStruct = {
560
569
  /*
561
570
  const propertyId = context.marker
562
571
  if (context.marker != context.value) {
563
- debugger
564
- debugger // target
565
572
  }
566
573
  */
567
574
  // const propertyId = context.marker
568
575
  /*
569
576
  // greg HERE
570
577
  */
571
- // debugger;
572
578
  propertyContext[`disable${uuid}`] = true
573
579
  const propertyId = km("dialogues").api.evaluateToConcept(propertyContext, context, log, s).evalue;
574
580
  try{
@@ -656,7 +662,6 @@ let configStruct = {
656
662
  // TODO maybe this I aware so it can say "I don't know about blah..." and below
657
663
  // if (currentContext.unknown || !currentContext.value) {
658
664
  if (!api.conceptExists(currentContext.value)) {
659
- // debugger;
660
665
  // api.conceptExists(currentContext)
661
666
  const objectPhrase = g({...currentContext, paraphrase: true})
662
667
  context.verbatim = `What "${objectPhrase}" means is unknown`
@@ -703,7 +708,7 @@ knowledgeModule( {
703
708
  contents: properties_tests,
704
709
  checks: {
705
710
  context: defaultContextCheck,
706
- xobjects: [
711
+ objects: [
707
712
  'children',
708
713
  'concept',
709
714
  'parents',