new(all): New transfer keyword.
This commit is contained in:
parent
8df054e444
commit
34fcbff749
2 changed files with 12 additions and 0 deletions
|
@ -471,6 +471,11 @@ export class DialogClass {
|
|||
return await step.beginDialog('/gbasic-email');
|
||||
}
|
||||
|
||||
public async transfer(step) {
|
||||
return await step.beginDialog('/t');
|
||||
}
|
||||
|
||||
|
||||
public async hear(step, promise, previousResolve) {
|
||||
function random(low, high) {
|
||||
return Math.random() * (high - low) + low;
|
||||
|
|
|
@ -191,6 +191,10 @@ export class GBVMService extends GBService {
|
|||
return `sys().createABotFarmUsing (${$3})`;
|
||||
});
|
||||
|
||||
code = code.replace(/(transfer)/gi, () => {
|
||||
return `transfer (step)\n`;
|
||||
});
|
||||
|
||||
code = code.replace(/(talk)(\s)(.*)/gi, ($0, $1, $2, $3) => {
|
||||
return `talk (step, ${$3})\n`;
|
||||
});
|
||||
|
@ -331,6 +335,9 @@ export class GBVMService extends GBService {
|
|||
code = code.replace(/("[^"]*"|'[^']*')|\bsendFile\b/gi, ($0, $1) => {
|
||||
return $1 === undefined ? 'this.sendFile' : $1;
|
||||
});
|
||||
code = code.replace(/("[^"]*"|'[^']*')|\btransfer\b/gi, ($0, $1) => {
|
||||
return $1 === undefined ? 'this.transfer' : $1;
|
||||
});
|
||||
|
||||
// await insertion.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue