tpmkms 7.12.4-beta.4 → 7.12.4-beta.6

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.
@@ -908,7 +908,7 @@
908
908
  ]
909
909
  },
910
910
  {
911
- "apply": "({ask, api}) => {\n // see if followup for drink is needed\n\n const hasDrink = (isA, item) => {\n let hasDrink = false\n for (let modification of (item.modifications || [])) {\n if (isA(modification.id, 'drink')) {\n hasDrink = true\n break\n }\n }\n return hasDrink\n }\n\n const needsDrink = (item) => {\n return item.needsDrink\n }\n\n const askAbout = ({api, isA}) => {\n const items = []\n for (const item of api.items()) {\n if (needsDrink(item) && !hasDrink(isA, item)) {\n items.push(item)\n }\n }\n return items\n }\n\n ask([\n {\n where: where(),\n oneShot: false,\n onNevermind: ({verbatim, ...args}) => {\n // this is cross km boundaries from the dialogues km to this one so the api if for dialogs. \n // i need to get the one for fastfood here.\n const api = args.kms.fastfood.api\n const needsDrink = askAbout({ args, api })\n if (needsDrink.length > 1) {\n verbatim(\"The drinks must be specified\")\n } else {\n verbatim(\"The drink must be specified\")\n }\n return false\n },\n matchq: (args) => askAbout(args).length > 0 && args.context.marker == 'controlEnd',\n applyq: (args) => {\n args.context.cascade = true\n const needsDrink = askAbout(args)\n // const details = args.gp({ marker: 'list', value: needsDrink.map((item) => item.food)})\n if (needsDrink.length > 1) {\n return `What drinks do you want?`\n } else {\n return `What drink do you want?`\n }\n },\n matchr: (args) => {\n if (args.isA(args.context.marker, 'drink') && askAbout(args).length > 0) {\n const needsDrink = askAbout(args)\n if (args.api.isAvailableModification(needsDrink[0].food, { ...args.context , id: args.context.value })) {\n return true\n }\n }\n return false\n },\n applyr: (args) => {\n // TODO check for is available for all modifications\n const needsDrink = askAbout(args)\n const { api, context } = args\n if (isMany(context)) {\n let count = getCount(context) || Number.MAX_SAFE_INTEGER\n for (let item of needsDrink) {\n if (count < 1) {\n break\n }\n count -= 1\n api.addDrink(item.item_id, { id: context.value }) \n }\n } else {\n const item_id = needsDrink[0].item_id\n api.addDrink(item_id, { id: context.value }) \n }\n }\n },\n ])\n }"
911
+ "apply": "({ask, api}) => {\n // see if followup for drink is needed\n\n const hasDrink = (isA, item) => {\n let hasDrink = false\n for (let modification of (item.modifications || [])) {\n if (isA(modification.id, 'drink')) {\n hasDrink = true\n break\n }\n }\n return hasDrink\n }\n\n const needsDrink = (item) => {\n return item.needsDrink\n }\n\n const askAbout = ({api, isA}) => {\n const items = []\n for (const item of api.items()) {\n if (needsDrink(item) && !hasDrink(isA, item)) {\n items.push(item)\n }\n }\n return items\n }\n\n ask([\n {\n where: where(),\n oneShot: false,\n onNevermind: ({verbatim, ...args}) => {\n // this is cross km boundaries from the dialogues km to this one so the api if for dialogs. \n // i need to get the one for fastfood here.\n const api = args.kms.fastfood.api\n const needsDrink = askAbout({ args, api })\n for (const item of needsDrink) {\n api.remove(item)\n }\n },\n matchq: (args) => askAbout(args).length > 0 && args.context.marker == 'controlEnd',\n applyq: (args) => {\n args.context.cascade = true\n const needsDrink = askAbout(args)\n // const details = args.gp({ marker: 'list', value: needsDrink.map((item) => item.food)})\n if (needsDrink.length > 1) {\n return `What drinks do you want?`\n } else {\n return `What drink do you want?`\n }\n },\n matchr: (args) => {\n if (args.isA(args.context.marker, 'drink') && askAbout(args).length > 0) {\n const needsDrink = askAbout(args)\n if (args.api.isAvailableModification(needsDrink[0].food, { ...args.context , id: args.context.value })) {\n return true\n }\n }\n return false\n },\n applyr: (args) => {\n // TODO check for is available for all modifications\n const needsDrink = askAbout(args)\n const { api, context } = args\n if (isMany(context)) {\n let count = getCount(context) || Number.MAX_SAFE_INTEGER\n for (let item of needsDrink) {\n if (count < 1) {\n break\n }\n count -= 1\n api.addDrink(item.item_id, { id: context.value }) \n }\n } else {\n const item_id = needsDrink[0].item_id\n api.addDrink(item_id, { id: context.value }) \n }\n }\n },\n ])\n }"
912
912
  },
913
913
  {
914
914
  "operators": [
@@ -3566,7 +3566,8 @@
3566
3566
  "level": 2,
3567
3567
  "topLevel": true,
3568
3568
  "touchedBy": [
3569
- "fastfood#call2"
3569
+ "fastfood#call2",
3570
+ "instance0#fastfood#call2"
3570
3571
  ]
3571
3572
  }
3572
3573
  ],
