using System.Text; using EDJournal; namespace EliteBGS.BGS { /// /// 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. /// 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(); } } }