tpmkms_4wp 7.12.8-beta.0 → 7.12.8-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/common/dimension.instance.json +736 -62
- package/common/dimension.js +15 -7
- package/common/formulas.instance.json +992 -0
- package/common/formulas.js +18 -5
- package/common/length.instance.json +141 -445
- package/common/pipboy.instance.json +23454 -1101
- package/common/pipboy.js +31 -4
- package/common/pressure.instance.json +48 -0
- package/common/temperature.instance.json +48 -0
- package/common/weight.instance.json +144 -0
- package/main.js +0 -6
- package/package.json +4 -16
- package/common/dimensionTemplate.instance.json +0 -582
- package/common/dimensionTemplate.js +0 -35
- package/common/dimensionTemplate.test.json +0 -2
- package/common/formulasTemplate.instance.json +0 -483
- package/common/formulasTemplate.js +0 -30
- package/common/formulasTemplate.test.json +0 -2
- package/common/pipboyTemplate.instance.json +0 -17420
- package/common/pipboyTemplate.js +0 -48
- package/common/pipboyTemplate.test.json +0 -2
package/common/formulas.js
CHANGED
@@ -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
|
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
|
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(
|
197
|
+
config = new Config({ name: 'formulas' }, module)
|
186
198
|
config.stop_auto_rebuild()
|
187
|
-
config.add(dialogues(), pos(), math(),
|
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:
|
212
|
+
contents: tests,
|
200
213
|
checks: {
|
201
214
|
objects: ['formulas'],
|
202
215
|
context: defaultContextCheck,
|