@@ -5956,7 +5957,8 @@
5956
5957
  "level": 2,
5957
5958
  "topLevel": true,
5958
5959
  "touchedBy": [
5959
- "fastfood#call2"
5960
+ "fastfood#call2",
5961
+ "instance0#fastfood#call2"
5960
5962
  ]
5961
5963
  }
5962
5964
  ],
@@ -8333,7 +8335,8 @@
8333
8335
  "level": 1,
8334
8336
  "topLevel": true,
8335
8337
  "touchedBy": [
8336
- "fastfood#call2"
8338
+ "fastfood#call2",
8339
+ "instance0#fastfood#call2"
8337
8340
  ]
8338
8341
  }
8339
8342
  ],
@@ -10847,7 +10850,8 @@
10847
10850
  "level": 1,
10848
10851
  "topLevel": true,
10849
10852
  "touchedBy": [
10850
- "fastfood#call2"
10853
+ "fastfood#call2",
10854
+ "instance0#fastfood#call2"
10851
10855
  ]
10852
10856
  }
10853
10857
  ],
@@ -13404,7 +13408,8 @@
13404
13408
  "level": 1,
13405
13409
  "topLevel": true,
13406
13410
  "touchedBy": [
13407
- "fastfood#call2"
13411
+ "fastfood#call2",
13412
+ "instance0#fastfood#call2"
13408
13413
  ]
13409
13414
  }
13410
13415
  ],
@@ -16116,7 +16121,8 @@
16116
16121
  "level": 1,
16117
16122
  "topLevel": true,
16118
16123
  "touchedBy": [
16119
- "fastfood#call2"
16124
+ "fastfood#call2",
16125
+ "instance0#fastfood#call2"
16120
16126
  ]
16121
16127
  }
16122
16128
  ],
@@ -18924,7 +18930,8 @@
18924
18930
  "level": 1,
18925
18931
  "topLevel": true,
18926
18932
  "touchedBy": [
18927
- "fastfood#call2"
18933
+ "fastfood#call2",
18934
+ "instance0#fastfood#call2"
18928
18935
  ]
18929
18936
  }
18930
18937
  ],
@@ -21859,7 +21866,8 @@
21859
21866
  "level": 1,
21860
21867
  "topLevel": true,
21861
21868
  "touchedBy": [
21862
- "fastfood#call2"
21869
+ "fastfood#call2",
21870
+ "instance0#fastfood#call2"
21863
21871
  ]
21864
21872
  }
21865
21873
  ],
@@ -24847,7 +24855,8 @@
24847
24855
  "level": 1,
24848
24856
  "topLevel": true,
24849
24857
  "touchedBy": [
24850
- "fastfood#call2"
24858
+ "fastfood#call2",
24859
+ "instance0#fastfood#call2"
24851
24860
  ]
24852
24861
  }
24853
24862
  ],
@@ -27916,7 +27925,8 @@
27916
27925
  "level": 1,
27917
27926
  "topLevel": true,
27918
27927
  "touchedBy": [
27919
- "fastfood#call2"
27928
+ "fastfood#call2",
27929
+ "instance0#fastfood#call2"
27920
27930
  ]
27921
27931
  }
27922
27932
  ],
@@ -31047,7 +31057,8 @@
31047
31057
  "level": 2,
31048
31058
  "topLevel": true,
31049
31059
  "touchedBy": [
31050
- "fastfood#call2"
31060
+ "fastfood#call2",
31061
+ "instance0#fastfood#call2"
31051
31062
  ]
31052
31063
  }
31053
31064
  ],
@@ -34158,7 +34169,8 @@
34158
34169
  "level": 1,
34159
34170
  "topLevel": true,
34160
34171
  "touchedBy": [
34161
- "fastfood#call2"
34172
+ "fastfood#call2",
34173
+ "instance0#fastfood#call2"
34162
34174
  ]
34163
34175
  }
34164
34176
  ],
@@ -37347,7 +37359,8 @@
37347
37359
  "level": 1,
37348
37360
  "topLevel": true,
37349
37361
  "touchedBy": [
37350
- "fastfood#call2"
37362
+ "fastfood#call2",
37363
+ "instance0#fastfood#call2"
37351
37364
  ]
37352
37365
  }
37353
37366
  ],
@@ -40588,7 +40601,8 @@
40588
40601
  "level": 1,
40589
40602
  "topLevel": true,
40590
40603
  "touchedBy": [
40591
- "fastfood#call2"
40604
+ "fastfood#call2",
40605
+ "instance0#fastfood#call2"
40592
40606
  ]
40593
40607
  }
40594
40608
  ],
@@ -43901,7 +43915,8 @@
43901
43915
  "level": 1,
43902
43916
  "topLevel": true,
43903
43917
  "touchedBy": [
43904
- "fastfood#call2"
43918
+ "fastfood#call2",
43919
+ "instance0#fastfood#call2"
43905
43920
  ]
