add efi version to title

This commit is contained in:
ZXMushroom63 2024-12-05 13:18:57 +08:00
parent dbba6ca4b9
commit 01fa9fee08
2 changed files with 4 additions and 2 deletions

View File

@ -317,6 +317,7 @@ var main;(function(){`
\<script id="modapi_postinit_data"\>globalThis.modapi_postinit = \`${globalThis.modapi_postinit}\`;\<\/script\>
\<script id="libserverside"\>{"._|_libserverside_|_."}\<\/script\>`
);
patchedFile = patchedFile.replace(`<title>EaglercraftX 1.8</title>`, `<title>EFI ${globalThis.ModAPIVersion}</title>`);
patchedFile = patchedFile.replaceAll(/main\(\);\s*?}/gm, (match) => {
return match.replace("main();", "main();ModAPI.hooks._postInit();");
});

View File

@ -1,3 +1,4 @@
globalThis.ModAPIVersion = "v2.3.2";
globalThis.modapi_postinit = "(" + (() => {
//EaglerForge post initialization code.
//This script cannot contain backticks, escape characters, or backslashes in order to inject into the dedicated server code.
@ -22,7 +23,7 @@ globalThis.modapi_postinit = "(" + (() => {
ModAPI.meta._versionMap = {};
ModAPI.array = {};
ModAPI.version = "v2.3.1";
ModAPI.version = "__modapi_version_code__";
ModAPI.flavour = "injector";
ModAPI.GNU = "terry pratchett";
ModAPI.credits = ["ZXMushroom63", "radmanplays", "Murturtle", "OtterCodes101", "TheIdiotPlays", "OeildeLynx31", "Stpv22"];
@ -989,4 +990,4 @@ globalThis.modapi_postinit = "(" + (() => {
var values = [...ModAPI.reflect.getClassById("net.minecraft.block.Block").staticVariables.blockRegistry.$modapi_specmap.values()];
return qhash(block, values);
}
}).toString() + ")();";
}).toString().replace("__modapi_version_code__", ModAPIVersion) + ")();";