Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
apply disableConsole state to harmony patch logging
  • Loading branch information
Tyler-IN committed Apr 8, 2022
1 parent 04eeb85 commit c4306e8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DW2Net6Win/DW2Net6Win.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.2.0</Version>
<Version>1.2.1</Version>
<Product>Distant Worlds 2 .NET 6 Loader</Product>
<Authors>Distant Worlds 2 Modification Community</Authors>
<Company>Distant Worlds 2 Modification Community</Company>
Expand Down
15 changes: 11 additions & 4 deletions DistantWorlds2.ModLoader.Patches/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Contexts;
using HarmonyLib;
using JetBrains.Annotations;
Expand All @@ -20,12 +21,18 @@ public void Run()
return;
}

PatchHarmonyLogging();
var disableConsole = Environment.GetEnvironmentVariable("DW2MC_NO_CONSOLE") == "1";

if (ModLoader.DebugMode)
if (!disableConsole)
{
Environment.SetEnvironmentVariable("HARMONY_LOG_FILE", "CONOUT$");
Harmony.DEBUG = true;
if (Environment.Version.MajorRevision < 6)
PatchHarmonyLogging();

if (ModLoader.DebugMode)
{
Environment.SetEnvironmentVariable("HARMONY_LOG_FILE", "CONOUT$");
Harmony.DEBUG = true;
}
}

try
Expand Down
2 changes: 1 addition & 1 deletion Version.proj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>

<Version>1.2.0</Version>
<Version>1.2.1</Version>
<Product>Distant Worlds 2 Mod Loader</Product>
<Authors>Distant Worlds 2 Modification Community</Authors>
<Company>Distant Worlds 2 Modification Community</Company>
Expand Down

0 comments on commit c4306e8

Please sign in to comment.