43906
43921
  }
43907
43922
  ],
@@ -47284,7 +47299,8 @@
47284
47299
  "level": 1,
47285
47300
  "topLevel": true,
47286
47301
  "touchedBy": [
47287
- "fastfood#call2"
47302
+ "fastfood#call2",
47303
+ "instance0#fastfood#call2"
47288
47304
  ]
47289
47305
  }
47290
47306
  ],
@@ -50739,7 +50755,8 @@
50739
50755
  "level": 1,
50740
50756
  "topLevel": true,
50741
50757
  "touchedBy": [
50742
- "fastfood#call2"
50758
+ "fastfood#call2",
50759
+ "instance0#fastfood#call2"
50743
50760
  ]
50744
50761
  }
50745
50762
  ],
@@ -54307,7 +54324,8 @@
54307
54324
  "level": 2,
54308
54325
  "topLevel": true,
54309
54326
  "touchedBy": [
54310
- "fastfood#call2"
54327
+ "fastfood#call2",
54328
+ "instance0#fastfood#call2"
54311
54329
  ]
54312
54330
  }
54313
54331
  ],
@@ -57822,7 +57840,8 @@
57822
57840
  "level": 1,
57823
57841
  "topLevel": true,
57824
57842
  "touchedBy": [
57825
- "fastfood#call2"
57843
+ "fastfood#call2",
57844
+ "instance0#fastfood#call2"
57826
57845
  ]
57827
57846
  }
57828
57847
  ],
@@ -61437,7 +61456,8 @@
61437
61456
  "level": 1,
61438
61457
  "topLevel": true,
61439
61458
  "touchedBy": [
61440
- "fastfood#call2"
61459
+ "fastfood#call2",
61460
+ "instance0#fastfood#call2"
61441
61461
  ]
61442
61462
  }
61443
61463
  ],
@@ -65160,7 +65180,8 @@
65160
65180
  "level": 1,
65161
65181
  "topLevel": true,
65162
65182
  "touchedBy": [
65163
- "fastfood#call2"
65183
+ "fastfood#call2",
65184
+ "instance0#fastfood#call2"
65164
65185
  ]
65165
65186
  }
65166
65187
  ],
@@ -69626,7 +69647,8 @@
69626
69647
  "level": 1,
69627
69648
  "topLevel": true,
69628
69649
  "touchedBy": [
69629
- "fastfood#call2"
69650
+ "fastfood#call2",
69651
+ "instance0#fastfood#call2"
69630
69652
  ]
69631
69653
  }
69632
69654
  ],
@@ -74723,7 +74745,8 @@
74723
74745
  "level": 2,
74724
74746
  "topLevel": true,
74725
74747
  "touchedBy": [
74726
- "fastfood#call2"
74748
+ "fastfood#call2",
74749
+ "instance0#fastfood#call2"
74727
74750
  ]
74728
74751
  }
74729
74752
  ],
@@ -79056,7 +79079,8 @@
79056
79079
  "level": 1,
79057
79080
  "topLevel": true,
79058
79081
  "touchedBy": [
79059
- "fastfood#call2"
79082
+ "fastfood#call2",
79083
+ "instance0#fastfood#call2"
79060
79084
  ]
79061
79085
  }
79062
79086
  ],
@@ -84116,7 +84140,8 @@
84116
84140
  "level": 2,
84117
84141
  "topLevel": true,
84118
84142
  "touchedBy": [
84119
- "fastfood#call2"
84143
+ "fastfood#call2",
84144
+ "instance0#fastfood#call2"
84120
84145
  ]
84121
84146
  }
84122
84147
  ],
@@ -88703,7 +88728,8 @@
88703
88728
  "level": 2,
88704
88729
  "topLevel": true,
88705
88730
  "touchedBy": [
88706
- "fastfood#call2"
88731
+ "fastfood#call2",
88732
+ "instance0#fastfood#call2"
88707
88733
  ]
88708
88734
  }
88709
88735
  ],
@@ -93071,7 +93097,8 @@
93071
93097
  "level": 2,
93072
93098
  "topLevel": true,
93073
93099
  "touchedBy": [
93074
- "fastfood#call2"
93100
+ "fastfood#call2",
93101
+ "instance0#fastfood#call2"
93075
93102
  ]
93076
93103
  }
93077
93104
  ],
@@ -97972,7 +97999,8 @@
97972
97999
  "level": 2,
97973
98000
  "topLevel": true,
97974
98001
  "touchedBy": [
97975
- "fastfood#call2"
98002
+ "fastfood#call2",
98003
+ "instance0#fastfood#call2"
97976
98004
  ]
97977
98005
  }
97978
98006
  ],
@@ -103496,7 +103524,8 @@
103496
103524
  "level": 2,
103497
103525
  "topLevel": true,
103498
103526
  "touchedBy": [
103499
- "fastfood#call2"
103527
+ "fastfood#call2",
103528
+ "instance0#fastfood#call2"
103500
103529
  ]
103501
103530
  }
103502
103531
  ],
@@ -108407,7 +108436,8 @@
108407
108436
  "level": 2,
