mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-25 07:01:20 -09:00
fix registered patch events
This commit is contained in:
parent
1f45523ef7
commit
af31792012
@ -280,7 +280,7 @@ var main;(function(){`
|
|||||||
patchedFile = patchedFile.replace(
|
patchedFile = patchedFile.replace(
|
||||||
` id="game_frame">`,
|
` id="game_frame">`,
|
||||||
` id="game_frame">
|
` id="game_frame">
|
||||||
\<script id="modapi_patchesreg_events"\>${PatchesRegistry.getEventInjectorCode()}\`;\<\/script\>
|
\<script id="modapi_patchesreg_events"\>${PatchesRegistry.getEventInjectorCode()};\<\/script\>
|
||||||
\<script id="modapi_postinit"\>${globalThis.modapi_postinit}\<\/script\>
|
\<script id="modapi_postinit"\>${globalThis.modapi_postinit}\<\/script\>
|
||||||
\<script id="modapi_postinitasync"\>${globalThis.modapi_postinitasync}\<\/script\>
|
\<script id="modapi_postinitasync"\>${globalThis.modapi_postinitasync}\<\/script\>
|
||||||
\<script id="modapi_modloader"\>${globalThis.modapi_modloader}\<\/script\>
|
\<script id="modapi_modloader"\>${globalThis.modapi_modloader}\<\/script\>
|
||||||
|
@ -2,7 +2,7 @@ class PatchesRegistry {
|
|||||||
static patchFns = []
|
static patchFns = []
|
||||||
static patchedEventNames = []
|
static patchedEventNames = []
|
||||||
static getEventInjectorCode() {
|
static getEventInjectorCode() {
|
||||||
return "globalThis.modapi_specialevents = [" + PatchesRegistry.patchedEventNames.flatMap(x=>`\`${x}\``).join(",") + "]"
|
return "globalThis.modapi_specialevents = [" + PatchesRegistry.patchedEventNames.flatMap(x=>`\`${x}\``).join(",") + "];";
|
||||||
}
|
}
|
||||||
static patchFile(x) {
|
static patchFile(x) {
|
||||||
var current = x;
|
var current = x;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user