fix a bug where mission support wasn't shown

This commit is contained in:
Florian Stinglmayr 2022-12-14 18:19:46 +01:00
parent 5c7580a3c0
commit 44410e86c8

View File

@ -13,8 +13,10 @@ public class MissionFormat : LogFormatter {
int total_influence = 0;
var missions = objective.EnabledOfType<MissionCompleted>();
var support = objective.EnabledOfType<InfluenceSupport>();
if (missions == null || missions.Count == 0) {
if ((missions == null || missions.Count == 0) &&
(support == null || support.Count == 0)) {
return "";
}
@ -56,7 +58,6 @@ public class MissionFormat : LogFormatter {
output.Append("\n\n");
var support = objective.EnabledOfType<InfluenceSupport>();
foreach (InfluenceSupport inf in support) {
output.Append(inf.ToString());
output.Append("\n");