39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System.Text;
|
|
using EDJournal;
|
|
|
|
namespace EliteBGS.BGS {
|
|
/// <summary>
|
|
/// This class is used when a completed mission gives influence to another
|
|
/// faction as well. This happens, for example, when you deliver cargo from one
|
|
/// faction to another. Both sometimes gain influence.
|
|
/// </summary>
|
|
public class InfluenceSupport : LogEntry {
|
|
public string Influence { get; set; }
|
|
public MissionCompletedEntry RelevantMission { get; set; }
|
|
|
|
public override string CompletedAt {
|
|
get {
|
|
return RelevantMission.Timestamp.ToString("dd.MM.yyyy hh:mm UTC");
|
|
}
|
|
}
|
|
|
|
public override string ToString() {
|
|
StringBuilder builder = new StringBuilder();
|
|
string missionname;
|
|
|
|
if (RelevantMission != null) {
|
|
missionname = RelevantMission.HumanReadableName;
|
|
} else {
|
|
missionname = "UNKNOWN MISSION";
|
|
}
|
|
|
|
builder.AppendFormat("Influence gained from \"{0}\": \"{1}\"",
|
|
missionname,
|
|
string.IsNullOrEmpty(Influence) ? "NONE" : Influence
|
|
);
|
|
|
|
return builder.ToString();
|
|
}
|
|
}
|
|
}
|