refactor mission completed a bit

This commit is contained in:
Florian Stinglmayr 2021-11-16 18:44:02 +01:00
parent 068a2102b9
commit 01ef8705f7

View File

@ -9,7 +9,14 @@ namespace EliteBGS.BGS {
}
public string MissionName {
get { return (Entries[0] as MissionCompletedEntry).HumanReadableName; }
get {
MissionCompletedEntry c = Entries[0] as MissionCompletedEntry;
if (string.IsNullOrEmpty(c.HumanReadableName)) {
return c.Name;
} else {
return c.HumanReadableName;
}
}
}
public string Influence {
@ -24,7 +31,7 @@ namespace EliteBGS.BGS {
var entry = Entries[0] as MissionCompletedEntry;
var influence = entry.GetInfluenceForFaction(Faction);
builder.AppendFormat("{0}", entry.HumanReadableName);
builder.AppendFormat("{0}", MissionName);
if (influence != "") {
builder.AppendFormat(", Influence: {0}", influence);
}