force prototype-stacked methods on supertypes

This commit is contained in:
ZXMushroom63 2025-01-31 17:11:20 +08:00
parent 26eb25ed04
commit e38fd7c111

View File

@ -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]);
}
}