add settlements for ground CZs to the combat log
This commit is contained in:
@@ -10,7 +10,7 @@ class CombatZoneFormat : LogFormatter {
|
||||
var logs = objective
|
||||
.EnabledOfType<CombatZone>()
|
||||
.OrderBy(x => (CombatZones.DifficultyRank(x.Grade) ?? 0))
|
||||
.GroupBy(x => new { x.Type, x.Grade })
|
||||
.GroupBy(x => new { x.Type, x.Grade, x.Settlement })
|
||||
.ToDictionary(x => x.Key, x => x.ToList())
|
||||
;
|
||||
StringBuilder builder = new StringBuilder();
|
||||
@@ -23,6 +23,11 @@ class CombatZoneFormat : LogFormatter {
|
||||
int optionals = log.Value
|
||||
.Sum(x => x.OptionalObjectivesCompleted)
|
||||
;
|
||||
var settlements = log.Value
|
||||
.Select(x => x.Settlement)
|
||||
.Distinct()
|
||||
;
|
||||
string settl = string.Join(", ", settlements);
|
||||
if (!string.IsNullOrEmpty(log.Key.Grade)) {
|
||||
builder.AppendFormat("Won {0}x {1} {2} Combat Zone(s)",
|
||||
log.Value.Count,
|
||||
@@ -39,6 +44,9 @@ class CombatZoneFormat : LogFormatter {
|
||||
if (optionals > 0) {
|
||||
builder.AppendFormat(" (with {0} optional objectives)", optionals);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(settl)) {
|
||||
builder.AppendFormat(" (at {0})", settl);
|
||||
}
|
||||
builder.Append("\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user