From e38fd7c11184de8e9533dc555852c9f6366d7039 Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Fri, 31 Jan 2025 17:11:20 +0800 Subject: [PATCH] force prototype-stacked methods on supertypes --- postinit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postinit.js b/postinit.js index 1c9ac14..1b5af72 100644 --- a/postinit.js +++ b/postinit.js @@ -396,7 +396,7 @@ globalThis.modapi_postinit = "(" + (() => { //Prototype Injection, allows for far easier access to methods if (typeof item === "function" && ModAPI.hooks._rippedMethodTypeMap[method] === "instance") { - item.prototype["$" + method.replace(compiledName + "_", "")] ||= function (...args) { + item.prototype["$" + method.replace(compiledName + "_", "")] = function (...args) { return ModAPI.hooks.methods[method].apply(this, [this, ...args]); } }