From 6a478f67d36a0c0ba3d886e98cfcba05a0b6ffed Mon Sep 17 00:00:00 2001 From: unamed <1319491857@qq.com> Date: Wed, 2 Feb 2022 02:01:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E5=86=99=E5=8F=AF=E5=8A=A0=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/core.js | 2 +- runtime.d.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/core.js b/libs/core.js index d6685e9a..9a79c9ee 100644 --- a/libs/core.js +++ b/libs/core.js @@ -520,7 +520,7 @@ core.prototype._forwardFunc = function (name, funcname) { var parameterInfo = /^\s*function\s*[\w_$]*\(([\w_,$\s]*)\)\s*\{/.exec(core[name][funcname].toString()); var parameters = (parameterInfo == null ? "" : parameterInfo[1]).replace(/\s*/g, '').replace(/,/g, ', '); // core[funcname] = new Function(parameters, "return core."+name+"."+funcname+"("+parameters+");"); - eval("core." + funcname + " = function (" + parameters + ") {\n\treturn core." + name + "." + funcname + "(" + parameters + ");\n}"); + eval("core." + funcname + " = function (" + parameters + ") {\n\treturn core." + name + "." + funcname + ".apply(core." + name + ", arguments);\n}"); } core.prototype.doFunc = function (func, _this) { diff --git a/runtime.d.ts b/runtime.d.ts index 9ff9583d..d35e63ab 100644 --- a/runtime.d.ts +++ b/runtime.d.ts @@ -2784,7 +2784,7 @@ declare class icons { getTilesetOffset(id?: string): void } -class plugins { +class plugin { } @@ -2933,9 +2933,9 @@ type core = { readonly utils: utils readonly icons: icons readonly actions: actions - readonly plugins: plugins + readonly plugin: plugin -} & control & events & loader & enemys & items & maps & ui & utils & icons & actions & plugins +} & control & events & loader & enemys & items & maps & ui & utils & icons & actions & plugin declare class main { readonly core: core