EaglerForgeInjector/patches.js
2024-10-02 14:49:17 +08:00

19 lines
476 B
JavaScript

class PatchesRegistry {
static patchFns = []
static patchedEventNames = []
static getEventInjectorCode() {
return "globalThis.modapi_specialevents = [" + PatchesRegistry.patchedEventNames.flatMap(x=>`\`${x}\``).join(",") + "]"
}
static addPatch(fn) {
patchFns.push(fn);
}
static addSpecialEvent(x) {
PatchesRegistry.patchedEventNames.push(x);
}
}
function addPatch() {
}
function addSpecialEvent(eventName) {
}