ekms 7.12.4-beta.0 → 7.12.4-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/common/animals.instance.json +52 -0
- package/common/crew.instance.json +280 -0
- package/common/dialogues.js +3 -2
- package/common/dimension.test.json +170 -26
- package/common/dimensionTemplate.instance.json +4 -0
- package/common/edible.instance.json +128 -0
- package/common/emotions.instance.json +4 -0
- package/common/fastfood.instance.json +1031 -887
- package/common/fastfood.js +12 -8
- package/common/fastfood.test.json +23479 -2077
- package/common/formulasTemplate.instance.json +4 -0
- package/common/kirk.instance.json +4 -0
- package/common/length.instance.json +60 -0
- package/common/mathTemplate.instance.json +8 -0
- package/common/ordering.instance.json +8 -0
- package/common/people.instance.json +32 -0
- package/common/pokemon.instance.json +52 -0
- package/common/pressure.instance.json +16 -0
- package/common/properties.instance.json +4 -0
- package/common/reports.instance.json +9 -1
- package/common/reports.js +3 -2
- package/common/spock.instance.json +4 -0
- package/common/stm.js +21 -6
- package/common/temperature.instance.json +16 -0
- package/common/ui.instance.json +4 -0
- package/common/weight.instance.json +48 -0
- package/package.json +2 -2
package/common/fastfood.js
CHANGED
@@ -391,24 +391,26 @@ const template = {
|
|
391
391
|
},
|
392
392
|
{
|
393
393
|
operators: [
|
394
|
-
"([change] (meal/*) (to/1))",
|
394
|
+
"([change] (meal/* || drink/*) (to/1))",
|
395
395
|
],
|
396
396
|
hierarchy: [
|
397
397
|
['meal', 'toAble'],
|
398
|
+
['drink', 'toAble'],
|
398
399
|
],
|
399
400
|
bridges: [
|
400
401
|
{
|
401
402
|
id: "change",
|
402
403
|
isA: ['verby'],
|
404
|
+
localHierarchy: [ ['thisitthat', 'meal'] ],
|
403
405
|
generatorp: ({context, gp}) => `change ${gp(context.from)} to ${gp(context.to)}`,
|
404
406
|
bridge: "{ ...next(operator), from: after[0], to: after[1].toObject }",
|
405
|
-
semantic: ({context, api}) => {
|
407
|
+
semantic: ({context, api, e}) => {
|
406
408
|
const state = api.state
|
409
|
+
const eFrom = e(context.from).evalue
|
410
|
+
const from = state.getIdCombo(eFrom.fromSTM ? eFrom : context.from)
|
411
|
+
const to = state.getIdCombo(context.to)
|
407
412
|
for (const item of api.items()) {
|
408
|
-
const from = state.getIdCombo(context.from)
|
409
|
-
const to = state.getIdCombo(context.to)
|
410
413
|
if (item.id == from.id) {
|
411
|
-
debugger
|
412
414
|
api.modify(item, { id: to.id })
|
413
415
|
}
|
414
416
|
}
|
@@ -464,7 +466,7 @@ class API {
|
|
464
466
|
}
|
465
467
|
|
466
468
|
items() {
|
467
|
-
return this._objects.items
|
469
|
+
return [...this._objects.items]
|
468
470
|
}
|
469
471
|
|
470
472
|
addDrink(item_id, drink) {
|
@@ -748,7 +750,8 @@ class State {
|
|
748
750
|
return
|
749
751
|
}
|
750
752
|
|
751
|
-
|
753
|
+
this.api.add(item)
|
754
|
+
this.api.args.mentioned(food)
|
752
755
|
|
753
756
|
for (const addIt of addsInsteadOfModifications) {
|
754
757
|
this.add(addIt)
|
@@ -788,7 +791,7 @@ const createConfig = (additionalConfig) => {
|
|
788
791
|
},
|
789
792
|
{
|
790
793
|
where: where(),
|
791
|
-
match: ({context, isAListable}) => isAListable(context, 'edible') && context.marker !== 'edible' && !context.same && !context.isResponse,
|
794
|
+
match: ({context, isAListable}) => isAListable(context, 'edible') && context.marker !== 'edible' && !context.same && !context.isResponse && !context.evaluate,
|
792
795
|
apply: ({context, km, api, instance}) => {
|
793
796
|
for (const element of propertyToArray(context)) {
|
794
797
|
km('fastfood').api.state.add(element)
|
@@ -845,6 +848,7 @@ knowledgeModule( {
|
|
845
848
|
'changes',
|
846
849
|
'response',
|
847
850
|
{ property: 'notAvailable', filter: [ 'marker', 'value', 'text' ] },
|
851
|
+
{ property: 'notAvailableModification', filter: [ 'marker', 'value', 'text' ] },
|
848
852
|
{ property: 'quantity', filter: ['marker', 'value', 'text' ] },
|
849
853
|
{ property: 'pieces', filter: ['marker', 'value', 'text' ] },
|
850
854
|
],
|