Update landing script to improve debug capabilities

Added comment about server regex customization and clarified the login parameter's role in the dlAsync function, simplifying testing and validation without game launch.
This commit is contained in:
Sandro642 2024-10-26 17:45:03 +02:00
parent 8744d3b8c5
commit 0893cf5a5e

View File

@ -472,6 +472,7 @@ let proc
// Is DiscordRPC enabled
let hasRPC = false
// Joined server regex
// Change this if your server uses something different.
const GAME_JOINED_REGEX = /\[.+\]: Sound engine started/
const GAME_LAUNCH_REGEX = /^\[.+\]: (?:MinecraftForge .+ Initialized|ModLauncher .+ starting: .+|Loading Minecraft .+ with Fabric Loader .+)$/
const MIN_LINGER = 5000
@ -481,6 +482,10 @@ const EXCLUDED_MODS = [
]
async function dlAsync(login = true) {
// Login parameter is temporary for debug purposes. Allows testing the validation/downloads without
// launching the game.
const loggerLaunchSuite = LoggerUtil.getLogger('LaunchSuite')
const loggerLanding = LoggerUtil.getLogger('Landing')
setLaunchDetails(Lang.queryJS('landing.dlAsync.loadingServerInfo'))