add support for thargoid vouchers

This commit is contained in:
2022-11-25 15:48:00 +01:00
parent e8de768d01
commit 8514331701
5 changed files with 101 additions and 12 deletions

View File

@@ -488,9 +488,12 @@ internal class RedeemVoucherParser : TransactionParserPart {
foreach (string faction in entry.Factions) {
bool relevantBond = false;
string relevantFaction = faction;
if (string.Compare(faction, Factions.PilotsFederationVouchers) == 0) {
// Target faction is pilots' federation, so we assume thargoid bonks
// Also assign this combat bond to the Pilots Federation
relevantFaction = Factions.PilotsFederation;
relevantBond = true;
}
@@ -511,7 +514,7 @@ internal class RedeemVoucherParser : TransactionParserPart {
transactions.Add(new Vouchers(entry) {
System = context.CurrentSystem,
Station = context.CurrentStation,
Faction = faction,
Faction = relevantFaction,
ControllingFaction = context.ControllingFaction,
});
}
@@ -600,9 +603,13 @@ internal class FactionKillBondParser : TransactionParserPart {
throw new NotImplementedException();
}
if (string.Compare(entry.VictimFaction, Thargoid.ThargoidFaction) == 0) {
if (Factions.IsThargoid(entry.VictimFaction)) {
// Thargoid bonk
transactions.Add(new ThargoidKill(entry));
transactions.Add(new ThargoidKill(entry) {
System = context.CurrentSystem,
Faction = Factions.PilotsFederation,
Station = context.CurrentStation,
});
}
}
}