ekms 8.0.0 → 8.1.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/animals.instance.json +3003 -1651
- package/common/animals.js +17 -20
- package/common/articles.js +103 -0
- package/common/articles.test.json +310 -0
- package/common/asking.instance.json +2 -0
- package/common/asking.js +253 -0
- package/common/asking.test.json +2290 -0
- package/common/avatar.js +6 -10
- package/common/characters.js +23 -30
- package/common/colors.instance.json +25513 -0
- package/common/colors.js +67 -0
- package/common/colors.test.json +4425 -0
- package/common/comparable.instance.json +1750 -0
- package/common/comparable.js +36 -28
- package/common/comparable.test.json +1196 -2
- package/common/concept.js +121 -119
- package/common/conjunction.instance.json +2 -0
- package/common/conjunction.js +104 -0
- package/common/conjunction.test.json +322 -0
- package/common/countable.js +20 -14
- package/common/countable.test.json +1050 -0
- package/common/crew.instance.json +16855 -9731
- package/common/crew.js +39 -42
- package/common/crew.test.json +714 -452
- package/common/currency.js +28 -46
- package/common/dialogues.js +177 -426
- package/common/dialogues.test.json +684 -450
- package/common/dimension.instance.json +508 -289
- package/common/dimension.js +22 -24
- package/common/dimension.test.json +727 -1944
- package/common/edible.instance.json +20548 -10848
- package/common/edible.js +4 -9
- package/common/emotions.instance.json +255 -123
- package/common/emotions.js +36 -39
- package/common/evaluate.instance.json +2 -0
- package/common/evaluate.js +53 -0
- package/common/evaluate.test.json +574 -0
- package/common/events.js +11 -15
- package/common/fastfood.instance.json +223039 -113390
- package/common/fastfood.js +77 -87
- package/common/fastfood.test.json +8205 -3733
- package/common/formulas.instance.json +444 -244
- package/common/formulas.js +20 -27
- package/common/formulas.test.json +1027 -955
- package/common/gdefaults.js +40 -27
- package/common/help.js +9 -14
- package/common/help.test.json +71 -18
- package/common/helpers/concept.js +33 -10
- package/common/helpers/dialogues.js +22 -4
- package/common/helpers/formulas.js +0 -14
- package/common/helpers/meta.js +0 -1
- package/common/helpers/properties.js +72 -76
- package/common/helpers.js +35 -24
- package/common/hierarchy.js +17 -25
- package/common/javascript.js +12 -19
- package/common/kirk.instance.json +586 -298
- package/common/kirk.js +6 -9
- package/common/length.instance.json +9158 -5124
- package/common/length.js +5 -9
- package/common/listener.js +48 -0
- package/common/listener.test.json +104 -0
- package/common/math.instance.json +409 -1202
- package/common/math.js +17 -21
- package/common/meta.js +24 -50
- package/common/nameable.instance.json +2 -0
- package/common/nameable.js +144 -0
- package/common/nameable.test.json +3191 -0
- package/common/negation.instance.json +2 -0
- package/common/negation.js +38 -0
- package/common/negation.test.json +308 -0
- package/common/numbers.js +28 -32
- package/common/ordering.instance.json +449 -273
- package/common/ordering.js +81 -87
- package/common/ordinals.instance.json +2 -0
- package/common/ordinals.js +60 -0
- package/common/ordinals.test.json +306 -0
- package/common/people.instance.json +2176 -1141
- package/common/people.js +9 -14
- package/common/percentages.instance.json +2 -0
- package/common/percentages.js +53 -0
- package/common/percentages.test.json +751 -0
- package/common/pipboy.instance.json +12120 -6879
- package/common/pipboy.js +53 -62
- package/common/pipboy.test.json +2835 -0
- package/common/pokemon.instance.json +4415 -2351
- package/common/pokemon.js +8 -21
- package/common/pos.js +16 -14
- package/common/pressure.instance.json +2348 -1373
- package/common/pressure.js +5 -9
- package/common/properties.instance.json +151 -87
- package/common/properties.js +156 -167
- package/common/properties.test.json +17605 -4030
- package/common/punctuation.js +24 -8
- package/common/punctuation.test.json +233 -5
- package/common/reports.instance.json +1027 -551
- package/common/reports.js +77 -103
- package/common/reports.test.json +15623 -10458
- package/common/scorekeeper.js +19 -31
- package/common/sdefaults.js +17 -8
- package/common/sizeable.js +13 -12
- package/common/spock.instance.json +585 -297
- package/common/spock.js +6 -9
- package/common/stgame.js +20 -20
- package/common/stm.js +182 -29
- package/common/stm.test.json +1734 -1
- package/common/tell.js +15 -19
- package/common/temperature.instance.json +2480 -1493
- package/common/temperature.js +5 -9
- package/common/tester.js +15 -4
- package/common/testing.js +8 -13
- package/common/time.js +21 -26
- package/common/tokenize.js +8 -8
- package/common/tokenize.test.json +86 -1
- package/common/ui.instance.json +151 -460
- package/common/ui.js +22 -34
- package/common/ui.test.json +641 -5357
- package/common/weight.instance.json +8072 -4490
- package/common/weight.js +5 -9
- package/common/weight.test.json +242 -238
- package/common/yesno.js +6 -6
- package/main.js +68 -45
- package/package.json +44 -6
package/common/crew.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const {
|
1
|
+
const { knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
2
|
const { defaultContextCheck } = require('./helpers')
|
3
3
|
const avatar = require('./avatar')
|
4
4
|
const animals = require('./animals')
|
@@ -8,6 +8,7 @@ const pluralize = require('pluralize')
|
|
8
8
|
|
9
9
|
const template = {
|
10
10
|
configs: [
|
11
|
+
"crew modifies member",
|
11
12
|
"kirk's name is jim",
|
12
13
|
"kirk's rank is captain",
|
13
14
|
"kirk's eyes are blue",
|
@@ -24,6 +25,7 @@ const template = {
|
|
24
25
|
"mccoy is a crew member",
|
25
26
|
"mccoy is a doctor",
|
26
27
|
"the status of the phasers is armed",
|
28
|
+
"photon modifies torpedoes",
|
27
29
|
"the status of the photon torpedoes is armed",
|
28
30
|
"phasers are weapons",
|
29
31
|
"torpedoes are weapons",
|
@@ -35,53 +37,48 @@ const template = {
|
|
35
37
|
],
|
36
38
|
};
|
37
39
|
|
38
|
-
const
|
39
|
-
const
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
],
|
60
|
-
"unknown": true,
|
61
|
-
"value": "armed",
|
62
|
-
"word": "armed",
|
63
|
-
"response": true
|
64
|
-
}
|
65
|
-
km("properties").api.setProperty(context.weapon.value, 'status', value, true)
|
40
|
+
const initializer = ({config, apis}) => {
|
41
|
+
const api = apis('properties')
|
42
|
+
const conceptApi = apis('concept')
|
43
|
+
// conceptApi.kindOfConcept({ config, modifiers: ['photon'], object: 'torpedo' })
|
44
|
+
// conceptApi.kindOfConcept({ config, modifiers: ['crew'], object: 'member' })
|
45
|
+
api.createActionPrefix({
|
46
|
+
operator: 'arm',
|
47
|
+
create: ['arm', 'weapon'],
|
48
|
+
after: [{tag: 'weapon', id: 'weapon'}],
|
49
|
+
config },
|
50
|
+
/*
|
51
|
+
({context, km}) => {
|
52
|
+
const value = {
|
53
|
+
"marker": "unknown",
|
54
|
+
"types": [
|
55
|
+
"unknown"
|
56
|
+
],
|
57
|
+
"unknown": true,
|
58
|
+
"value": "armed",
|
59
|
+
"word": "armed",
|
60
|
+
"response": true
|
66
61
|
}
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
return config
|
62
|
+
km("properties").api.setProperty(context.weapon.value, 'status', value, true)
|
63
|
+
}
|
64
|
+
*/
|
65
|
+
)
|
66
|
+
|
67
|
+
api.createActionPrefix({
|
68
|
+
operator: 'disarm',
|
69
|
+
create: ['disarm'/*, 'weapon'*/],
|
70
|
+
after: [{tag: 'weapon', id: 'weapon'}],
|
71
|
+
config })
|
78
72
|
}
|
79
73
|
|
80
74
|
// config.load(template, crew_instance)
|
81
75
|
knowledgeModule( {
|
76
|
+
config: { name: 'crew', },
|
77
|
+
includes: [avatar, animals],
|
78
|
+
initializer,
|
79
|
+
|
82
80
|
module,
|
83
81
|
description: 'Knowledge about the enterprise and crew using a KM template',
|
84
|
-
createConfig,
|
85
82
|
test: {
|
86
83
|
name: './crew.test.json',
|
87
84
|
contents: crew_tests,
|
@@ -90,7 +87,7 @@ knowledgeModule( {
|
|
90
87
|
template,
|
91
88
|
instance: crew_instance,
|
92
89
|
checks: {
|
93
|
-
context: defaultContextCheck,
|
90
|
+
context: defaultContextCheck(),
|
94
91
|
},
|
95
92
|
},
|
96
93
|
})
|