108408
108437
  "topLevel": true,
108409
108438
  "touchedBy": [
108410
- "fastfood#call2"
108439
+ "fastfood#call2",
108440
+ "instance0#fastfood#call2"
108411
108441
  ]
108412
108442
  }
108413
108443
  ],
@@ -112977,7 +113007,8 @@
112977
113007
  "level": 2,
112978
113008
  "topLevel": true,
112979
113009
  "touchedBy": [
112980
- "fastfood#call2"
113010
+ "fastfood#call2",
113011
+ "instance0#fastfood#call2"
112981
113012
  ]
112982
113013
  }
112983
113014
  ],
@@ -117544,7 +117575,8 @@
117544
117575
  "level": 2,
117545
117576
  "topLevel": true,
117546
117577
  "touchedBy": [
117547
- "fastfood#call2"
117578
+ "fastfood#call2",
117579
+ "instance0#fastfood#call2"
117548
117580
  ]
117549
117581
  }
117550
117582
  ],
@@ -122143,7 +122175,8 @@
122143
122175
  "level": 2,
122144
122176
  "topLevel": true,
122145
122177
  "touchedBy": [
122146
- "fastfood#call2"
122178
+ "fastfood#call2",
122179
+ "instance0#fastfood#call2"
122147
122180
  ]
122148
122181
  }
122149
122182
  ],
@@ -126638,7 +126671,8 @@
126638
126671
  "level": 1,
126639
126672
  "topLevel": true,
126640
126673
  "touchedBy": [
126641
- "fastfood#call2"
126674
+ "fastfood#call2",
126675
+ "instance0#fastfood#call2"
126642
126676
  ]
126643
126677
  }
126644
126678
  ],
@@ -131239,7 +131273,8 @@
131239
131273
  "level": 1,
131240
131274
  "topLevel": true,
131241
131275
  "touchedBy": [
131242
- "fastfood#call2"
131276
+ "fastfood#call2",
131277
+ "instance0#fastfood#call2"
131243
131278
  ]
131244
131279
  }
131245
131280
  ],
@@ -135843,7 +135878,8 @@
135843
135878
  "level": 1,
135844
135879
  "topLevel": true,
135845
135880
  "touchedBy": [
135846
- "fastfood#call2"
135881
+ "fastfood#call2",
135882
+ "instance0#fastfood#call2"
135847
135883
  ]
135848
135884
  }
135849
135885
  ],
@@ -140487,7 +140523,8 @@
140487
140523
  "level": 1,
140488
140524
  "topLevel": true,
140489
140525
  "touchedBy": [
140490
- "fastfood#call2"
140526
+ "fastfood#call2",
140527
+ "instance0#fastfood#call2"
140491
140528
  ]
140492
140529
  }
140493
140530
  ],
@@ -145175,7 +145212,8 @@
145175
145212
  "level": 1,
145176
145213
  "topLevel": true,
145177
145214
  "touchedBy": [
145178
- "fastfood#call2"
145215
+ "fastfood#call2",
145216
+ "instance0#fastfood#call2"
145179
145217
  ]
145180
145218
  }
145181
145219
  ],
@@ -149908,7 +149946,8 @@
149908
149946
  "level": 1,
149909
149947
  "topLevel": true,
149910
149948
  "touchedBy": [
149911
- "fastfood#call2"
149949
+ "fastfood#call2",
149950
+ "instance0#fastfood#call2"
149912
149951
  ]
149913
149952
  }
149914
149953
  ],
@@ -154715,7 +154754,8 @@
154715
154754
  "level": 1,
154716
154755
  "topLevel": true,
154717
154756
  "touchedBy": [
154718
- "fastfood#call2"
154757
+ "fastfood#call2",
154758
+ "instance0#fastfood#call2"
154719
154759
  ]
154720
154760
  }
154721
154761
  ],
@@ -159599,7 +159639,8 @@
159599
159639
  "level": 2,
159600
159640
  "topLevel": true,
159601
159641
  "touchedBy": [
159602
- "fastfood#call2"
159642
+ "fastfood#call2",
159643
+ "instance0#fastfood#call2"
159603
159644
  ]
159604
159645
  }
159605
159646
  ],
@@ -164487,7 +164528,8 @@
164487
164528
  "level": 1,
164488
164529
  "topLevel": true,
164489
164530
  "touchedBy": [
164490
- "fastfood#call2"
164531
+ "fastfood#call2",
164532
+ "instance0#fastfood#call2"
164491
164533
  ]
164492
164534
  }
164493
164535
  ],
@@ -169391,7 +169433,8 @@
169391
169433
  "level": 1,
169392
169434
  "topLevel": true,
169393
169435
  "touchedBy": [
169394
- "fastfood#call2"
169436
+ "fastfood#call2",
169437
+ "instance0#fastfood#call2"
169395
169438
  ]
169396
169439
  }
169397
169440
  ],
@@ -174340,7 +174383,8 @@
174340
174383
  "level": 1,
174341
174384
  "topLevel": true,
