From b96e40299dd6bee6036a8e684d94876a843df337 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Thu, 15 Dec 2022 22:52:50 +0100 Subject: [PATCH] make pilot's federation combat bonds system contribution --- EDPlayerJournal/BGS/Vouchers.cs | 14 ++++++++++++-- EDPlayerJournal/Bonds.cs | 13 +++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 EDPlayerJournal/Bonds.cs diff --git a/EDPlayerJournal/BGS/Vouchers.cs b/EDPlayerJournal/BGS/Vouchers.cs index a01501a..bc76c13 100644 --- a/EDPlayerJournal/BGS/Vouchers.cs +++ b/EDPlayerJournal/BGS/Vouchers.cs @@ -13,6 +13,16 @@ public class Vouchers : Transaction { Entries.Add(e); } + public override bool SystemContribution { + get { + if (Faction == Factions.PilotsFederation && Type == "Combat Bond") { + return true; + } + + return false; + } + } + public long TotalSum { get { if (Faction == null) { @@ -39,9 +49,9 @@ public class Vouchers : Transaction { .First(); if (v == null) { return null; - } else if (v == "CombatBond") { + } else if (v == Bonds.CombatBond) { type = "Combat Bond"; - } else if (v == "bounty") { + } else if (v == Bonds.Bounty) { type = "Bounty"; } else { type = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(v); diff --git a/EDPlayerJournal/Bonds.cs b/EDPlayerJournal/Bonds.cs new file mode 100644 index 0000000..22c4904 --- /dev/null +++ b/EDPlayerJournal/Bonds.cs @@ -0,0 +1,13 @@ +namespace EDPlayerJournal; + +public class Bonds { + /// + /// Internal string name for combat bonds. + /// + public static readonly string CombatBond = "CombatBond"; + + /// + /// Internal string name for bounties. + /// + public static readonly string Bounty = "bounty"; +}