ekms 9.6.3 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/actions.instance.json +2771 -15
- package/common/actions.js +116 -8
- package/common/actions.test.json +79138 -384
- package/common/angle.instance.json +138 -834
- package/common/angle.test.json +172 -127
- package/common/animals.instance.json +260 -0
- package/common/articles.js +1 -2
- package/common/avatar.test.json +173 -33
- package/common/can.instance.json +40 -0
- package/common/colors.instance.json +308 -0
- package/common/comparable.instance.json +120 -0
- package/common/compass.instance.json +63 -18
- package/common/concept.js +2 -1
- package/common/conjunction.js +11 -17
- package/common/control.js +42 -0
- package/common/control.test.json +2 -0
- package/common/crew.instance.json +520 -0
- package/common/dates.instance.json +184 -0
- package/common/dialogues.js +3 -3
- package/common/dimension.instance.json +264 -69
- package/common/dimension.js +5 -5
- package/common/dimension.test.json +545 -441
- package/common/drone.instance.json +15927 -2638
- package/common/drone.js +359 -71
- package/common/drone.test.json +587651 -44132
- package/common/drone_v1.instance.json +492 -59
- package/common/drone_v1.js +9 -9
- package/common/edible.instance.json +696 -0
- package/common/emotions.instance.json +20 -0
- package/common/evaluate.js +1 -1
- package/common/fastfood.instance.json +1310 -216
- package/common/fastfood.js +1 -1
- package/common/formulas.instance.json +20 -5
- package/common/formulas.js +1 -1
- package/common/gdefaults.js +32 -5
- package/common/help.test.json +23 -3
- package/common/helpers/conjunction.js +2 -0
- package/common/helpers/formulas.js +6 -0
- package/common/helpers/properties.js +9 -7
- package/common/helpers.js +11 -6
- package/common/hierarchy.js +2 -0
- package/common/kirk.instance.json +20 -0
- package/common/length.instance.json +1117 -5708
- package/common/length.test.json +29761 -12488
- package/common/logging.js +41 -0
- package/common/logging.test.json +2 -0
- package/common/math.instance.json +30 -12
- package/common/math.js +6 -5
- package/common/menus.instance.json +140 -35
- package/common/meta.js +1 -1
- package/common/nameable.js +7 -9
- package/common/nameable.test.json +252 -150
- package/common/ordering.instance.json +40 -0
- package/common/ordinals.js +51 -5
- package/common/people.instance.json +160 -0
- package/common/pipboy.instance.json +396 -85
- package/common/pipboy.js +1 -1
- package/common/pokemon.instance.json +260 -0
- package/common/pressure.instance.json +108 -370
- package/common/properties.instance.json +20 -0
- package/common/properties.js +5 -4
- package/common/properties.test.json +2754 -2142
- package/common/rates.instance.json +1 -1
- package/common/rates.js +3 -3
- package/common/rates.test.json +6914 -2428
- package/common/reminders.js +1 -1
- package/common/reports.instance.json +49 -176
- package/common/reports.js +2 -2
- package/common/scorekeeper.js +1 -1
- package/common/sdefaults.js +18 -5
- package/common/spock.instance.json +20 -0
- package/common/stm.js +115 -53
- package/common/stm.test.json +2670 -54
- package/common/temperature.instance.json +709 -2284
- package/common/time.instance.json +14333 -2220
- package/common/time.js +48 -2
- package/common/time.test.json +13239 -0
- package/common/tokenize.js +2 -0
- package/common/ui.instance.json +20 -5
- package/common/ui.js +1 -1
- package/common/weight.instance.json +621 -1886
- package/common/wp.instance.json +336 -70
- package/main.js +4 -0
- package/package.json +11 -5
package/common/drone_v1.js
CHANGED
|
@@ -146,7 +146,7 @@ class API {
|
|
|
146
146
|
return null // in motion
|
|
147
147
|
}
|
|
148
148
|
const ordinal = this._objects.current.ordinal
|
|
149
|
-
const lastPoint = await this.args.
|
|
149
|
+
const lastPoint = await this.args.recall({ context: { marker: 'point' }, condition: (context) => context.ordinal == ordinal })
|
|
150
150
|
|
|
151
151
|
const durationInSeconds = (this._objects.current.endTime - this._objects.current.startTime) / 1000
|
|
152
152
|
const speedInMetersPerSecond = (this._objects.current.power / this._objects.calibration.power) * this._objects.calibration.speed
|
|
@@ -162,7 +162,7 @@ class API {
|
|
|
162
162
|
async markCurrentPoint() {
|
|
163
163
|
const ordinal = this.nextOrdinal()
|
|
164
164
|
const point = await this.currentPoint()
|
|
165
|
-
this.args.
|
|
165
|
+
this.args.remember({ marker: 'point', ordinal, point })
|
|
166
166
|
this._objects.current.ordinal = ordinal
|
|
167
167
|
this._objects.current.endTime = null
|
|
168
168
|
this._objects.current.startTime = null
|
|
@@ -196,7 +196,7 @@ class API {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
if (this._objects.current.destination) {
|
|
199
|
-
const currentPoint = await this.args.
|
|
199
|
+
const currentPoint = await this.args.recall({ context: { marker: 'point' } })
|
|
200
200
|
const polar = cartesianToPolar(currentPoint.point, this._objects.current.destination.point)
|
|
201
201
|
const destinationAngleInDegrees = radiansToDegrees(polar.angle)
|
|
202
202
|
let angleDelta = destinationAngleInDegrees - this._objects.current.angleInDegrees
|
|
@@ -398,12 +398,12 @@ function expectCalibrationCompletion(args) {
|
|
|
398
398
|
args.config.addSemantic({
|
|
399
399
|
oneShot: true,
|
|
400
400
|
match: ({context, objects, isA}) => context.marker == 'controlEnd' && objects.calibration.distance && objects.calibration.duration && !objects.calibration.speed,
|
|
401
|
-
apply: ({api, context, objects, _continue, say,
|
|
401
|
+
apply: ({api, context, objects, _continue, say, remember}) => {
|
|
402
402
|
objects.calibration.speed = objects.calibration.distance / objects.calibration.duration
|
|
403
403
|
objects.isCalibrated = true
|
|
404
404
|
say(`The drone is calibrated. The speed is ${objects.calibration.speed.toFixed(4)} meters per second at 10 percent power`)
|
|
405
405
|
const ordinal = api.nextOrdinal()
|
|
406
|
-
|
|
406
|
+
remember({ marker: 'point', ordinal, point: { x: objects.calibration.distance, y: 0 }, distance: objects.calibration.distance, description: "calibration stop" })
|
|
407
407
|
objects.current.ordinal = ordinal
|
|
408
408
|
_continue()
|
|
409
409
|
expectDistanceForMove(args)
|
|
@@ -502,13 +502,13 @@ const template = {
|
|
|
502
502
|
id: 'calibrate',
|
|
503
503
|
isA: ['verb'],
|
|
504
504
|
bridge: "{ ...next(operator), interpolate: [{ context: operator }] }",
|
|
505
|
-
semantic: ({context, objects, api,
|
|
505
|
+
semantic: ({context, objects, api, remember}) => {
|
|
506
506
|
objects.current.direction = 'forward'
|
|
507
507
|
const startTime = api.forward(objects.current.power)
|
|
508
508
|
objects.calibration.startTime = startTime
|
|
509
509
|
|
|
510
510
|
const ordinal = api.nextOrdinal()
|
|
511
|
-
|
|
511
|
+
remember({ marker: 'point', ordinal, point: { x: 0, y: 0 }, description: "calibration start" })
|
|
512
512
|
objects.current.ordinal = ordinal
|
|
513
513
|
}
|
|
514
514
|
},
|
|
@@ -529,7 +529,7 @@ const template = {
|
|
|
529
529
|
1: "{ marker: 'drone' }",
|
|
530
530
|
},
|
|
531
531
|
bridge: "{ ...next(operator), object: after[0], interpolate: [{ context: operator }, { property: 'object' }] }",
|
|
532
|
-
semantic: async ({
|
|
532
|
+
semantic: async ({remember, context, objects, api, say}) => {
|
|
533
533
|
if (!objects.calibration.startTime) {
|
|
534
534
|
return // ignore
|
|
535
535
|
}
|
|
@@ -538,7 +538,7 @@ const template = {
|
|
|
538
538
|
const stopTime = api.stop()
|
|
539
539
|
const ordinal = api.nextOrdinal()
|
|
540
540
|
const point = api.currentPoint()
|
|
541
|
-
|
|
541
|
+
remember({ marker: 'point', ordinal, point })
|
|
542
542
|
objects.current.ordinal = ordinal
|
|
543
543
|
*/
|
|
544
544
|
api.stop()
|