Compare commits
No commits in common. "3f1af39ff1b639dcd8be19aee6dea3b11c7b2b3d" and "cd09fac03aff4ab9b662c5bfad4093cc2ae1e9d7" have entirely different histories.
3f1af39ff1
...
cd09fac03a
@ -113,10 +113,8 @@ namespace EliteBGS.BGS {
|
|||||||
|
|
||||||
foreach (MissionFailed failed in missions) {
|
foreach (MissionFailed failed in missions) {
|
||||||
MissionFailedEntry f = failed.Failed;
|
MissionFailedEntry f = failed.Failed;
|
||||||
builder.AppendFormat("Failed {0} mission(s) \"{1}\" targeting {2}\n",
|
builder.AppendFormat("Failed mission \"{0}\"\n",
|
||||||
failed.Entries.Count,
|
f.HumanReadableName == null ? f.Name : f.HumanReadableName
|
||||||
f.HumanReadableName == null ? f.Name : f.HumanReadableName,
|
|
||||||
failed.Faction
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,24 +11,6 @@ namespace EliteBGS.BGS {
|
|||||||
Faction = accepted.Faction;
|
Faction = accepted.Faction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int CompareTo(LogEntry other) {
|
|
||||||
if (other.GetType() != typeof(MissionFailed)) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
MissionFailed failed = other as MissionFailed;
|
|
||||||
|
|
||||||
/* if it is the same mission name, the same faction and the same system,
|
|
||||||
* collate mission failures together */
|
|
||||||
if (failed.Failed.HumanReadableName == Failed.HumanReadableName &&
|
|
||||||
failed.Faction == Faction &&
|
|
||||||
failed.System == System) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
|
||||||
@ -36,8 +18,7 @@ namespace EliteBGS.BGS {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.AppendFormat("{0}x Mission failed: \"{1}\"",
|
builder.AppendFormat("Mission failed: \"{0}\"",
|
||||||
Entries.Count,
|
|
||||||
Failed.HumanReadableName != null ? Failed.HumanReadableName : Failed.Name
|
Failed.HumanReadableName != null ? Failed.HumanReadableName : Failed.Name
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -186,25 +186,6 @@ namespace EliteBGS.BGS {
|
|||||||
|
|
||||||
return builder.ToString();
|
return builder.ToString();
|
||||||
}
|
}
|
||||||
private string BuildFailedMissions(Objective objective) {
|
|
||||||
MissionFailed[] missions = objective.LogEntries.OfType<MissionFailed>().ToArray();
|
|
||||||
StringBuilder builder = new StringBuilder();
|
|
||||||
|
|
||||||
if (missions.Length <= 0) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (MissionFailed failed in missions) {
|
|
||||||
MissionFailedEntry f = failed.Failed;
|
|
||||||
builder.AppendFormat("Failed {0} mission(s) \"{1}\" targeting {2}\n",
|
|
||||||
failed.Entries.Count,
|
|
||||||
f.HumanReadableName == null ? f.Name : f.HumanReadableName,
|
|
||||||
failed.Faction
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return builder.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GenerateDiscordLog(Report report) {
|
public string GenerateDiscordLog(Report report) {
|
||||||
StringBuilder log = new StringBuilder();
|
StringBuilder log = new StringBuilder();
|
||||||
@ -228,9 +209,6 @@ namespace EliteBGS.BGS {
|
|||||||
var missions = BuildMissionList(objective);
|
var missions = BuildMissionList(objective);
|
||||||
entries.Append(missions);
|
entries.Append(missions);
|
||||||
|
|
||||||
var failed = BuildFailedMissions(objective);
|
|
||||||
entries.Append(failed);
|
|
||||||
|
|
||||||
var vouchers = BuildVouchers(objective);
|
var vouchers = BuildVouchers(objective);
|
||||||
entries.Append(vouchers);
|
entries.Append(vouchers);
|
||||||
|
|
||||||
|
@ -121,10 +121,6 @@ namespace EliteBGS.BGS {
|
|||||||
failed.Name +
|
failed.Name +
|
||||||
"\" was not recognised");
|
"\" was not recognised");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mission failed should be collated if they are in the same system/station
|
|
||||||
*/
|
|
||||||
collate = true;
|
|
||||||
} else if (e.Is(Events.MultiSellExplorationData)) {
|
} else if (e.Is(Events.MultiSellExplorationData)) {
|
||||||
/* For multi-sell-exploraton-data only the controlling faction of the station sold to matters.
|
/* For multi-sell-exploraton-data only the controlling faction of the station sold to matters.
|
||||||
*/
|
*/
|
||||||
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,14 +0,0 @@
|
|||||||
# EliteBGS changelog
|
|
||||||
|
|
||||||
## 0.1.0-beta3 on ??.??.????
|
|
||||||
|
|
||||||
* Collated failed missions into a single entry with a counter
|
|
||||||
* Added failed missions to Nova Navy log template
|
|
||||||
|
|
||||||
## 0.1.0-beta2 on 09.01.2022
|
|
||||||
|
|
||||||
* Adding combat zones has been repaired
|
|
||||||
|
|
||||||
## 0.1.0-beta1 on 07.01.2022
|
|
||||||
|
|
||||||
* Initial release
|
|
@ -168,9 +168,6 @@
|
|||||||
<Content Include="main-objectives.png">
|
<Content Include="main-objectives.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<None Include="CHANGELOG.md">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="main-entries.png">
|
<Content Include="main-entries.png">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user