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