From 0321c07978ca0eb2a2dcdfd8c10fbf19e8bbd1c1 Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Wed, 2 Oct 2024 14:51:44 +0800 Subject: [PATCH] push --- patches.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/patches.js b/patches.js index 7d59a59..bff6ed7 100644 --- a/patches.js +++ b/patches.js @@ -5,15 +5,14 @@ class PatchesRegistry { return "globalThis.modapi_specialevents = [" + PatchesRegistry.patchedEventNames.flatMap(x=>`\`${x}\``).join(",") + "]" } static addPatch(fn) { - patchFns.push(fn); + PatchesRegistry.patchFns.push(fn); } - static addSpecialEvent(x) { + static regSpecialEvent(x) { PatchesRegistry.patchedEventNames.push(x); } } -function addPatch() { - -} -function addSpecialEvent(eventName) { - -} \ No newline at end of file +// PatchesRegistry.regSpecialEvent("test"); +// PatchesRegistry.addPatch(function (input) { +// var output = input; +// return output; +// }) \ No newline at end of file