EDBGS/EliteBGS/OneLineDiscordLog.cs

33 lines
973 B
C#
Raw Normal View History

2022-12-16 21:48:16 +01:00
namespace EliteBGS;
public class OneLineDiscordLog : DiscordLogGenerator {
protected override string GenerateObjectiveHeader(Objective objective) {
if (!string.IsNullOrEmpty(objective.Faction)) {
2022-12-16 21:48:16 +01:00
return string.Format("**{0}** for **{1}**: ", objective.System, objective.Faction);
} else {
2022-12-16 21:48:16 +01:00
return string.Format("**{0}**: ", objective.System);
}
}
protected override string GenerateObjectiveFooter(Objective objective) {
return "";
}
protected override string GenerateFooter() {
return "";
}
protected override string GenerateHeader() {
return "";
}
protected override string TransformFinalLogForObjective(Objective objective, string log) {
string[] lines = log.Split("\n", System.StringSplitOptions.RemoveEmptyEntries);
return string.Join(", ", lines);
}
public override string ToString() {
return "One Line Report";
}
}