Skip to content

Commit

Permalink
Merge pull request #151 from BUTR/dev
Browse files Browse the repository at this point in the history
v2.1.2
  • Loading branch information
Aragas authored Apr 3, 2022
2 parents 384a7c8 + 4c3fc83 commit 0fb1575
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ updates:
- dependency-name: "Bannerlord.ReferenceAssemblies.*"
- dependency-name: "Lib.Harmony"
- dependency-name: "Microsoft.Extensions.*"
- dependency-name: "System.Reflection.Metadata"

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
shell: pwsh

- name: ReportGenerator
uses: danielpalme/[email protected].2
uses: danielpalme/[email protected].3
with:
reports: '*.xml'
targetdir: 'coveragereport'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
shell: pwsh

- name: ReportGenerator
uses: danielpalme/[email protected].2
uses: danielpalme/[email protected].3
with:
reports: 'coverage_butterlib_stable_debug.xml;coverage_butterlib_stable_release.xml;coverage_butterlib_impl_stable_debug.xml;coverage_butterlib_impl_stable_release.xml;coverage_butterlib_impl_beta_debug.xml;coverage_butterlib_impl_beta_release.xml;'
targetdir: 'coveragereport'
Expand Down
6 changes: 3 additions & 3 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<!--Development Variables-->
<PropertyGroup>
<!--Module Version-->
<Version>2.1.1</Version>
<Version>2.1.2</Version>
<!--Harmony Version-->
<HarmonyVersion>2.2.1</HarmonyVersion>
<!--Microsoft Extension Libraries Version-->
<!--Serilog depends on abstraction 2.0.0, and since we can't do app redirects, we're stuck with that-->
<ExtensionVersion>2.0.0</ExtensionVersion>
<!--BuildResources Version-->
<BuildResourcesVersion>1.0.1.68</BuildResourcesVersion>
<BUTRSharedVersion>2.0.0.78</BUTRSharedVersion>
<BUTRSharedVersion>2.0.0.82</BUTRSharedVersion>
<BUTRModuleManagerVersion>3.0.94</BUTRModuleManagerVersion>
<HarmonyExtensionsVersion>2.0.0.54</HarmonyExtensionsVersion>
<HarmonyExtensionsVersion>2.0.0.55</HarmonyExtensionsVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------------------------------
Version: 2.1.2
Game Versions: e1.7.2
* Fixed trace listener
---------------------------------------------------------------------------------------------------
Version: 2.1.1
Game Versions: e1.7.2
* Fixed unintended crashes when running on pre e1.7.2
Expand Down
2 changes: 1 addition & 1 deletion src/Bannerlord.ButterLib/ButterLibSubModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private static void CheckGameVersion()
if (ApplicationVersionHelper.GameVersion() is { } gameVersion && gameVersion < e172)
{
var sb = new StringBuilder();
sb.AppendLine(new TextObject(SMessageWrongGameVersion, new() { {"GAMEVERSION", ApplicationVersionHelper.ToString(gameVersion)} }).ToString());
sb.AppendLine(new TextObject(SMessageWrongGameVersion, new() { { "GAMEVERSION", ApplicationVersionHelper.ToString(gameVersion) } }).ToString());
sb.AppendLine();
sb.AppendLine(new TextObject(SMessageContinue).ToString());
switch (MessageBox.Show(sb.ToString(), new TextObject(SWarningTitle).ToString(), MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, (MessageBoxOptions) 0x40000))
Expand Down
10 changes: 4 additions & 6 deletions src/Bannerlord.ButterLib/Logger/LoggerTraceListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ private record ParseResult

private static ParseResult? Parse(ReadOnlySpan<char> str)
{
var logLevelIdx = str.IndexOf(':');
if (str.IndexOf(':') is var logLevelIdx && logLevelIdx == -1)
return null;

var sourceLogLevel = str.Slice(0, logLevelIdx);
var eventIdMessage = str.Slice(logLevelIdx + 1);

if (sourceLogLevel.LastIndexOf(' ') is { } sourceIdx && sourceIdx == -1)
if (sourceLogLevel.LastIndexOf(' ') is var sourceIdx && sourceIdx == -1)
return null;
var process = sourceLogLevel.Slice(0, sourceIdx);
var logLevelStr = sourceLogLevel.Slice(sourceIdx + 1);
Expand All @@ -35,10 +36,7 @@ private record ParseResult

return new ParseResult
{
Process = process.ToString(),
Level = logLevel,
EventId = eventId,
Message = message.ToString()
Process = process.ToString(), Level = logLevel, EventId = eventId, Message = message.ToString()
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="3.13.2" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="3.13.2" />
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />

Expand Down

0 comments on commit 0fb1575

Please sign in to comment.