feat: genContent may throw the step-like info.
This commit is contained in:
parent
a41ccbdc1a
commit
933a91f9d0
16
game/game.js
16
game/game.js
|
@ -11595,12 +11595,16 @@
|
||||||
result:result
|
result:result
|
||||||
});
|
});
|
||||||
var res=gen.next((lastEvent&&("result" in lastEvent))?lastEvent.result:null);
|
var res=gen.next((lastEvent&&("result" in lastEvent))?lastEvent.result:null);
|
||||||
if(res.done) event.finish();
|
if(res.done) return event.finish();
|
||||||
else {
|
var currentResult=res.value;
|
||||||
var currentResult=res.value;
|
// TODO: use `event.debugger` to replace source
|
||||||
// TODO: use `event.debugger` to replace source
|
if(typeof currentResult=="function") yield currentResult;
|
||||||
if(typeof currentResult=="function") yield currentResult;
|
else{
|
||||||
else lastEvent=currentResult;
|
if(Array.isArray(currentResult)){
|
||||||
|
event.step=currentResult[1];
|
||||||
|
currentResult=currentResult[0];
|
||||||
|
}
|
||||||
|
lastEvent=currentResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if(item._parsed) return item;
|
}else if(item._parsed) return item;
|
||||||
|
|
Loading…
Reference in New Issue