fix voucher reporting after indepth BGS discussion on EDC
This commit is contained in:
@@ -7,6 +7,11 @@ namespace NonaBGS.BGS {
|
||||
public class LogEntry : IComparable<LogEntry> {
|
||||
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 string Station { get; set; }
|
||||
public string System { get; set; }
|
||||
|
||||
@@ -93,19 +93,17 @@ namespace NonaBGS.BGS {
|
||||
entry.Entries.Add(e);
|
||||
entry.System = current_system;
|
||||
entry.Station = current_station;
|
||||
entry.Faction = 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;
|
||||
entry.Faction = (e as RedeemVoucherEntry).Factions.First();
|
||||
entry.ControllingFaction = controlling_faction;
|
||||
|
||||
collate = true;
|
||||
} 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);
|
||||
} else if (e.Is(Events.MarketSell)) {
|
||||
entry = new SellCargo() {
|
||||
|
||||
@@ -3,11 +3,6 @@ using EDJournal;
|
||||
|
||||
namespace NonaBGS.BGS {
|
||||
public class SellMicroResources : LogEntry {
|
||||
public SellMicroResources(string system, string station) {
|
||||
System = system;
|
||||
Station = station;
|
||||
}
|
||||
|
||||
public int TotalSum {
|
||||
get {
|
||||
return Entries
|
||||
|
||||
@@ -23,7 +23,13 @@ namespace NonaBGS.BGS {
|
||||
.GroupBy(x => (x as RedeemVoucherEntry).Type)
|
||||
.Select(x => x.Key)
|
||||
.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;
|
||||
@@ -46,10 +52,5 @@ namespace NonaBGS.BGS {
|
||||
public override string ToString() {
|
||||
return string.Format("{0} Vouchers: {1}", Type, Credits.FormatCredits(TotalSum));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Vouchers only help the controlling faction
|
||||
/// </summary>
|
||||
public override bool OnlyControllingFaction => true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user