diff --git a/Si_Logging/Si_Logging.cs b/Si_Logging/Si_Logging.cs index 95491d5..a5e08db 100644 --- a/Si_Logging/Si_Logging.cs +++ b/Si_Logging/Si_Logging.cs @@ -44,7 +44,7 @@ You should have received a copy of the GNU General Public License using System.Text; using System.Runtime.CompilerServices; -[assembly: MelonInfo(typeof(HL_Logging), "Half-Life Logger", "1.4.13", "databomb&zawedcvg", "https://github.com/data-bomb/Silica")] +[assembly: MelonInfo(typeof(HL_Logging), "Half-Life Logger", "1.4.14", "databomb&zawedcvg", "https://github.com/data-bomb/Silica")] [assembly: MelonGame("Bohemia Interactive", "Silica")] [assembly: MelonOptionalDependencies("Admin Mod")] @@ -950,10 +950,15 @@ public static void Prefix(MusicJukeboxHandler __instance, GameMode __0) { try { - MP_Strategy strategyInstance = GameObject.FindObjectOfType(); - MP_Strategy.ETeamsVersus versusMode = strategyInstance.TeamsVersus; + string RoundStartLogLine = "World triggered \"Round_Start\" (gamemode \"" + GameMode.CurrentGameMode.ToString().Split(' ')[0] + "\")"; - string RoundStartLogLine = "World triggered \"Round_Start\" (gametype \"" + versusMode.ToString() + "\")"; + if (GameMode.CurrentGameMode is MP_Strategy) + { + MP_Strategy strategyInstance = GameObject.FindObjectOfType(); + MP_Strategy.ETeamsVersus versusMode = strategyInstance.TeamsVersus; + RoundStartLogLine += " (gametype \"" + versusMode.ToString() + "\")"; + } + PrintLogLine(RoundStartLogLine); initializeRound(ref currTiers);