174342
174385
  "touchedBy": [
174343
- "fastfood#call2"
174386
+ "fastfood#call2",
174387
+ "instance0#fastfood#call2"
174344
174388
  ]
174345
174389
  }
174346
174390
  ],
@@ -179413,7 +179457,8 @@
179413
179457
  "level": 1,
179414
179458
  "topLevel": true,
179415
179459
  "touchedBy": [
179416
- "fastfood#call2"
179460
+ "fastfood#call2",
179461
+ "instance0#fastfood#call2"
179417
179462
  ]
179418
179463
  }
179419
179464
  ],
@@ -184490,7 +184535,8 @@
184490
184535
  "level": 1,
184491
184536
  "topLevel": true,
184492
184537
  "touchedBy": [
184493
- "fastfood#call2"
184538
+ "fastfood#call2",
184539
+ "instance0#fastfood#call2"
184494
184540
  ]
184495
184541
  }
184496
184542
  ],
@@ -189741,7 +189787,8 @@
189741
189787
  "level": 1,
189742
189788
  "topLevel": true,
189743
189789
  "touchedBy": [
189744
- "fastfood#call2"
189790
+ "fastfood#call2",
189791
+ "instance0#fastfood#call2"
189745
189792
  ]
189746
189793
  }
189747
189794
  ],
@@ -195022,7 +195069,8 @@
195022
195069
  "level": 1,
195023
195070
  "topLevel": true,
195024
195071
  "touchedBy": [
195025
- "fastfood#call2"
195072
+ "fastfood#call2",
195073
+ "instance0#fastfood#call2"
195026
195074
  ]
195027
195075
  }
195028
195076
  ],
@@ -200387,7 +200435,8 @@
200387
200435
  "level": 1,
200388
200436
  "topLevel": true,
200389
200437
  "touchedBy": [
200390
- "fastfood#call2"
200438
+ "fastfood#call2",
200439
+ "instance0#fastfood#call2"
200391
200440
  ]
200392
200441
  }
200393
200442
  ],
@@ -205803,7 +205852,8 @@
205803
205852
  "level": 1,
205804
205853
  "topLevel": true,
205805
205854
  "touchedBy": [
205806
- "fastfood#call2"
205855
+ "fastfood#call2",
205856
+ "instance0#fastfood#call2"
205807
205857
  ]
205808
205858
  }
205809
205859
  ],
@@ -211314,7 +211364,8 @@
211314
211364
  "level": 1,
211315
211365
  "topLevel": true,
211316
211366
  "touchedBy": [
211317
- "fastfood#call2"
211367
+ "fastfood#call2",
211368
+ "instance0#fastfood#call2"
211318
211369
  ]
211319
211370
  }
211320
211371
  ],
@@ -216807,7 +216858,8 @@
216807
216858
  "level": 1,
216808
216859
  "topLevel": true,
216809
216860
  "touchedBy": [
216810
- "fastfood#call2"
216861
+ "fastfood#call2",
216862
+ "instance0#fastfood#call2"
216811
216863
  ]
216812
216864
  }
216813
216865
  ],
@@ -222416,7 +222468,8 @@
222416
222468
  "level": 1,
222417
222469
  "topLevel": true,
222418
222470
  "touchedBy": [
222419
- "fastfood#call2"
222471
+ "fastfood#call2",
222472
+ "instance0#fastfood#call2"
222420
222473
  ]
222421
222474
  }
222422
222475
  ],
@@ -228108,7 +228161,8 @@
228108
228161
  "level": 1,
228109
228162
  "topLevel": true,
228110
228163
  "touchedBy": [
228111
- "fastfood#call2"
228164
+ "fastfood#call2",
228165
+ "instance0#fastfood#call2"
228112
228166
  ]
228113
228167
  }
228114
228168
  ],
@@ -233830,7 +233884,8 @@
233830
233884
  "level": 1,
233831
233885
  "topLevel": true,
233832
233886
  "touchedBy": [
233833
- "fastfood#call2"
233887
+ "fastfood#call2",
233888
+ "instance0#fastfood#call2"
233834
233889
  ]
233835
233890
  }
233836
233891
  ],
@@ -239633,7 +239688,8 @@
239633
239688
  "level": 1,
239634
239689
  "topLevel": true,
239635
239690
  "touchedBy": [
239636
- "fastfood#call2"
239691
+ "fastfood#call2",
239692
+ "instance0#fastfood#call2"
239637
239693
  ]
239638
239694
  }
239639
239695
  ],
@@ -245496,7 +245552,8 @@
245496
245552
  "level": 1,
245497
245553
  "topLevel": true,
245498
245554
  "touchedBy": [
245499
- "fastfood#call2"
245555
+ "fastfood#call2",
245556
+ "instance0#fastfood#call2"
245500
245557
  ]
245501
245558
  }
245502
245559
  ],
@@ -251580,7 +251637,8 @@
251580
251637
  "level": 2,
251581
251638
  "topLevel": true,
251582
251639
  "touchedBy": [
251583
- "fastfood#call2"
251640
+ "fastfood#call2",
251641
+ "instance0#fastfood#call2"
251584
251642
  ]
