tpmkms_4wp 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
@@ -63,21 +63,21 @@ let configStruct = {
63
63
  {
64
64
  where: where(),
65
65
  match: ({context}) => false && context.quantity,
66
- apply: ({context, g}) => {
66
+ apply: async ({context, g}) => {
67
67
  let number = context.quantity.number || 'one'
68
68
  if (context.quantity.value > 1) {
69
69
  number = 'many'
70
70
  }
71
- const countable = g({ ...context, quantity: undefined, number})
72
- return `${g(context.quantity)} ${countable}`
71
+ const countable = await g({ ...context, quantity: undefined, number})
72
+ return `${await g(context.quantity)} ${countable}`
73
73
  }
74
74
  },
75
75
  ]
76
76
  };
77
77
 
78
- const createConfig = () => {
78
+ const createConfig = async () => {
79
79
  const config = new Config(configStruct, module)
80
- config.add(dialogues(), numbers())
80
+ await config.add(dialogues, numbers)
81
81
  return config
82
82
  }
83
83
 
@@ -2387,24 +2387,6 @@
2387
2387
  1
2388
2388
  ]
2389
2389
  ],
2390
- [
2391
- [
2392
- "is",
2393
- 0
2394
- ],
2395
- [
2396
- "possession",
2397
- 0
2398
- ],
2399
- [
2400
- "unknown",
2401
- 0
2402
- ],
2403
- [
2404
- "unknown",
2405
- 1
2406
- ]
2407
- ],
2408
2390
  [
2409
2391
  [
2410
2392
  "is",
@@ -3765,24 +3747,6 @@
3765
3747
  1
3766
3748
  ]
3767
3749
  ],
3768
- [
3769
- [
3770
- "is",
3771
- 0
3772
- ],
3773
- [
3774
- "possession",
3775
- 0
3776
- ],
3777
- [
3778
- "unknown",
3779
- 0
3780
- ],
3781
- [
3782
- "unknown",
3783
- 1
3784
- ]
3785
- ],
3786
3750
  [
3787
3751
  [
3788
3752
  "is",
@@ -5143,24 +5107,6 @@
5143
5107
  1
5144
5108
  ]
5145
5109
  ],
5146
- [
5147
- [
5148
- "is",
5149
- 0
5150
- ],
5151
- [
5152
- "possession",
5153
- 0
5154
- ],
5155
- [
5156
- "unknown",
5157
- 0
5158
- ],
5159
- [
5160
- "unknown",
5161
- 1
5162
- ]
5163
- ],
5164
5110
  [
5165
5111
  [
5166
5112
  "is",
@@ -9234,24 +9180,6 @@
9234
9180
  1
9235
9181
  ]
9236
9182
  ],
9237
- [
9238
- [
9239
- "is",
9240
- 0
9241
- ],
9242
- [
9243
- "possession",
9244
- 0
9245
- ],
9246
- [
9247
- "unknown",
9248
- 0
9249
- ],
9250
- [
9251
- "unknown",
9252
- 1
9253
- ]
9254
- ],
9255
9183
  [
9256
9184
  [
9257
9185
  "is",
@@ -10692,24 +10620,6 @@
10692
10620
  1
10693
10621
  ]
10694
10622
  ],
10695
- [
10696
- [
10697
- "is",
10698
- 0
10699
- ],
10700
- [
10701
- "possession",
10702
- 0
10703
- ],
10704
- [
10705
- "unknown",
10706
- 0
10707
- ],
10708
- [
10709
- "unknown",
10710
- 1
10711
- ]
10712
- ],
10713
10623
  [
10714
10624
  [
10715
10625
  "is",
@@ -12150,24 +12060,6 @@
12150
12060
  1
12151
12061
  ]
12152
12062
  ],
12153
- [
12154
- [
12155
- "is",
12156
- 0
12157
- ],
12158
- [
12159
- "possession",
12160
- 0
12161
- ],
12162
- [
12163
- "unknown",
12164
- 0
12165
- ],
12166
- [
12167
- "unknown",
12168
- 1
12169
- ]
12170
- ],
12171
12063
  [
12172
12064
  [
12173
12065
  "is",
@@ -18017,24 +17909,6 @@
18017
17909
  1
18018
17910
  ]
18019
17911
  ],
18020
- [
18021
- [
18022
- "is",
18023
- 0
18024
- ],
18025
- [
18026
- "possession",
18027
- 0
18028
- ],
18029
- [
18030
- "unknown",
18031
- 0
18032
- ],
18033
- [
18034
- "unknown",
18035
- 1
18036
- ]
18037
- ],
18038
17912
  [
18039
17913
  [
18040
17914
  "is",
@@ -19555,24 +19429,6 @@
19555
19429
  1
19556
19430
  ]
19557
19431
  ],
