fix voucher reporting after indepth BGS discussion on EDC

This commit is contained in:
Florian Stinglmayr 2021-10-07 09:02:34 +02:00
parent 89fd36b5c4
commit 3eee75e814
5 changed files with 44 additions and 23 deletions

View File

@ -7,6 +7,11 @@ namespace NonaBGS.BGS {
public class LogEntry : IComparable<LogEntry> { public class LogEntry : IComparable<LogEntry> {
private List<Entry> entries = new List<Entry>(); private List<Entry> entries = new List<Entry>();
/// <summary>
/// Controlling faction of the station this entry was made/turned into.
/// </summary>
public string ControllingFaction { get; set; } = "";
public List<Entry> Entries => entries; public List<Entry> Entries => entries;
public string Station { get; set; } public string Station { get; set; }
public string System { get; set; } public string System { get; set; }

View File

@ -93,19 +93,17 @@ namespace NonaBGS.BGS {
entry.Entries.Add(e); entry.Entries.Add(e);
entry.System = current_system; entry.System = current_system;
entry.Station = current_station; entry.Station = current_station;
entry.Faction = controlling_faction; entry.Faction = (e as RedeemVoucherEntry).Factions.First();
entry.ControllingFaction = controlling_faction;
collate = true;
} else if (e.Is(Events.FactionKillBond)) {
entry = new FactionKillBonds();
entry.Entries.Add(e);
entry.System = current_system;
entry.Station = current_station;
entry.Faction = (e as FactionKillBondEntry).AwardingFaction;
collate = true; collate = true;
} else if (e.Is(Events.SellMicroResources)) { } else if (e.Is(Events.SellMicroResources)) {
entry = new SellMicroResources(current_system, current_station); entry = new SellMicroResources() {
Faction = controlling_faction,
Station = current_station,
System = current_system
};
entry.Entries.Add(e); entry.Entries.Add(e);
} else if (e.Is(Events.MarketSell)) { } else if (e.Is(Events.MarketSell)) {
entry = new SellCargo() { entry = new SellCargo() {

View File

@ -3,11 +3,6 @@ using EDJournal;
namespace NonaBGS.BGS { namespace NonaBGS.BGS {
public class SellMicroResources : LogEntry { public class SellMicroResources : LogEntry {
public SellMicroResources(string system, string station) {
System = system;
Station = station;
}
public int TotalSum { public int TotalSum {
get { get {
return Entries return Entries

View File

@ -23,7 +23,13 @@ namespace NonaBGS.BGS {
.GroupBy(x => (x as RedeemVoucherEntry).Type) .GroupBy(x => (x as RedeemVoucherEntry).Type)
.Select(x => x.Key) .Select(x => x.Key)
.First(); .First();
type = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(v); if (v == "CombatBond") {
type = "Combat Bond";
} else if (v == "bounty") {
type = "Bounty";
} else {
type = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(v);
}
} }
return type; return type;
@ -46,10 +52,5 @@ namespace NonaBGS.BGS {
public override string ToString() { public override string ToString() {
return string.Format("{0} Vouchers: {1}", Type, Credits.FormatCredits(TotalSum)); return string.Format("{0} Vouchers: {1}", Type, Credits.FormatCredits(TotalSum));
} }
/// <summary>
/// Vouchers only help the controlling faction
/// </summary>
public override bool OnlyControllingFaction => true;
} }
} }

View File

@ -1,6 +1,6 @@
# NonaBGS # NonaBGS
This tool is meant to help people contributing to the Novay Navy BGS effor to create This tool is meant to help people contributing to the Nova Navy BGS effor to create
BGS reports. The tool allows you to configure BGS objectives, and will then parse your BGS reports. The tool allows you to configure BGS objectives, and will then parse your
player journal for tasks you completed relating to that BGS objective. Once the JSON player journal for tasks you completed relating to that BGS objective. Once the JSON
player journal has been parsed, you may then generate a BGS report for the Nova Navy player journal has been parsed, you may then generate a BGS report for the Nova Navy
@ -27,8 +27,9 @@ recognises the following completed tasks:
* Vouchers, including bounty vouchers, combat bonds, and settlement vouchers (aka intel packages) * Vouchers, including bounty vouchers, combat bonds, and settlement vouchers (aka intel packages)
* Selling of micro resources (Odyssey only) * Selling of micro resources (Odyssey only)
* Selling cartography data * Selling cartography data
* Selling of cargo to stations
Please note that cartography data, micro resources, and vouchers only help the controlling faction Please note that cartography data, and micro resources only help the controlling faction
of a station. The tool is clever enough to exclude these if the station you turn them in at, is not of a station. The tool is clever enough to exclude these if the station you turn them in at, is not
controlled by the faction you specified in the objective. controlled by the faction you specified in the objective.
@ -53,6 +54,27 @@ The resulting discord report is kept in the Nova Navy format. Before you copy/pa
Nova Navy discord, you should check the log. You can of course edit it, if something is wrong Nova Navy discord, you should check the log. You can of course edit it, if something is wrong
or the tool itself missed something. or the tool itself missed something.
## Known Issues and Bugs
Settlement vouchers (aka Intel Packages) help every faction aligned with the given superpower.
So if you turn in an Imperial intel package on an imperial station, all factions aligned with
the Empire will gain a bit of INF boost. The tool currently cannot handle that. All intel packages
are displayed instead.
The player journal currently does not make an entry when you win or lose a combat zone. This is a
an ommission from FDev:
* [https://issues.frontierstore.net/issue-detail/43509](https://issues.frontierstore.net/issue-detail/43509)
Please upvote the issue to get it fixed. Until then, you have to add combat zone wins manually.
Also missions accepted from NPCs in Odyssey concourses do not get a player journal entry. This is
also an ommission from FDev:
* [https://issues.frontierstore.net/issue-detail/43586](https://issues.frontierstore.net/issue-detail/43586)
Until this is fixed, please edit the resulting BGS log text, and manually add such entries.
## Use EDDB information ## Use EDDB information
NonaBGS can download information from EDDB to auto complete system- and station names. You can NonaBGS can download information from EDDB to auto complete system- and station names. You can