251585
251643
  }
251586
251644
  ],
@@ -257593,7 +257651,8 @@
257593
257651
  "level": 1,
257594
257652
  "topLevel": true,
257595
257653
  "touchedBy": [
257596
- "fastfood#call2"
257654
+ "fastfood#call2",
257655
+ "instance0#fastfood#call2"
257597
257656
  ]
257598
257657
  }
257599
257658
  ],
@@ -265985,7 +266044,8 @@
265985
266044
  "level": 2,
265986
266045
  "topLevel": true,
265987
266046
  "touchedBy": [
265988
- "fastfood#call2"
266047
+ "fastfood#call2",
266048
+ "instance0#fastfood#call2"
265989
266049
  ]
265990
266050
  }
265991
266051
  ],
@@ -273913,7 +273973,8 @@
273913
273973
  "level": 2,
273914
273974
  "topLevel": true,
273915
273975
  "touchedBy": [
273916
- "fastfood#call2"
273976
+ "fastfood#call2",
273977
+ "instance0#fastfood#call2"
273917
273978
  ]
273918
273979
  }
273919
273980
  ],
@@ -280456,7 +280517,8 @@
280456
280517
  "level": 1,
280457
280518
  "topLevel": true,
280458
280519
  "touchedBy": [
280459
- "fastfood#call2"
280520
+ "fastfood#call2",
280521
+ "instance0#fastfood#call2"
280460
280522
  ]
280461
280523
  }
280462
280524
  ],
@@ -286643,7 +286705,8 @@
286643
286705
  "level": 1,
286644
286706
  "topLevel": true,
286645
286707
  "touchedBy": [
286646
- "fastfood#call2"
286708
+ "fastfood#call2",
286709
+ "instance0#fastfood#call2"
286647
286710
  ]
286648
286711
  }
286649
286712
  ],
@@ -292938,7 +293001,8 @@
292938
293001
  "level": 1,
292939
293002
  "topLevel": true,
292940
293003
  "touchedBy": [
292941
- "fastfood#call2"
293004
+ "fastfood#call2",
293005
+ "instance0#fastfood#call2"
292942
293006
  ]
292943
293007
  }
292944
293008
  ],
@@ -300355,7 +300419,8 @@
300355
300419
  "level": 2,
300356
300420
  "topLevel": true,
300357
300421
  "touchedBy": [
300358
- "fastfood#call2"
300422
+ "fastfood#call2",
300423
+ "instance0#fastfood#call2"
300359
300424
  ]
300360
300425
  }
300361
300426
  ],
@@ -307210,7 +307275,8 @@
307210
307275
  "level": 1,
307211
307276
  "topLevel": true,
307212
307277
  "touchedBy": [
307213
- "fastfood#call2"
307278
+ "fastfood#call2",
307279
+ "instance0#fastfood#call2"
307214
307280
  ]
307215
307281
  }
307216
307282
  ],
@@ -313867,7 +313933,8 @@
313867
313933
  "level": 1,
313868
313934
  "topLevel": true,
313869
313935
  "touchedBy": [
313870
- "fastfood#call2"
313936
+ "fastfood#call2",
313937
+ "instance0#fastfood#call2"
313871
313938
  ]
313872
313939
  }
313873
313940
  ],
@@ -320522,7 +320589,8 @@
320522
320589
  "level": 1,
320523
320590
  "topLevel": true,
320524
320591
  "touchedBy": [
320525
- "fastfood#call2"
320592
+ "fastfood#call2",
320593
+ "instance0#fastfood#call2"
320526
320594
  ]
320527
320595
  }
320528
320596
  ],
@@ -327245,7 +327313,8 @@
327245
327313
  "level": 1,
327246
327314
  "topLevel": true,
327247
327315
  "touchedBy": [
327248
- "fastfood#call2"
327316
+ "fastfood#call2",
327317
+ "instance0#fastfood#call2"
327249
327318
  ]
327250
327319
  }
327251
327320
  ],
@@ -334040,7 +334109,8 @@
334040
334109
  "level": 1,
334041
334110
  "topLevel": true,
334042
334111
  "touchedBy": [
334043
- "fastfood#call2"
334112
+ "fastfood#call2",
334113
+ "instance0#fastfood#call2"
334044
334114
  ]
334045
334115
  }
334046
334116
  ],
@@ -340906,7 +340976,8 @@
340906
340976
  "level": 1,
340907
340977
  "topLevel": true,
340908
340978
  "touchedBy": [
340909
- "fastfood#call2"
340979
+ "fastfood#call2",
340980
+ "instance0#fastfood#call2"
340910
340981
  ]
340911
340982
  }
340912
340983
  ],
@@ -347841,7 +347912,8 @@
347841
347912
  "level": 1,
347842
347913
  "topLevel": true,
347843
347914
  "touchedBy": [
347844
- "fastfood#call2"
347915
+ "fastfood#call2",
347916
+ "instance0#fastfood#call2"
347845
347917
  ]
347846
347918
  }
347847
347919
  ],