19558
- [
19559
- [
19560
- "is",
19561
- 0
19562
- ],
19563
- [
19564
- "possession",
19565
- 0
19566
- ],
19567
- [
19568
- "unknown",
19569
- 0
19570
- ],
19571
- [
19572
- "unknown",
19573
- 1
19574
- ]
19575
- ],
19576
19432
  [
19577
19433
  [
19578
19434
  "is",
@@ -37470,36 +37326,6 @@
37470
37326
  1
37471
37327
  ]
37472
37328
  ],
37473
- [
37474
- [
37475
- "arm",
37476
- 0
37477
- ],
37478
- [
37479
- "is",
37480
- 0
37481
- ],
37482
- [
37483
- "means",
37484
- 0
37485
- ],
37486
- [
37487
- "propertyOf",
37488
- 0
37489
- ],
37490
- [
37491
- "the",
37492
- 0
37493
- ],
37494
- [
37495
- "unknown",
37496
- 0
37497
- ],
37498
- [
37499
- "unknown",
37500
- 1
37501
- ]
37502
- ],
37503
37329
  [
37504
37330
  [
37505
37331
  "arm",
@@ -39761,40 +39587,6 @@
39761
39587
  1
39762
39588
  ]
39763
39589
  ],
39764
- [
39765
- [
39766
- "disarm",
39767
- 0
39768
- ],
39769
- [
39770
- "is",
39771
- 0
39772
- ],
39773
- [
39774
- "means",
39775
- 0
39776
- ],
39777
- [
39778
- "not",
39779
- 0
39780
- ],
39781
- [
39782
- "propertyOf",
39783
- 0
39784
- ],
39785
- [
39786
- "the",
39787
- 0
39788
- ],
39789
- [
39790
- "unknown",
39791
- 0
39792
- ],
39793
- [
39794
- "unknown",
39795
- 1
39796
- ]
39797
- ],
39798
39590
  [
39799
39591
  [
39800
39592
  "disarm",
@@ -40292,36 +40084,6 @@
40292
40084
  1
40293
40085
  ]
40294
40086
  ],
40295
- [
40296
- [
40297
- "arm",
40298
- 0
40299
- ],
40300
- [
40301
- "is",
40302
- 0
40303
- ],
40304
- [
40305
- "means",
40306
- 0
40307
- ],
40308
- [
40309
- "propertyOf",
40310
- 0
40311
- ],
40312
- [
40313
- "the",
40314
- 0
40315
- ],
40316
- [
40317
- "unknown",
40318
- 0
40319
- ],
40320
- [
40321
- "unknown",
40322
- 1
40323
- ]
40324
- ],
40325
40087
  [
40326
40088
  [
40327
40089
  "arm",
@@ -40434,40 +40196,6 @@
40434
40196
  1
40435
40197
  ]
40436
40198
  ],
40437
- [
40438
- [
40439
- "disarm",
40440
- 0
40441
- ],
40442
- [
40443
- "is",
40444
- 0
40445
- ],
40446
- [
40447
- "means",
40448
- 0
40449
- ],
40450
- [
40451
- "not",
40452
- 0
40453
- ],
40454
- [
40455
- "propertyOf",
40456
- 0
40457
- ],
40458
- [
40459
- "the",
40460
- 0
40461
- ],
40462
- [
40463
- "unknown",
40464
- 0
40465
- ],
40466
- [
40467
- "unknown",
40468
- 1
40469
- ]
40470
- ],
40471
40199
  [
40472
40200
  [
40473
40201
  "disarm",
@@ -41070,150 +40798,6 @@
41070
40798
  1
41071
40799
  ]
41072
40800
  ],
