From 0893cf5a5ec075a790f7124a1d3324fa73ace9cd Mon Sep 17 00:00:00 2001 From: Sandro642 Date: Sat, 26 Oct 2024 17:45:03 +0200 Subject: [PATCH] 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. --- app/assets/js/scripts/landing.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index 0d00f5cf..163f24db 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -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'))