diff --git a/Si_Logging/Si_Logging.cs b/Si_Logging/Si_Logging.cs index 77a9465..ccbd58d 100644 --- a/Si_Logging/Si_Logging.cs +++ b/Si_Logging/Si_Logging.cs @@ -66,7 +66,11 @@ public class HL_Logging : MelonMod public static bool ParserExePresent() { - return System.IO.File.Exists(Pref_Log_ParserExe.Value); + return System.IO.File.Exists(GetParserPath()); + } + public static string GetParserPath() + { + return System.IO.Path.Combine(MelonEnvironment.UserDataDirectory, Pref_Log_ParserExe.Value); } public static void PrintLogLine(string LogMessage, bool suppressConsoleOutput = false) @@ -141,7 +145,7 @@ public override void OnInitializeMelon() _modCategory ??= MelonPreferences.CreateCategory("Silica"); Pref_Log_Damage ??= _modCategory.CreateEntry("Logging_LogDamage", false); Pref_Log_Kills_Include_AI_vs_Player ??= _modCategory.CreateEntry("Logging_LogKills_IncludeAIvsPlayer", true); - Pref_Log_ParserExe ??= _modCategory.CreateEntry("Logging_ParserExePath", "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Silica Dedicated Server\\UserData\\parser.exe"); + Pref_Log_ParserExe ??= _modCategory.CreateEntry("Logging_ParserExePath", "parser.exe"); Pref_Log_PerfMonitor_Interval ??= _modCategory.CreateEntry("Logging_PerfMonitor_LogInterval", 60f); Pref_Log_PerfMonitor_Enable ??= _modCategory.CreateEntry("Logging_PerfMonitor_Enable", true); Pref_Log_PlayerConsole_Enable ??= _modCategory.CreateEntry("Logging_PlayerConsole_Enable", true); @@ -840,7 +844,7 @@ public static void Postfix(MusicJukeboxHandler __instance, GameMode __0, Team __ // launch parser MelonLogger.Msg("Launching parser."); ProcessStartInfo start = new ProcessStartInfo(); - start.FileName = Path.GetFullPath(Pref_Log_ParserExe.Value); + start.FileName = Path.GetFullPath(GetParserPath()); string arguments = string.Format("\"{0}", GetLogFileDirectory()); start.Arguments = arguments; start.UseShellExecute = false;