41073
- [
41074
- [
41075
- "is",
41076
- 0
41077
- ],
41078
- [
41079
- "possession",
41080
- 0
41081
- ],
41082
- [
41083
- "unknown",
41084
- 0
41085
- ],
41086
- [
41087
- "unknown",
41088
- 1
41089
- ]
41090
- ],
41091
- [
41092
- [
41093
- "is",
41094
- 0
41095
- ],
41096
- [
41097
- "possession",
41098
- 0
41099
- ],
41100
- [
41101
- "unknown",
41102
- 0
41103
- ],
41104
- [
41105
- "unknown",
41106
- 1
41107
- ]
41108
- ],
41109
- [
41110
- [
41111
- "is",
41112
- 0
41113
- ],
41114
- [
41115
- "possession",
41116
- 0
41117
- ],
41118
- [
41119
- "unknown",
41120
- 0
41121
- ],
41122
- [
41123
- "unknown",
41124
- 1
41125
- ]
41126
- ],
41127
- [
41128
- [
41129
- "is",
41130
- 0
41131
- ],
41132
- [
41133
- "possession",
41134
- 0
41135
- ],
41136
- [
41137
- "unknown",
41138
- 0
41139
- ],
41140
- [
41141
- "unknown",
41142
- 1
41143
- ]
41144
- ],
41145
- [
41146
- [
41147
- "is",
41148
- 0
41149
- ],
41150
- [
41151
- "possession",
41152
- 0
41153
- ],
41154
- [
41155
- "unknown",
41156
- 0
41157
- ],
41158
- [
41159
- "unknown",
41160
- 1
41161
- ]
41162
- ],
41163
- [
41164
- [
41165
- "is",
41166
- 0
41167
- ],
41168
- [
41169
- "possession",
41170
- 0
41171
- ],
41172
- [
41173
- "unknown",
41174
- 0
41175
- ],
41176
- [
41177
- "unknown",
41178
- 1
41179
- ]
41180
- ],
41181
- [
41182
- [
41183
- "is",
41184
- 0
41185
- ],
41186
- [
41187
- "possession",
41188
- 0
41189
- ],
41190
- [
41191
- "unknown",
41192
- 0
41193
- ],
41194
- [
41195
- "unknown",
41196
- 1
41197
- ]
41198
- ],
41199
- [
41200
- [
41201
- "is",
41202
- 0
41203
- ],
41204
- [
41205
- "possession",
41206
- 0
41207
- ],
41208
- [
41209
- "unknown",
41210
- 0
41211
- ],
41212
- [
41213
- "unknown",
41214
- 1
41215
- ]
41216
- ],
41217
40801
  [
41218
40802
  [
41219
40803
  "is",
package/common/crew.js CHANGED
@@ -37,12 +37,12 @@ const template = {
37
37
  ],
38
38
  };
39
39
 
40
- const createConfig = () => {
40
+ const createConfig = async () => {
41
41
  const config = new Config({ name: 'crew', }, module)
42
42
  config.stop_auto_rebuild()
43
- config.add(avatar(), animals())
43
+ await config.add(avatar, animals)
44
44
  crew_instance.base = 'avatar'
45
- config.initializer( ({config, apis}) => {
45
+ await config.initializer( ({config, apis}) => {
46
46
  const api = apis('properties')
47
47
  const conceptApi = apis('concept')
48
48
  // conceptApi.kindOfConcept({ config, modifiers: ['photon'], object: 'torpedo' })
@@ -75,7 +75,7 @@ const createConfig = () => {
75
75
  after: [{tag: 'weapon', id: 'weapon'}],
76
76
  config })
77
77
  })
78
- config.restart_auto_rebuild()
78
+ await config.restart_auto_rebuild()
79
79
  return config
80
80
  }
81
81
 
@@ -60,14 +60,14 @@ let configStruct = {
60
60
  {
61
61
  where: where(),
62
62
  match: ({context}) => context.marker == 'currency' && !context.isAbstract,
63
- apply: ({context, g}) => {
63
+ apply: async ({context, g}) => {
64
64
  word = Object.assign({}, context.amount)
65
65
  word.isAbstract = true
66
66
  word.marker = 'currency'
67
67
  word.units = context.units
68
68
  word.value = context.amount.value
69
69
  // generator = [({context}) => context.marker == 'currency' && context.units == words.units && context.value > 1 && context.isAbstract, ({context, g}) => words.many ]
70
- return `${g(context.amount.value)} ${g(word)}`
70
+ return `${await g(context.amount.value)} ${await g(word)}`
71
71
  }
72
72
  },
73
73
  ],
@@ -90,12 +90,12 @@ let configStruct = {
90
90
  ],
91
91
  };
92
92
 
93
- const createConfig = () => {
93
+ const createConfig = async () => {
94
94
  const config = new Config(configStruct, module)
95
95
  config.stop_auto_rebuild()
96
- config.add(numbersKM())
97
- config.api = api
98
- config.initializer( ({config, objects, apis, addWord, addGenerator, baseConfig, uuid}) => {
96
+ await config.add(numbersKM)
97
+ await config.setApi(api)
98
+ await config.initializer( ({config, objects, apis, addWord, addGenerator, baseConfig, uuid}) => {
99
99
  // const api = config.km('currency').api
100
100
  // const api = kms.currency.api
101
101
  const api = apis('currency')
@@ -128,7 +128,7 @@ const createConfig = () => {
128
128
  })
129
129
  }
130
130
  })
131
- config.restart_auto_rebuild()
131
+ await config.restart_auto_rebuild()
132
132
  return config
133
133
  }
134
134