@@ -354794,7 +354866,8 @@
354794
354866
  "level": 1,
354795
354867
  "topLevel": true,
354796
354868
  "touchedBy": [
354797
- "fastfood#call2"
354869
+ "fastfood#call2",
354870
+ "instance0#fastfood#call2"
354798
354871
  ]
354799
354872
  }
354800
354873
  ],
@@ -361912,7 +361985,8 @@
361912
361985
  "level": 2,
361913
361986
  "topLevel": true,
361914
361987
  "touchedBy": [
361915
- "fastfood#call2"
361988
+ "fastfood#call2",
361989
+ "instance0#fastfood#call2"
361916
361990
  ]
361917
361991
  }
361918
361992
  ],
@@ -376640,7 +376714,8 @@
376640
376714
  "level": 1,
376641
376715
  "topLevel": true,
376642
376716
  "touchedBy": [
376643
- "fastfood#call2"
376717
+ "fastfood#call2",
376718
+ "instance0#fastfood#call2"
376644
376719
  ]
376645
376720
  }
376646
376721
  ],
@@ -383959,7 +384034,8 @@
383959
384034
  "level": 1,
383960
384035
  "topLevel": true,
383961
384036
  "touchedBy": [
383962
- "fastfood#call2"
384037
+ "fastfood#call2",
384038
+ "instance0#fastfood#call2"
383963
384039
  ]
383964
384040
  }
383965
384041
  ],
@@ -391322,7 +391398,8 @@
391322
391398
  "level": 1,
391323
391399
  "topLevel": true,
391324
391400
  "touchedBy": [
391325
- "fastfood#call2"
391401
+ "fastfood#call2",
391402
+ "instance0#fastfood#call2"
391326
391403
  ]
391327
391404
  }
391328
391405
  ],
@@ -398635,7 +398712,8 @@
398635
398712
  "level": 1,
398636
398713
  "topLevel": true,
398637
398714
  "touchedBy": [
398638
- "fastfood#call2"
398715
+ "fastfood#call2",
398716
+ "instance0#fastfood#call2"
398639
398717
  ]
398640
398718
  }
398641
398719
  ],
@@ -405946,7 +406024,8 @@
405946
406024
  "level": 1,
405947
406025
  "topLevel": true,
405948
406026
  "touchedBy": [
405949
- "fastfood#call2"
406027
+ "fastfood#call2",
406028
+ "instance0#fastfood#call2"
405950
406029
  ]
405951
406030
  }
405952
406031
  ],
@@ -413329,7 +413408,8 @@
413329
413408
  "level": 1,
413330
413409
  "topLevel": true,
413331
413410
  "touchedBy": [
413332
- "fastfood#call2"
413411
+ "fastfood#call2",
413412
+ "instance0#fastfood#call2"
413333
413413
  ]
413334
413414
  }
413335
413415
  ],
@@ -420901,7 +420981,8 @@
420901
420981
  "level": 2,
420902
420982
  "topLevel": true,
420903
420983
  "touchedBy": [
420904
- "fastfood#call2"
420984
+ "fastfood#call2",
420985
+ "instance0#fastfood#call2"
420905
420986
  ]
420906
420987
  }
420907
420988
  ],
@@ -428403,7 +428484,8 @@
428403
428484
  "level": 1,
428404
428485
  "topLevel": true,
428405
428486
  "touchedBy": [
428406
- "fastfood#call2"
428487
+ "fastfood#call2",
428488
+ "instance0#fastfood#call2"
428407
428489
  ]
428408
428490
  }
428409
428491
  ],
@@ -436016,7 +436098,8 @@
436016
436098
  "level": 1,
436017
436099
  "topLevel": true,
436018
436100
  "touchedBy": [
436019
- "fastfood#call2"
436101
+ "fastfood#call2",
436102
+ "instance0#fastfood#call2"
436020
436103
  ]
436021
436104
  }
436022
436105
  ],
@@ -444209,7 +444292,8 @@
444209
444292
  "level": 2,
444210
444293
  "topLevel": true,
444211
444294
  "touchedBy": [
444212
- "fastfood#call2"
444295
+ "fastfood#call2",
444296
+ "instance0#fastfood#call2"
444213
444297
  ]
444214
444298
  }
444215
444299
  ],
@@ -452880,7 +452964,8 @@
452880
452964
  "level": 1,
452881
452965
  "topLevel": true,
452882
452966
  "touchedBy": [
452883
- "fastfood#call2"
452967
+ "fastfood#call2",
452968
+ "instance0#fastfood#call2"
452884
452969
  ]
452885
452970
  }
452886
452971
  ],
@@ -461785,7 +461870,8 @@
461785
461870
  "level": 2,
461786
461871
  "topLevel": true,
461787
461872
  "touchedBy": [
461788
- "fastfood#call2"
461873
+ "fastfood#call2",
461874
+ "instance0#fastfood#call2"
461789
461875
  ]
461790
461876
  }
461791
461877
  ],
@@ -470226,7 +470312,8 @@
470226
470312
  "level": 2,
470227
470313
  "topLevel": true,
