diff --git a/TLM/TLM/Patcher.cs b/TLM/TLM/Patcher.cs index 2b23d9514..1445ac2d4 100644 --- a/TLM/TLM/Patcher.cs +++ b/TLM/TLM/Patcher.cs @@ -38,9 +38,9 @@ public void Install() { Log.Info($"Harmony attribute-driven patching successfull!"); } catch (Exception e) { - Log.Error("Could not deploy Harmony patches"); - Log.Info(e.Message); - Log.Info(e.StackTrace); + Log.Error("Could not apply Harmony patches because the following exception occured:\n " + + e + + "\n -- End of inner exception stack trace -- "); fail = true; } @@ -49,9 +49,9 @@ public void Install() { AssemblyRedirector.Deploy(); } catch (Exception e) { - Log.Error("Could not deploy attribute-driven detours"); - Log.Info(e.ToString()); - Log.Info(e.StackTrace); + Log.Error("Could not deploy attribute-driven detours because the following exception occured:\n " + + e + + "\n -- End of inner exception stack trace -- "); fail = true; } diff --git a/TLM/TLM/TrafficManagerMod.cs b/TLM/TLM/TrafficManagerMod.cs index d959d9883..09bf9df7b 100644 --- a/TLM/TLM/TrafficManagerMod.cs +++ b/TLM/TLM/TrafficManagerMod.cs @@ -94,6 +94,12 @@ public void OnEnabled() { InGameHotReload = InGame(); HarmonyHelper.EnsureHarmonyInstalled(); + +#if DEBUG + const bool installHarmonyASAP = false; // set true for fast testing + if (installHarmonyASAP) + HarmonyHelper.DoOnHarmonyReady(delegate () { Patcher.Create().Install(); }); +#endif } [UsedImplicitly]