Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ee734bc33 | |||
| 5799b3ed16 | |||
| a13e8446d2 | |||
| 0665e64459 | |||
| d8ac2a7ee7 |
@@ -43,7 +43,7 @@ public class CombatZones {
|
||||
/// Returns the given combat zone difficulty as an integer, so it can be sorted.
|
||||
/// 0 = lowest difficulty, 1 = medium and so forth.
|
||||
/// </summary>
|
||||
public static int? DifficultyRank(string difficulty) {
|
||||
public static int? DifficultyRank(string? difficulty) {
|
||||
Dictionary<string, int> ranks = new() {
|
||||
{ DifficultyLow, 0 },
|
||||
{ DifficultyMedium, 1 },
|
||||
@@ -51,6 +51,10 @@ public class CombatZones {
|
||||
{ DifficultyVeryHigh, 3 }
|
||||
};
|
||||
|
||||
if (difficulty == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (ranks.TryGetValue(difficulty, out int rank)) {
|
||||
return rank;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<Version>0.3.0</Version>
|
||||
<Version>0.3.1</Version>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<UseWPF>true</UseWPF>
|
||||
|
||||
@@ -9,7 +9,7 @@ class CombatZoneFormat : LogFormatter {
|
||||
public string GenerateLog(Objective objective) {
|
||||
var logs = objective
|
||||
.EnabledOfType<CombatZone>()
|
||||
.OrderBy(x => CombatZones.DifficultyRank(x.Grade))
|
||||
.OrderBy(x => (CombatZones.DifficultyRank(x.Grade) ?? 0))
|
||||
.GroupBy(x => new { x.Type, x.Grade })
|
||||
.ToDictionary(x => x.Key, x => x.ToList())
|
||||
;
|
||||
@@ -48,7 +48,7 @@ class CombatZoneFormat : LogFormatter {
|
||||
public string GenerateSummary(Objective objective) {
|
||||
var logs = objective
|
||||
.EnabledOfType<CombatZone>()
|
||||
.OrderBy(x => CombatZones.DifficultyRank(x.Grade))
|
||||
.OrderBy(x => (CombatZones.DifficultyRank(x.Grade) ?? 0))
|
||||
.GroupBy(x => new { x.Type, x.Grade })
|
||||
.ToDictionary(x => x.Key, x => x.ToList())
|
||||
;
|
||||
@@ -72,7 +72,7 @@ class CombatZoneFormat : LogFormatter {
|
||||
}
|
||||
builder.AppendFormat("CZ: {0}x{1}{2}",
|
||||
log.Value.Count,
|
||||
log.Key.Grade.Substring(0, 1),
|
||||
grade,
|
||||
log.Key.Type.Substring(0, 1)
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -43,12 +43,13 @@ public class FailedMissionFormat : LogFormatter {
|
||||
int onFootFails = missions.Where(x => x.Mission.IsOnFoot).Count();
|
||||
int shipFails = missions.Where(x => !x.Mission.IsOnFoot).Count();
|
||||
|
||||
sb.Append("Fails: ");
|
||||
if (onFootFails > 0) {
|
||||
sb.AppendFormat("Fails: {0} Ground", onFootFails);
|
||||
sb.AppendFormat("{0} Ground", onFootFails);
|
||||
}
|
||||
|
||||
if (shipFails > 0) {
|
||||
if (sb.Length> 0) {
|
||||
if (onFootFails > 0) {
|
||||
sb.Append(", ");
|
||||
}
|
||||
sb.AppendFormat("{0} Ship", shipFails);
|
||||
|
||||
@@ -47,8 +47,8 @@ public class ThargoidFormatter : LogFormatter {
|
||||
builder.AppendFormat("{0} INT", interceptors);
|
||||
}
|
||||
if (scouts > 0) {
|
||||
if (builder.Length> 0) {
|
||||
builder.Append(", ");
|
||||
if (interceptors > 0) {
|
||||
builder.Append(" + ");
|
||||
}
|
||||
builder.AppendFormat("{0} SCT", scouts);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# EliteBGS changelog
|
||||
|
||||
## 0.3.1 on 26.02.2023
|
||||
|
||||
* Fixed: AX combat zones caused crashes with the summary.
|
||||
* Fixed: Summaries for thargoid kills didn't render probably.
|
||||
|
||||
## 0.3.0 on 26.02.2023
|
||||
|
||||
* Move to MahApps toolkit, which replaces extended toolkit.
|
||||
|
||||
@@ -20,13 +20,13 @@ command line:
|
||||
winget install Microsoft.DotNet.DesktopRuntime.7
|
||||
```
|
||||
|
||||
You can download the **latest** version **0.3.0** at CodeBerg:
|
||||
You can download the **latest** version **0.3.1** at CodeBerg:
|
||||
|
||||
* [https://codeberg.org/nola/EDBGS/releases](https://codeberg.org/nola/EDBGS/releases)
|
||||
|
||||
Or alternatively from my server:
|
||||
|
||||
* [https://bgs.n0la.org/elitebgs-0.3.0.zip](https://bgs.n0la.org/elitebgs-0.3.0.zip)
|
||||
* [https://bgs.n0la.org/elitebgs-0.3.1.zip](https://bgs.n0la.org/elitebgs-0.3.1.zip)
|
||||
|
||||
## Old Versions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user