470228
470314
  "touchedBy": [
470229
- "fastfood#call2"
470315
+ "fastfood#call2",
470316
+ "instance0#fastfood#call2"
470230
470317
  ]
470231
470318
  }
470232
470319
  ],
@@ -470426,7 +470513,7 @@
470426
470513
  ]
470427
470514
  },
470428
470515
  {
470429
- "apply": "({ask, api}) => {\n // see if followup for drink is needed\n\n const hasDrink = (isA, item) => {\n let hasDrink = false\n for (let modification of (item.modifications || [])) {\n if (isA(modification.id, 'drink')) {\n hasDrink = true\n break\n }\n }\n return hasDrink\n }\n\n const needsDrink = (item) => {\n return item.needsDrink\n }\n\n const askAbout = ({api, isA}) => {\n const items = []\n for (const item of api.items()) {\n if (needsDrink(item) && !hasDrink(isA, item)) {\n items.push(item)\n }\n }\n return items\n }\n\n ask([\n {\n where: where(),\n oneShot: false,\n onNevermind: ({verbatim, ...args}) => {\n // this is cross km boundaries from the dialogues km to this one so the api if for dialogs. \n // i need to get the one for fastfood here.\n const api = args.kms.fastfood.api\n const needsDrink = askAbout({ args, api })\n if (needsDrink.length > 1) {\n verbatim(\"The drinks must be specified\")\n } else {\n verbatim(\"The drink must be specified\")\n }\n return false\n },\n matchq: (args) => askAbout(args).length > 0 && args.context.marker == 'controlEnd',\n applyq: (args) => {\n args.context.cascade = true\n const needsDrink = askAbout(args)\n // const details = args.gp({ marker: 'list', value: needsDrink.map((item) => item.food)})\n if (needsDrink.length > 1) {\n return `What drinks do you want?`\n } else {\n return `What drink do you want?`\n }\n },\n matchr: (args) => {\n if (args.isA(args.context.marker, 'drink') && askAbout(args).length > 0) {\n const needsDrink = askAbout(args)\n if (args.api.isAvailableModification(needsDrink[0].food, { ...args.context , id: args.context.value })) {\n return true\n }\n }\n return false\n },\n applyr: (args) => {\n // TODO check for is available for all modifications\n const needsDrink = askAbout(args)\n const { api, context } = args\n if (isMany(context)) {\n let count = getCount(context) || Number.MAX_SAFE_INTEGER\n for (let item of needsDrink) {\n if (count < 1) {\n break\n }\n count -= 1\n api.addDrink(item.item_id, { id: context.value }) \n }\n } else {\n const item_id = needsDrink[0].item_id\n api.addDrink(item_id, { id: context.value }) \n }\n }\n },\n ])\n }"
470516
+ "apply": "({ask, api}) => {\n // see if followup for drink is needed\n\n const hasDrink = (isA, item) => {\n let hasDrink = false\n for (let modification of (item.modifications || [])) {\n if (isA(modification.id, 'drink')) {\n hasDrink = true\n break\n }\n }\n return hasDrink\n }\n\n const needsDrink = (item) => {\n return item.needsDrink\n }\n\n const askAbout = ({api, isA}) => {\n const items = []\n for (const item of api.items()) {\n if (needsDrink(item) && !hasDrink(isA, item)) {\n items.push(item)\n }\n }\n return items\n }\n\n ask([\n {\n where: where(),\n oneShot: false,\n onNevermind: ({verbatim, ...args}) => {\n // this is cross km boundaries from the dialogues km to this one so the api if for dialogs. \n // i need to get the one for fastfood here.\n const api = args.kms.fastfood.api\n const needsDrink = askAbout({ args, api })\n for (const item of needsDrink) {\n api.remove(item)\n }\n },\n matchq: (args) => askAbout(args).length > 0 && args.context.marker == 'controlEnd',\n applyq: (args) => {\n args.context.cascade = true\n const needsDrink = askAbout(args)\n // const details = args.gp({ marker: 'list', value: needsDrink.map((item) => item.food)})\n if (needsDrink.length > 1) {\n return `What drinks do you want?`\n } else {\n return `What drink do you want?`\n }\n },\n matchr: (args) => {\n if (args.isA(args.context.marker, 'drink') && askAbout(args).length > 0) {\n const needsDrink = askAbout(args)\n if (args.api.isAvailableModification(needsDrink[0].food, { ...args.context , id: args.context.value })) {\n return true\n }\n }\n return false\n },\n applyr: (args) => {\n // TODO check for is available for all modifications\n const needsDrink = askAbout(args)\n const { api, context } = args\n if (isMany(context)) {\n let count = getCount(context) || Number.MAX_SAFE_INTEGER\n for (let item of needsDrink) {\n if (count < 1) {\n break\n }\n count -= 1\n api.addDrink(item.item_id, { id: context.value }) \n }\n } else {\n const item_id = needsDrink[0].item_id\n api.addDrink(item_id, { id: context.value }) \n }\n }\n },\n ])\n }"
470430
470517
  },
470431
470518
  {
470432
470519
  "extraConfig": true,