!include #1003413 // LooseBot v5 static OccTree2 botTree; static O makeBot = func { new LooseBot(botTree, null).debugOn() }; svoid expandDialogs(L dialogs) { for (Dialog d : dialogs) for (int i = 0; i < l(d.poem); i++) { E e = d.poem.get(i); if (!e.state()) continue; int idx = e.text().indexOf("=>"); if (idx < 0) continue; d.poem.set(i, E.state("get " + e.text().substring(0, idx).trim())); d.poem.add(i+1, E.state("result is " + e.text().substring(idx+2).trim())); } }