using System.Text; using EDJournal; namespace EliteBGS.BGS { public class MissionFailed : LogEntry { public MissionFailedEntry Failed { get; set; } public MissionAcceptedEntry Accepted { get; set; } public MissionFailed(MissionAcceptedEntry accepted) { Accepted = accepted; Faction = accepted.Faction; } public override string ToString() { StringBuilder builder = new StringBuilder(); if (Failed == null || Accepted == null) { return ""; } builder.AppendFormat("Mission failed: \"{0}\"", Failed.HumanReadableName != null ? Failed.HumanReadableName : Failed.Name ); return builder.ToString(); } } }