tpmkms 7.12.4-beta.0 → 7.12.4-beta.1

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.
@@ -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
- const item_id = this.api.add(item)
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
  ],