去掉了 main 0.8.0!

This commit is contained in:
shenjack 2024-05-26 01:07:35 +08:00
parent f79420ca0c
commit e5bf3e3d40
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -21792,10 +21792,9 @@ function main(input_name) {
return P._asyncStartSync($async$iE, async_completer)
}
// logger.info("反混淆", LangData.j("HOa,^Auk1x84LRKOnLivoA,^CvRYpI$Y&JxtF7P", 33));
/**
* 主接口
* Note: 不提供 main() 的直接调用, 请使用 run_any 作为替代
*/
const runner = {
fight: (names) => {
@ -21840,6 +21839,7 @@ const runner = {
score: (names, target_round) => {
return new Promise((resolve, reject) => {
let score_datas = [];
finish_trigger.removeAllListeners('score_report');
finish_trigger.on("score_report", (run_round, score) => {
score_datas.push({ round: run_round, score: score });
// 如果数据长度等于 round说明数据已经全部返回
@ -21867,14 +21867,15 @@ const runner = {
main(names);
});
},
main: main,
run_any: (names, round) => {
return new Promise((resolve, reject) => {
let data = [];
// 三种情况都带上
finish_trigger.removeAllListeners('done_fight');
finish_trigger.on("done_fight", (data) => {
resolve(fmt_RunUpdate(data));
});
finish_trigger.removeAllListeners('win_rate');
finish_trigger.on("win_rate", (run_round, win_count) => {
data.push({ round: run_round, win_count: win_count });
if (run_round >= round) {
@ -21882,6 +21883,7 @@ const runner = {
resolve({ win_count: win_count, raw_data: data });
}
});
finish_trigger.removeAllListeners('score_report');
finish_trigger.on("score_report", (run_round, score) => {
data.push({ round: run_round, score: score });
if (run_round >= round) {