From 5e06b3a61506c9758f5df420c8965f9137f51a43 Mon Sep 17 00:00:00 2001 From: shijian <2954700422@qq.com> Date: Fri, 15 Dec 2023 09:00:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BC=82=E6=AD=A5?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=9A=84=E4=BB=A3=E7=90=86=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/game/game.js b/game/game.js index 59fadf260..49162ca67 100644 --- a/game/game.js +++ b/game/game.js @@ -32185,8 +32185,11 @@ new Promise(resolve=>{ has(target,prop){ return Reflect.has(event,prop); }, - ownKeys(target,prop){ - return Reflect.ownKeys(event,prop); + ownKeys(target){ + return Reflect.ownKeys(event); + }, + getOwnPropertyDescriptor(target,prop){ + return Reflect.getOwnPropertyDescriptor(event,prop); }, }); } From 107602c94e29985e994dc986b64f886bbc7ac543 Mon Sep 17 00:00:00 2001 From: shijian <2954700422@qq.com> Date: Fri, 15 Dec 2023 09:03:13 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BD=8E=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=85=BC=E5=AE=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/game/game.js b/game/game.js index 49162ca67..1502a934c 100644 --- a/game/game.js +++ b/game/game.js @@ -51550,16 +51550,14 @@ new Promise(resolve=>{ writable:false } }); - if(typeof window.Proxy=='function'){ - proxyWindow=new Proxy(proxyWindow,{ - set(target,prop,newValue) { - if (!['_status','lib','game','ui','get','ai','cheat'].includes(prop)){ - Reflect.set(window, prop, newValue); - } - return Reflect.set(target,prop,newValue); + proxyWindow=new Proxy(proxyWindow,{ + set(target,prop,newValue) { + if (!['_status','lib','game','ui','get','ai','cheat'].includes(prop)){ + Reflect.set(window, prop, newValue); } - }); - } + return Reflect.set(target,prop,newValue); + } + }); //使用new Function隔绝作用域,避免在控制台可以直接访问到runCommand等变量 /** * @type { (value:string)=>any } @@ -63838,8 +63836,8 @@ new Promise(resolve=>{ } } }, - //我愚蠢的弟弟呦,这是最后一次兼容46内核兼容版了 - get:get + //不兼容你了,弟弟 + get, }; /** * @template T From 44e935a5ff5143e3a5e071d87e503a19ec616441 Mon Sep 17 00:00:00 2001 From: shijian <2954700422@qq.com> Date: Fri, 15 Dec 2023 09:12:57 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgame.promises.prompt?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/game.js b/game/game.js index 1502a934c..f8228c102 100644 --- a/game/game.js +++ b/game/game.js @@ -36238,7 +36238,7 @@ new Promise(resolve=>{ return new Promise((resolve,reject)=>{ if(alertOption!='alert'){ forced=title||false; - title=option; + title=alertOption; game.prompt(title,forced,resolve); }else{ game.prompt(alertOption,title,forced,resolve); From 8c8f8950f8ae87fcbc1da0da6ff84ee9f68740cd Mon Sep 17 00:00:00 2001 From: shijian <2954700422@qq.com> Date: Fri, 15 Dec 2023 09:25:47 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=AD=A3game.promises.prompt?= =?UTF-8?q?=E7=9A=84=E7=B1=BB=E5=9E=8B=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/game/game.js b/game/game.js index f8228c102..bcc80ba4b 100644 --- a/game/game.js +++ b/game/game.js @@ -36218,8 +36218,9 @@ new Promise(resolve=>{ * 注: 由于参数列表是随意的,在这里我准备限制一下这个函数的参数顺序 * * @type {{ - * (title: string, forced?: boolean): Promise; - * (alertOption: 'alert', title: string, forced?: boolean): Promise; + * (title: string): Promise; + * (title: string, forced: true): Promise; + * (alertOption: 'alert', title: string): Promise; * }} * * @param { string } title 设置prompt标题与input内容 @@ -36241,7 +36242,7 @@ new Promise(resolve=>{ title=alertOption; game.prompt(title,forced,resolve); }else{ - game.prompt(alertOption,title,forced,resolve); + game.prompt(title,alertOption,resolve); } }); }, @@ -36257,7 +36258,7 @@ new Promise(resolve=>{ */ alert(title){ return new Promise((resolve,reject)=>{ - game.prompt('alert',title,resolve); + game.prompt(title,'alert',resolve); }); }, // 读写函数promises化(不用考虑其对应函数是否存在)