Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 20c44d41ca | |||
| 4f339944c6 | |||
| ae4e181e7f | |||
| be59588351 | |||
| 1b2a162ac5 | |||
| f490d4ba4d | |||
| 6b09ec4db3 | |||
| d7a1ac5ef2 | |||
| 3643dda39e | |||
| c7be0ef3f5 | |||
| 6a36458026 | |||
| d7dc9bd904 | |||
| af66983497 | |||
| 3f82e335aa | |||
| 77fcbfbba7 | |||
| a45ca9f5bc | |||
| c9e87958ae | |||
| 12b15bb910 | |||
| bec73931b9 | |||
| b3fca4a63e | |||
| 6a61aa4946 | |||
| b005edc27f | |||
| 8f9f4f3e35 | |||
| 7b4176fce5 | |||
| 434756695a | |||
| a50f0c2313 | |||
| 6dce0116ec | |||
| 79914919e5 | |||
| c23e8627f6 | |||
| 1e36eb3419 | |||
| d49612e7e5 | |||
| b19a576515 | |||
| 9ffca16a78 | |||
| 73a1975964 | |||
| f9f1842cb7 | |||
| 5487cb3d37 | |||
| e11572a565 |
@@ -19,14 +19,24 @@ public class CombatZone : Transaction {
|
||||
public bool? SpecOps { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether captain was won
|
||||
/// Whether allied captain objective was won
|
||||
/// </summary>
|
||||
public bool? Captain { get; set; }
|
||||
public bool? AlliedCaptain { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether correspondent objective was won
|
||||
/// Whether enemy captain objective was won
|
||||
/// </summary>
|
||||
public bool? Correspondent { get; set; }
|
||||
public bool? EnemyCaptain { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the allied correspondent objective was won
|
||||
/// </summary>
|
||||
public bool? AlliedCorrespondent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the enemy correspondent objective was won
|
||||
/// </summary>
|
||||
public bool? EnemyCorrespondent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether cap ship objective was won
|
||||
@@ -41,7 +51,14 @@ public class CombatZone : Transaction {
|
||||
if (IsGround) {
|
||||
return 0;
|
||||
}
|
||||
return new List<bool?>() { SpecOps, Captain, Correspondent, CapitalShip }
|
||||
return new List<bool?>() {
|
||||
SpecOps,
|
||||
AlliedCaptain,
|
||||
EnemyCaptain,
|
||||
AlliedCorrespondent,
|
||||
EnemyCorrespondent,
|
||||
CapitalShip
|
||||
}
|
||||
.Where(x => x != null && x == true)
|
||||
.Count()
|
||||
;
|
||||
|
||||
44
EDPlayerJournal/BGS/Parsers/MarketBuyParser.cs
Normal file
44
EDPlayerJournal/BGS/Parsers/MarketBuyParser.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using EDPlayerJournal.Entries;
|
||||
|
||||
namespace EDPlayerJournal.BGS;
|
||||
|
||||
internal class MarketBuyParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
MarketBuyEntry? entry = e as MarketBuyEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
context.BoughtCargo(entry.Type, entry.BuyPrice);
|
||||
|
||||
// We still want the information on buy price for profit,
|
||||
// but if the option is on, we don't care for parsing it
|
||||
// further.
|
||||
// TODO: might be wise to split this parser into two; one for
|
||||
// determining profit, the other for the BGS information
|
||||
if (options.IgnoreMarketBuy) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new BuyCargo(),
|
||||
"Could not discern the station owner for market buy.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore if its a fleet carrier faction.
|
||||
if (string.Compare(context.StationOwner, Factions.FleetCarrier, StringComparison.OrdinalIgnoreCase) == 0 &&
|
||||
options.IgnoreFleetCarrierFaction) {
|
||||
return;
|
||||
}
|
||||
|
||||
transactions.Add(new BuyCargo(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
45
EDPlayerJournal/BGS/Parsers/MarketSellParser.cs
Normal file
45
EDPlayerJournal/BGS/Parsers/MarketSellParser.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using EDPlayerJournal.Entries;
|
||||
|
||||
namespace EDPlayerJournal.BGS;
|
||||
|
||||
internal class MarketSellParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
long profit = 0;
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new SellCargo(),
|
||||
"Could not discern the station owner market sell.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore if its a fleet carrier faction.
|
||||
if (string.Compare(context.StationOwner, Factions.FleetCarrier, StringComparison.OrdinalIgnoreCase) == 0 &&
|
||||
options.IgnoreFleetCarrierFaction) {
|
||||
return;
|
||||
}
|
||||
|
||||
MarketSellEntry? entry = e as MarketSellEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (entry.Type == null) {
|
||||
throw new InvalidJournalEntryException("market sell contains no cargo type");
|
||||
}
|
||||
|
||||
if (context.BuyCost.ContainsKey(entry.Type)) {
|
||||
long avg = context.BuyCost[entry.Type];
|
||||
profit = (long)entry.TotalSale - (avg * entry.Count);
|
||||
}
|
||||
|
||||
transactions.Add(new SellCargo(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
Profit = profit,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using EDPlayerJournal.Entries;
|
||||
|
||||
namespace EDPlayerJournal.BGS;
|
||||
|
||||
internal class MultiSellExplorationDataParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
MultiSellExplorationDataEntry? entry = e as MultiSellExplorationDataEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new Cartographics(),
|
||||
"Could not discern the station owner for cartographics sell.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore if its a fleet carrier faction.
|
||||
if (string.Compare(context.StationOwner, Factions.FleetCarrier, StringComparison.OrdinalIgnoreCase) == 0 &&
|
||||
options.IgnoreFleetCarrierFaction) {
|
||||
return;
|
||||
}
|
||||
|
||||
transactions.Add(new Cartographics(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
33
EDPlayerJournal/BGS/Parsers/SellExplorationDataParser.cs
Normal file
33
EDPlayerJournal/BGS/Parsers/SellExplorationDataParser.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using EDPlayerJournal.Entries;
|
||||
|
||||
namespace EDPlayerJournal.BGS;
|
||||
|
||||
internal class SellExplorationDataParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
SellExplorationDataEntry? entry = e as SellExplorationDataEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new Cartographics(),
|
||||
"Could not discern the station owner for cartographics sell.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore if its a fleet carrier faction.
|
||||
if (string.Compare(context.StationOwner, Factions.FleetCarrier, StringComparison.OrdinalIgnoreCase) == 0 &&
|
||||
options.IgnoreFleetCarrierFaction) {
|
||||
return;
|
||||
}
|
||||
|
||||
transactions.Add(new Cartographics(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
38
EDPlayerJournal/BGS/Parsers/SellOrganicDataParser.cs
Normal file
38
EDPlayerJournal/BGS/Parsers/SellOrganicDataParser.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using EDPlayerJournal.Entries;
|
||||
|
||||
namespace EDPlayerJournal.BGS;
|
||||
|
||||
internal class SellOrganicDataParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
// If exo biology is ignored, simply do nothing
|
||||
if (options.IgnoreExoBiology) {
|
||||
return;
|
||||
}
|
||||
|
||||
SellOrganicDataEntry? entry = e as SellOrganicDataEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new OrganicData(),
|
||||
"Could not discern the station owner for organic data sell.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore if its a fleet carrier faction.
|
||||
if (string.Compare(context.StationOwner, Factions.FleetCarrier, StringComparison.OrdinalIgnoreCase) == 0 &&
|
||||
options.IgnoreFleetCarrierFaction) {
|
||||
return;
|
||||
}
|
||||
|
||||
transactions.Add(new OrganicData(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
65
EDPlayerJournal/BGS/Parsers/ShipTargetedParser.cs
Normal file
65
EDPlayerJournal/BGS/Parsers/ShipTargetedParser.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
using EDPlayerJournal.Entries;
|
||||
|
||||
namespace EDPlayerJournal.BGS;
|
||||
|
||||
/// <summary>
|
||||
/// With ship targeted we might find out to which faction a given NPC belonged. This is
|
||||
/// useful later when said NPC gets killed or murdered.
|
||||
/// </summary>
|
||||
internal class ShipTargetedParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
ShipTargetedEntry? entry = e as ShipTargetedEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Scan happens in stages, and sometimes this information is not known
|
||||
// yet. Do now throw an error, this is expected behaviour.
|
||||
if (!string.IsNullOrEmpty(entry.PilotNameLocalised) &&
|
||||
!string.IsNullOrEmpty(entry.Faction)) {
|
||||
context.NPCFaction.TryAdd(entry.PilotNameLocalised, entry.Faction);
|
||||
}
|
||||
|
||||
string? faction = context.LastRecordedAwardingFaction;
|
||||
|
||||
// We have seen a captain?
|
||||
if (NPCs.IsWarzoneCaptain(entry.PilotName)) {
|
||||
// if we have faction information, we can compare it to figure out
|
||||
// whether it is the enemy or allied faction. but this is not always
|
||||
// possible. In such a case we assume we have seen the enemy captain.
|
||||
if (!string.IsNullOrEmpty(entry.Faction) &&
|
||||
!string.IsNullOrEmpty(faction)) {
|
||||
if (string.Compare(faction, entry.Faction) != 0) {
|
||||
context.HaveSeenEnemyCaptain = true;
|
||||
} else {
|
||||
context.HaveSeenAlliedCaptain = true;
|
||||
}
|
||||
} else {
|
||||
context.HaveSeenEnemyCaptain = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Spec ops?
|
||||
if (NPCs.IsSpecOps(entry.PilotName)) {
|
||||
context.HaveSeenSpecOps = true;
|
||||
}
|
||||
|
||||
// Correspondent?
|
||||
if (NPCs.IsWarzoneCorrespondent(entry.PilotName)) {
|
||||
// if we have faction information, we can compare it to figure out
|
||||
// whether it is the enemy or allied faction. but this is not always
|
||||
// possible. In such a case we assume we have seen the enemy
|
||||
// correspondent.
|
||||
if (!string.IsNullOrEmpty(entry.Faction) &&
|
||||
!string.IsNullOrEmpty(faction)) {
|
||||
if (string.Compare(faction, entry.Faction) != 0) {
|
||||
context.HaveSeenEnemyCorrespondent = true;
|
||||
} else {
|
||||
context.HaveSeenAlliedCorrespondent = true;
|
||||
}
|
||||
} else {
|
||||
context.HaveSeenEnemyCorrespondent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using EDPlayerJournal.Entries;
|
||||
|
||||
namespace EDPlayerJournal.BGS.Parsers;
|
||||
|
||||
internal class SupercruiseDestinationDropParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
SupercruiseDestinationDropEntry? drop = entry as SupercruiseDestinationDropEntry;
|
||||
if (drop == null || drop.Type == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
context.CurrentInstanceType = drop.Type;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using EDPlayerJournal.Entries;
|
||||
using EDPlayerJournal.BGS.Parsers;
|
||||
using EDPlayerJournal.Entries;
|
||||
|
||||
namespace EDPlayerJournal.BGS;
|
||||
|
||||
@@ -22,6 +23,11 @@ public class TransactionParserOptions {
|
||||
/// disabled.
|
||||
/// </summary>
|
||||
public bool IgnoreMarketBuy { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether we should ignore things done for the fleet carrier faction.
|
||||
/// </summary>
|
||||
public bool IgnoreFleetCarrierFaction { get; set; } = true;
|
||||
}
|
||||
|
||||
public class TransactionList : List<Transaction> {
|
||||
@@ -35,7 +41,7 @@ public class TransactionList : List<Transaction> {
|
||||
/// by itself generate any transactions. Location is the best information gatherer here
|
||||
/// as we are getting controlling faction, system factions, address and station name.
|
||||
/// </summary>
|
||||
internal class LocationParser : TransactionParserPart {
|
||||
internal class LocationParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
LocationEntry? entry = e as LocationEntry;
|
||||
if (entry == null) {
|
||||
@@ -65,14 +71,13 @@ internal class LocationParser : TransactionParserPart {
|
||||
context.StationOwner = null;
|
||||
}
|
||||
|
||||
if (!context.SystemFactions.ContainsKey(entry.StarSystem) &&
|
||||
entry.SystemFactions != null && entry.SystemFactions.Count > 0) {
|
||||
if (entry.SystemFactions != null && entry.SystemFactions.Count > 0) {
|
||||
context.SystemFactions[entry.StarSystem] = entry.SystemFactions;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class FSDJumpParser : TransactionParserPart {
|
||||
internal class FSDJumpParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
FSDJumpEntry? entry = e as FSDJumpEntry;
|
||||
if (entry == null) {
|
||||
@@ -89,6 +94,8 @@ internal class FSDJumpParser : TransactionParserPart {
|
||||
context.DiscernCombatZone(transactions, e);
|
||||
context.ResetCombatZone();
|
||||
|
||||
context.LeftInstance();
|
||||
|
||||
context.CurrentSystem = entry.StarSystem;
|
||||
context.CurrentSystemAddress = entry.SystemAddress;
|
||||
|
||||
@@ -98,14 +105,13 @@ internal class FSDJumpParser : TransactionParserPart {
|
||||
context.ControllingFaction = entry.SystemFaction;
|
||||
}
|
||||
|
||||
if (!context.SystemFactions.ContainsKey(entry.StarSystem) &&
|
||||
entry.SystemFactions != null && entry.SystemFactions.Count > 0) {
|
||||
if (entry.SystemFactions != null && entry.SystemFactions.Count > 0) {
|
||||
context.SystemFactions[entry.StarSystem] = entry.SystemFactions;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class DockedParser : TransactionParserPart {
|
||||
internal class DockedParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
DockedEntry? entry = e as DockedEntry;
|
||||
if (entry == null) {
|
||||
@@ -131,46 +137,11 @@ internal class DockedParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// With ship targeted we might find out to which faction a given NPC belonged. This is
|
||||
/// useful later when said NPC gets killed or murdered.
|
||||
/// </summary>
|
||||
internal class ShipTargetedParser : TransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
ShipTargetedEntry? entry = e as ShipTargetedEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Scan happens in stages, and sometimes this information is not known
|
||||
// yet. Do now throw an error, this is expected behaviour.
|
||||
if (!string.IsNullOrEmpty(entry.PilotNameLocalised) &&
|
||||
!string.IsNullOrEmpty(entry.Faction)) {
|
||||
context.NPCFaction.TryAdd(entry.PilotNameLocalised, entry.Faction);
|
||||
}
|
||||
|
||||
// We have seen a captain?
|
||||
if (NPCs.IsWarzoneCaptain(entry.PilotName)) {
|
||||
context.HaveSeenCaptain = true;
|
||||
}
|
||||
|
||||
// Spec ops?
|
||||
if (NPCs.IsSpecOps(entry.PilotName)) {
|
||||
context.HaveSeenSpecOps = true;
|
||||
}
|
||||
|
||||
// Correspondent?
|
||||
if (NPCs.IsWarzoneCorrespondent(entry.PilotName)) {
|
||||
context.HaveSeenCorrespondent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Commit crime can result in a transaction, especially if the crime committed is
|
||||
/// murder.
|
||||
/// </summary>
|
||||
internal class CommitCrimeParser : TransactionParserPart {
|
||||
internal class CommitCrimeParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
CommitCrimeEntry? entry = e as CommitCrimeEntry;
|
||||
if (entry == null) {
|
||||
@@ -226,7 +197,7 @@ internal class CommitCrimeParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class MissionsParser : TransactionParserPart {
|
||||
internal class MissionsParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
MissionsEntry? missions = entry as MissionsEntry;
|
||||
|
||||
@@ -255,7 +226,7 @@ internal class MissionsParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class MissionAcceptedParser : TransactionParserPart {
|
||||
internal class MissionAcceptedParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
MissionAcceptedEntry? entry = e as MissionAcceptedEntry;
|
||||
if (entry == null) {
|
||||
@@ -281,7 +252,7 @@ internal class MissionAcceptedParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class MissionCompletedParser : TransactionParserPart {
|
||||
internal class MissionCompletedParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
MissionCompletedEntry? entry = e as MissionCompletedEntry;
|
||||
if (entry == null || entry.Mission == null) {
|
||||
@@ -396,7 +367,7 @@ internal class MissionCompletedParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class MissionFailedParser : TransactionParserPart {
|
||||
internal class MissionFailedParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
Mission? mission;
|
||||
Location? accepted_location;
|
||||
@@ -451,84 +422,7 @@ internal class MissionFailedParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class SellExplorationDataParser : TransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
SellExplorationDataEntry? entry = e as SellExplorationDataEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new Cartographics(),
|
||||
"Could not discern the station owner for cartographics sell.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
transactions.Add(new Cartographics(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal class SellOrganicDataParser : TransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
// If exo biology is ignored, simply do nothing
|
||||
if (options.IgnoreExoBiology) {
|
||||
return;
|
||||
}
|
||||
|
||||
SellOrganicDataEntry? entry = e as SellOrganicDataEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new OrganicData(),
|
||||
"Could not discern the station owner for organic data sell.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
transactions.Add(new OrganicData(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal class MultiSellExplorationDataParser : TransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
MultiSellExplorationDataEntry? entry = e as MultiSellExplorationDataEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new Cartographics(),
|
||||
"Could not discern the station owner for cartographics sell.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
transactions.Add(new Cartographics(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal class RedeemVoucherParser : TransactionParserPart {
|
||||
internal class RedeemVoucherParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
RedeemVoucherEntry? entry = e as RedeemVoucherEntry;
|
||||
if (entry == null) {
|
||||
@@ -585,7 +479,7 @@ internal class RedeemVoucherParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class SellMicroResourcesParser : TransactionParserPart {
|
||||
internal class SellMicroResourcesParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
SellMicroResourcesEntry? entry = e as SellMicroResourcesEntry;
|
||||
if (entry == null) {
|
||||
@@ -609,7 +503,7 @@ internal class SellMicroResourcesParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class SearchAndRescueParser : TransactionParserPart {
|
||||
internal class SearchAndRescueParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
SearchAndRescueEntry? entry = e as SearchAndRescueEntry;
|
||||
if (entry == null) {
|
||||
@@ -633,78 +527,7 @@ internal class SearchAndRescueParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class MarketBuyParser : TransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
MarketBuyEntry? entry = e as MarketBuyEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
context.BoughtCargo(entry.Type, entry.BuyPrice);
|
||||
|
||||
// We still want the information on buy price for profit,
|
||||
// but if the option is on, we don't care for parsing it
|
||||
// further.
|
||||
// TODO: might be wise to split this parser into two; one for
|
||||
// determining profit, the other for the BGS information
|
||||
if (options.IgnoreMarketBuy) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new OrganicData(),
|
||||
"Could not discern the station owner for market buy.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
transactions.Add(new BuyCargo(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal class MarketSellParser : TransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
long profit = 0;
|
||||
|
||||
if (context.StationOwner == null) {
|
||||
transactions.AddIncomplete(
|
||||
new OrganicData(),
|
||||
"Could not discern the station owner market sell.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
|
||||
MarketSellEntry? entry = e as MarketSellEntry;
|
||||
if (entry == null) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
if (entry.Type == null) {
|
||||
throw new InvalidJournalEntryException("market sell contains no cargo type");
|
||||
}
|
||||
|
||||
if (context.BuyCost.ContainsKey(entry.Type)) {
|
||||
long avg = context.BuyCost[entry.Type];
|
||||
profit = (long)entry.TotalSale - (avg * entry.Count);
|
||||
}
|
||||
|
||||
transactions.Add(new SellCargo(entry) {
|
||||
System = context.CurrentSystem,
|
||||
Station = context.CurrentStation,
|
||||
Faction = context.StationOwner,
|
||||
Profit = profit,
|
||||
IsLegacy = context.IsLegacy,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal class FactionKillBondParser : TransactionParserPart {
|
||||
internal class FactionKillBondParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
FactionKillBondEntry? entry = e as FactionKillBondEntry;
|
||||
if (entry == null) {
|
||||
@@ -737,7 +560,7 @@ internal class FactionKillBondParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class EmbarkDisembarkParser : TransactionParserPart {
|
||||
internal class EmbarkDisembarkParser : ITransactionParserPart {
|
||||
public void Parse(Entry e, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
if (e.Is(Events.Embark)) {
|
||||
context.IsOnFoot = false;
|
||||
@@ -747,23 +570,27 @@ internal class EmbarkDisembarkParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class SupercruiseEntryParser : TransactionParserPart {
|
||||
internal class SupercruiseEntryParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
// After a super cruise entry we are no longer on foot.
|
||||
context.IsOnFoot = false;
|
||||
context.DiscernCombatZone(transactions, entry);
|
||||
context.ResetCombatZone();
|
||||
// Supercruise entry means you left the current local instance
|
||||
context.LeftInstance();
|
||||
}
|
||||
}
|
||||
|
||||
internal class ShutdownParser : TransactionParserPart {
|
||||
internal class ShutdownParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
context.DiscernCombatZone(transactions, entry);
|
||||
context.ResetCombatZone();
|
||||
// Shutdown (logout) means you left the instance
|
||||
context.LeftInstance();
|
||||
}
|
||||
}
|
||||
|
||||
internal class CapShipBondParser : TransactionParserPart {
|
||||
internal class CapShipBondParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
if (entry.GetType() != typeof(CapShipBondEntry)) {
|
||||
return;
|
||||
@@ -773,7 +600,7 @@ internal class CapShipBondParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class FileHeaderParser : TransactionParserPart {
|
||||
internal class FileHeaderParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
FileHeaderEntry? fileheader = entry as FileHeaderEntry;
|
||||
|
||||
@@ -785,7 +612,7 @@ internal class FileHeaderParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class ReceiveTextParser : TransactionParserPart {
|
||||
internal class ReceiveTextParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
ReceiveTextEntry? receivetext = entry as ReceiveTextEntry;
|
||||
|
||||
@@ -803,22 +630,28 @@ internal class ReceiveTextParser : TransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class DiedParser : TransactionParserPart {
|
||||
internal class DiedParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
// Death only matters in ship. On foot you can just redeploy with the dropship.
|
||||
if (context.IsOnFoot) {
|
||||
return;
|
||||
}
|
||||
// You can't complete a combat zone if you die in it. Others might keep it open
|
||||
// for you, but still you will not have completed it unless you jump back in.
|
||||
context.ResetCombatZone();
|
||||
// Dying also moves you back to another instance
|
||||
context.LeftInstance();
|
||||
}
|
||||
}
|
||||
|
||||
internal class DropshipDeployParser : TransactionParserPart {
|
||||
internal class DropshipDeployParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
// On drop ship deploy we are now on foot
|
||||
context.IsOnFoot = true;
|
||||
}
|
||||
}
|
||||
|
||||
internal class CommanderParser : TransactionParserPart {
|
||||
internal class CommanderParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
// A commander entry happens when you log out, and log back in again
|
||||
// for example when switching from Open, to Solo or PG.
|
||||
@@ -828,7 +661,7 @@ internal class CommanderParser : TransactionParserPart {
|
||||
}
|
||||
|
||||
public class TransactionParser {
|
||||
private static Dictionary<string, TransactionParserPart> ParserParts { get; } = new()
|
||||
private static Dictionary<string, ITransactionParserPart> ParserParts { get; } = new()
|
||||
{
|
||||
{ Events.CapShipBond, new CapShipBondParser() },
|
||||
{ Events.Commander, new CommanderParser() },
|
||||
@@ -857,6 +690,7 @@ public class TransactionParser {
|
||||
{ Events.SellOrganicData, new SellOrganicDataParser() },
|
||||
{ Events.ShipTargeted, new ShipTargetedParser() },
|
||||
{ Events.Shutdown, new ShutdownParser() },
|
||||
{ Events.SupercruiseDestinationDrop, new SupercruiseDestinationDropParser() },
|
||||
{ Events.SupercruiseEntry, new SupercruiseEntryParser() },
|
||||
};
|
||||
|
||||
@@ -894,7 +728,7 @@ public class TransactionParser {
|
||||
continue;
|
||||
}
|
||||
|
||||
TransactionParserPart transactionParserPart = ParserParts[entry.Event];
|
||||
ITransactionParserPart transactionParserPart = ParserParts[entry.Event];
|
||||
transactionParserPart.Parse(entry, context, options, transactions);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,13 @@ internal class TransactionParserContext {
|
||||
/// </summary>
|
||||
public bool IsOnFoot { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Type of the current instance after a SupercruiseDestinationDropEntry.
|
||||
/// This is null if there is no current instance, or the current instance
|
||||
/// is not known.
|
||||
/// </summary>
|
||||
public string? CurrentInstanceType { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Last faction that awarded the player with combat bonds.
|
||||
/// </summary>
|
||||
@@ -44,9 +51,11 @@ internal class TransactionParserContext {
|
||||
public ulong? HighestCombatBond { get; set; }
|
||||
|
||||
public bool HaveSeenCapShip { get; set; } = false;
|
||||
public bool HaveSeenCaptain { get; set; } = false;
|
||||
public bool HaveSeenAlliedCaptain { get; set; } = false;
|
||||
public bool HaveSeenEnemyCaptain { get; set; } = false;
|
||||
public bool HaveSeenSpecOps { get; set; } = false;
|
||||
public bool HaveSeenCorrespondent { get; set; } = false;
|
||||
public bool HaveSeenAlliedCorrespondent { get; set; } = false;
|
||||
public bool HaveSeenEnemyCorrespondent { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the current session is legacy
|
||||
@@ -100,6 +109,14 @@ internal class TransactionParserContext {
|
||||
/// </summary>
|
||||
public Dictionary<string, long> BuyCost = new();
|
||||
|
||||
/// <summary>
|
||||
/// Called when the player leaves an instance, either through logout, FSD jump or
|
||||
/// supercruise instance.
|
||||
/// </summary>
|
||||
public void LeftInstance() {
|
||||
CurrentInstanceType = null;
|
||||
}
|
||||
|
||||
public void DiscernCombatZone(TransactionList transactions, Entry e) {
|
||||
string? grade = CombatZones.DifficultyLow;
|
||||
string cztype;
|
||||
@@ -108,7 +125,8 @@ internal class TransactionParserContext {
|
||||
|
||||
if (HighestCombatBond == null &&
|
||||
LastRecordedAwardingFaction == null &&
|
||||
HaveSeenAXWarzoneNPC == false) {
|
||||
HaveSeenAXWarzoneNPC == false &&
|
||||
CurrentInstanceType == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -123,6 +141,47 @@ internal class TransactionParserContext {
|
||||
} else {
|
||||
grade = CombatZones.DifficultyLow;
|
||||
}
|
||||
} else if (CurrentInstanceType != null) {
|
||||
if (!Instances.IsWarzone(CurrentInstanceType)) {
|
||||
return;
|
||||
}
|
||||
if (LastRecordedAwardingFaction == null &&
|
||||
Instances.IsHumanWarzone(CurrentInstanceType)) {
|
||||
transactions.AddIncomplete(new CombatZone(),
|
||||
"Could not discern for whom you fought for, " +
|
||||
"as it seems you haven't killed anyone in the ship combat zone.",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
// If we have information about the current instance being a warship use that
|
||||
// information to determine the warzone.
|
||||
if (Instances.IsInstance(CurrentInstanceType, Instances.WarzoneLow)) {
|
||||
cztype = CombatZones.ShipCombatZone;
|
||||
grade = CombatZones.DifficultyLow;
|
||||
} else if (Instances.IsInstance(CurrentInstanceType, Instances.WarzoneMedium)) {
|
||||
cztype = CombatZones.ShipCombatZone;
|
||||
grade = CombatZones.DifficultyMedium;
|
||||
} else if (Instances.IsInstance(CurrentInstanceType, Instances.WarzoneHigh)) {
|
||||
cztype = CombatZones.ShipCombatZone;
|
||||
grade = CombatZones.DifficultyHigh;
|
||||
} else if (Instances.IsInstance(CurrentInstanceType, Instances.WarzoneThargoidLow)) {
|
||||
cztype = CombatZones.AXCombatZone;
|
||||
grade = CombatZones.DifficultyLow;
|
||||
} else if (Instances.IsInstance(CurrentInstanceType, Instances.WarzoneThargoidMedium)) {
|
||||
cztype = CombatZones.AXCombatZone;
|
||||
grade = CombatZones.DifficultyMedium;
|
||||
} else if (Instances.IsInstance(CurrentInstanceType, Instances.WarzoneThargoidHigh)) {
|
||||
cztype = CombatZones.AXCombatZone;
|
||||
grade = CombatZones.DifficultyHigh;
|
||||
} else if (Instances.IsInstance(CurrentInstanceType, Instances.WarzoneThargoidVeryHigh)) {
|
||||
cztype = CombatZones.AXCombatZone;
|
||||
grade = CombatZones.DifficultyVeryHigh;
|
||||
} else {
|
||||
transactions.AddIncomplete(new CombatZone(),
|
||||
"Unknown conflict zone difficulty",
|
||||
e);
|
||||
return;
|
||||
}
|
||||
} else if (ShipKills > 0 && !IsOnFoot) {
|
||||
// Ship combat zones can be identified by the amount of kills
|
||||
if (ShipKills > 20) {
|
||||
@@ -135,10 +194,14 @@ internal class TransactionParserContext {
|
||||
if (HaveSeenCapShip) {
|
||||
grade = CombatZones.DifficultyHigh;
|
||||
} else {
|
||||
int warzoneNpcs = new List<bool>() { HaveSeenCaptain, HaveSeenCorrespondent, HaveSeenSpecOps }
|
||||
.Where(x => x == true)
|
||||
.Count()
|
||||
;
|
||||
int warzoneNpcs = new List<bool>() {
|
||||
HaveSeenEnemyCaptain,
|
||||
HaveSeenEnemyCorrespondent,
|
||||
HaveSeenSpecOps
|
||||
}
|
||||
.Where(x => x == true)
|
||||
.Count()
|
||||
;
|
||||
|
||||
if (warzoneNpcs >= 1 && grade == CombatZones.DifficultyLow) {
|
||||
grade = CombatZones.DifficultyMedium;
|
||||
@@ -165,8 +228,10 @@ internal class TransactionParserContext {
|
||||
// Sad truth is, if HaveSeenXXX is false, we just don't know for certain
|
||||
CapitalShip = HaveSeenCapShip ? true : null,
|
||||
SpecOps = HaveSeenSpecOps ? true : null,
|
||||
Correspondent = HaveSeenCorrespondent ? true : null,
|
||||
Captain = HaveSeenCaptain ? true : null,
|
||||
EnemyCorrespondent = HaveSeenEnemyCorrespondent ? true : null,
|
||||
AlliedCorrespondent = HaveSeenAlliedCorrespondent ? true : null,
|
||||
EnemyCaptain = HaveSeenEnemyCaptain ? true : null,
|
||||
AlliedCaptain = HaveSeenAlliedCaptain ? true : null,
|
||||
};
|
||||
zone.Entries.Add(e);
|
||||
transactions.Add(zone);
|
||||
@@ -189,8 +254,10 @@ internal class TransactionParserContext {
|
||||
public void ResetCombatZone() {
|
||||
HighestCombatBond = null;
|
||||
HaveSeenCapShip = false;
|
||||
HaveSeenCaptain = false;
|
||||
HaveSeenCorrespondent = false;
|
||||
HaveSeenAlliedCaptain = false;
|
||||
HaveSeenEnemyCaptain = false;
|
||||
HaveSeenAlliedCorrespondent = false;
|
||||
HaveSeenEnemyCorrespondent = false;
|
||||
HaveSeenSpecOps = false;
|
||||
LastRecordedAwardingFaction = null;
|
||||
OnFootKills = 0;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace EDPlayerJournal.BGS;
|
||||
|
||||
internal interface TransactionParserPart {
|
||||
internal interface ITransactionParserPart {
|
||||
/// <summary>
|
||||
/// Parse a given entry of the entry type specified when declaring to implement this
|
||||
/// interface. You must add your transaction to the passed list in case you did have
|
||||
|
||||
@@ -13,16 +13,6 @@ 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) {
|
||||
|
||||
@@ -52,8 +52,9 @@ public class EnglishMissionNames {
|
||||
{"Mission_Delivery_Retreat_name", "Delivery (Retreat)"},
|
||||
{"Mission_DeliveryWing_name", "Delivery (Wing)"},
|
||||
{"Mission_DeliveryWing_War_name", "Delivery (Wing) (War)"},
|
||||
{"MISSION_Disable_name", "Disable Surface Installation" },
|
||||
{"Mission_Disable_BLOPS_Expansion_name", "Disable Surface Installation (Expansion) (Black Ops)" },
|
||||
{"MISSION_Disable_BLOPS_name", "Disable Surface Installation (Black Ops)" },
|
||||
{"MISSION_Disable_name", "Disable Surface Installation" },
|
||||
{"MISSION_Hack_name", "Hack Surface Installation" },
|
||||
{"Mission_Hack_BLOPS_Boom_name", "Hack Surface Installation (Boom)"},
|
||||
{"Mission_Hack_BLOPS_Elections_name", "Hack Surface Installation (Elections)"},
|
||||
@@ -106,6 +107,7 @@ public class EnglishMissionNames {
|
||||
{"Mission_Rescue_Elections_name", "Liberate Hostages (Election)" },
|
||||
{"Mission_Rescue_name", "Liberate Hostages" },
|
||||
{"Mission_Rescue_Planet_Expansion_name", "Planet Rescue (Expansion)" },
|
||||
{"Mission_Rescue_Planet_Retreat_name", "Planet Rescue (Retreat)" },
|
||||
{"Mission_Rescue_Planet_name", "Planet Rescue"},
|
||||
{"MISSION_Salvage_CivilUnrest_name", "Salvage (Civil Unrest)"},
|
||||
{"MISSION_Salvage_Expansion_name", "Salvage (Expansion)"},
|
||||
@@ -127,6 +129,9 @@ public class EnglishMissionNames {
|
||||
{"Mission_TW_Massacre_Medusa_Plural_name", "Kill Medusas" },
|
||||
{"Mission_TW_Massacre_Medusa_Singular_name", "Kill Medusa" },
|
||||
{"Mission_TW_Massacre_Scout_Plural_name", "Kill Scouts" },
|
||||
{"Mission_TW_OnFoot_Reboot_Occupied_MB_name", "Reboot Settlement (Thargoid)" },
|
||||
{"Mission_TW_OnFoot_Reboot_NR_name", "Reboot Settlement (Thargoid)" },
|
||||
{"Mission_TW_OnFoot_Reboot_MB_name", "Reboot Settlement (Thargoid)" },
|
||||
{"Mission_TW_PassengerEvacuation_Burning_name", "Passenger Evacuation (Significant Damage)" },
|
||||
{"Mission_TW_PassengerEvacuation_UnderAttack_name", "Passenger Evacuation (Thargoid Invasion)" },
|
||||
{"Mission_TW_Rescue_UnderAttack_name", "Rescue (Thargoid Attack)" },
|
||||
|
||||
@@ -44,6 +44,7 @@ public class Entry {
|
||||
{ Events.SellOrganicData, typeof(SellOrganicDataEntry) },
|
||||
{ Events.ShieldState, typeof(ShieldStateEntry) },
|
||||
{ Events.ShipTargeted, typeof(ShipTargetedEntry) },
|
||||
{ Events.SupercruiseDestinationDrop, typeof(SupercruiseDestinationDropEntry) },
|
||||
{ Events.SupercruiseEntry, typeof(SupercruiseEntryEntry) },
|
||||
{ Events.SupercruiseExit, typeof(SupercruiseExitEntry) },
|
||||
{ Events.UnderAttack, typeof(UnderAttackEntry) },
|
||||
|
||||
@@ -35,6 +35,7 @@ public class Events {
|
||||
public static readonly string ShieldState = "ShieldState";
|
||||
public static readonly string ShipTargeted = "ShipTargeted";
|
||||
public static readonly string Shutdown = "Shutdown";
|
||||
public static readonly string SupercruiseDestinationDrop = "SupercruiseDestinationDrop";
|
||||
public static readonly string SupercruiseEntry = "SupercruiseEntry";
|
||||
public static readonly string SupercruiseExit = "SupercruiseExit";
|
||||
public static readonly string UnderAttack = "UnderAttack";
|
||||
|
||||
30
EDPlayerJournal/Entries/SupercruiseDestinationDropEntry.cs
Normal file
30
EDPlayerJournal/Entries/SupercruiseDestinationDropEntry.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace EDPlayerJournal.Entries;
|
||||
|
||||
public class SupercruiseDestinationDropEntry : Entry {
|
||||
/// <summary>
|
||||
/// Destination type, internal string.
|
||||
/// </summary>
|
||||
public string? Type { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Destination type, localised string.
|
||||
/// </summary>
|
||||
public string? TypeLocalised { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Threat of the destination, if known.
|
||||
/// </summary>
|
||||
public long? Threat { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Market ID if it has one.
|
||||
/// </summary>
|
||||
public ulong? MarketID { get; set; } = null;
|
||||
|
||||
protected override void Initialise() {
|
||||
Type = JSON.Value<string>("Type");
|
||||
TypeLocalised = JSON.Value<string>("Type_Localised");
|
||||
Threat = JSON.Value<long?>("Threat");
|
||||
MarketID = JSON.Value<ulong?>("MarketID");
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,11 @@ public class Factions {
|
||||
/// </summary>
|
||||
public static string Thargoid = "Thargoids";
|
||||
|
||||
/// <summary>
|
||||
/// The faction the fleet carriers use.
|
||||
/// </summary>
|
||||
public static string FleetCarrier = "FleetCarrier";
|
||||
|
||||
public static bool IsPilotsFederation(string? name) {
|
||||
if (name == null) {
|
||||
return false;
|
||||
|
||||
73
EDPlayerJournal/Instances.cs
Normal file
73
EDPlayerJournal/Instances.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
namespace EDPlayerJournal;
|
||||
|
||||
/// <summary>
|
||||
/// Contains information regarding instances you can supercruise into,
|
||||
/// such as combat zones, installations and megaship scenarios.
|
||||
/// </summary>
|
||||
public class Instances {
|
||||
/// <summary>
|
||||
/// Low ship combat zone
|
||||
/// </summary>
|
||||
public static readonly string WarzoneLow = "$Warzone_PointRace_Low";
|
||||
/// <summary>
|
||||
/// Medium ship combat zone
|
||||
/// </summary>
|
||||
public static readonly string WarzoneMedium = "$Warzone_PointRace_Med";
|
||||
/// <summary>
|
||||
/// High ship combat zone.
|
||||
/// </summary>
|
||||
public static readonly string WarzoneHigh = "$Warzone_PointRace_High";
|
||||
|
||||
/// <summary>
|
||||
/// Low Thargoid combat zone
|
||||
/// </summary>
|
||||
public static readonly string WarzoneThargoidLow = "$Warzone_TG_Low";
|
||||
/// <summary>
|
||||
/// Medium Thargoid combat zone
|
||||
/// </summary>
|
||||
public static readonly string WarzoneThargoidMedium = "$Warzone_TG_Med";
|
||||
/// <summary>
|
||||
/// High Thargoid combat zone
|
||||
/// </summary>
|
||||
public static readonly string WarzoneThargoidHigh = "$Warzone_TG_High";
|
||||
/// <summary>
|
||||
/// Very High Thargoid combat zone
|
||||
/// </summary>
|
||||
public static readonly string WarzoneThargoidVeryHigh = "$Warzone_TG_VeryHigh";
|
||||
|
||||
public static bool IsThargoidWarzone(string type) {
|
||||
return
|
||||
IsInstance(type, WarzoneThargoidLow) ||
|
||||
IsInstance(type, WarzoneThargoidMedium) ||
|
||||
IsInstance(type, WarzoneThargoidHigh) ||
|
||||
IsInstance(type, WarzoneThargoidVeryHigh)
|
||||
;
|
||||
}
|
||||
|
||||
public static bool IsHumanWarzone(string type) {
|
||||
return
|
||||
IsInstance(type, WarzoneLow) ||
|
||||
IsInstance(type, WarzoneMedium) ||
|
||||
IsInstance(type, WarzoneHigh)
|
||||
;
|
||||
}
|
||||
|
||||
public static bool IsWarzone(string type) {
|
||||
return IsHumanWarzone(type) || IsThargoidWarzone(type);
|
||||
}
|
||||
|
||||
public static bool IsInstance(string type, string instance) {
|
||||
if (string.IsNullOrEmpty(type) || string.IsNullOrEmpty(instance)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Instance names are split by a semi colon, with the remainder being
|
||||
// additional info to such as index.
|
||||
string[] parts = type.Split(":");
|
||||
if (!parts[0].StartsWith("$")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return string.Compare(parts[0], instance, true) == 0;
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,11 @@ public enum ThargoidVessel {
|
||||
Basilisk = 4,
|
||||
Medusa = 5,
|
||||
Hydra = 6,
|
||||
Glaive = 7,
|
||||
/// <summary>
|
||||
/// Thargoid drone
|
||||
/// </summary>
|
||||
Revenant = 8,
|
||||
}
|
||||
|
||||
public class Thargoid {
|
||||
@@ -15,8 +20,11 @@ public class Thargoid {
|
||||
|
||||
public static Dictionary<ulong, ThargoidVessel> VesselPayout { get; } = new() {
|
||||
// Up to date values ever since 14.02
|
||||
{ 25000, ThargoidVessel.Revenant },
|
||||
{ 65000, ThargoidVessel.Scout },
|
||||
{ 75000, ThargoidVessel.Scout },
|
||||
// New in Update 15
|
||||
{ 4500000, ThargoidVessel.Glaive },
|
||||
{ 6500000, ThargoidVessel.Cyclops },
|
||||
{ 20000000, ThargoidVessel.Basilisk },
|
||||
//{ 25000000, ThargoidVessel.Orthrus },
|
||||
@@ -39,12 +47,14 @@ public class Thargoid {
|
||||
|
||||
public static Dictionary<ThargoidVessel, string?> VesselNames { get; } = new() {
|
||||
{ ThargoidVessel.Unknown, null },
|
||||
{ ThargoidVessel.Scout, "Thargoid Scout" },
|
||||
{ ThargoidVessel.Revenant, "Revenant" },
|
||||
{ ThargoidVessel.Scout, "Scout" },
|
||||
{ ThargoidVessel.Orthrus, "Orthrus" },
|
||||
{ ThargoidVessel.Cyclops, "Cyclops" },
|
||||
{ ThargoidVessel.Basilisk, "Basilisk" },
|
||||
{ ThargoidVessel.Medusa, "Medusa" },
|
||||
{ ThargoidVessel.Hydra, "Hydra" },
|
||||
{ ThargoidVessel.Glaive, "Glaive" },
|
||||
};
|
||||
|
||||
public static ThargoidVessel GetVesselByPayout(ulong payout) {
|
||||
|
||||
@@ -3,6 +3,8 @@ using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using EliteBGS.LogGenerator;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace EliteBGS;
|
||||
|
||||
@@ -23,6 +25,41 @@ public class DiscordLogGenerator {
|
||||
new SearchAndRescueFormat(),
|
||||
};
|
||||
|
||||
protected virtual string GetToolVersion() {
|
||||
Version v = Assembly.GetCallingAssembly().GetName().Version;
|
||||
string ver;
|
||||
if (v == null) {
|
||||
ver = "v?.?.?";
|
||||
} else {
|
||||
ver = "v" + v.ToString(3);
|
||||
}
|
||||
return string.Format("EliteBGS {0}", ver);
|
||||
}
|
||||
|
||||
protected virtual DateTime? GetDateOfEarliestEntry(Objective objective) {
|
||||
var it = objective
|
||||
.Transactions
|
||||
.OrderBy(x => x.CompletedAtDateTime)
|
||||
.FirstOrDefault()
|
||||
;
|
||||
if (it != null) {
|
||||
return it.CompletedAtDateTime;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected virtual DateTime? GetDateOfLatestEntry(Objective objective) {
|
||||
var it = objective
|
||||
.Transactions
|
||||
.OrderByDescending(x => x.CompletedAtDateTime)
|
||||
.FirstOrDefault()
|
||||
;
|
||||
if (it != null) {
|
||||
return it.CompletedAtDateTime;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected virtual string GenerateSummary(Objective objective) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -76,7 +113,18 @@ public class DiscordLogGenerator {
|
||||
|
||||
string summary = GenerateSummary(objective);
|
||||
|
||||
log.AppendFormat("**Date:** {0}\n", DateTime.Now.ToString("dd/MM/yyyy"));
|
||||
log.AppendFormat("**Log Generated:** {0} by {1}\n",
|
||||
DateTime.Now.ToString("dd/MM/yyyy"),
|
||||
GetToolVersion()
|
||||
);
|
||||
var earliest = GetDateOfEarliestEntry(objective);
|
||||
var latest = GetDateOfLatestEntry(objective);
|
||||
if (earliest != null && latest != null) {
|
||||
log.AppendFormat("**Date:** {0} - {1}\n",
|
||||
GetDateOfEarliestEntry(objective),
|
||||
GetDateOfLatestEntry(objective)
|
||||
);
|
||||
}
|
||||
log.AppendFormat("**Target:** {0}\n", location);
|
||||
if (!string.IsNullOrEmpty(summary)) {
|
||||
log.AppendFormat("**Summary**: {0}\n", summary);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<Version>0.3.2</Version>
|
||||
<Version>0.3.4</Version>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<UseWPF>true</UseWPF>
|
||||
|
||||
@@ -12,6 +12,6 @@ public class MarketBuyFormat : GenericFormat<BuyCargo> {
|
||||
if (tons <= 0) {
|
||||
return "";
|
||||
}
|
||||
return string.Format("Bought: {0}t bought", tons);
|
||||
return string.Format("Bought: {0}t", tons);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using EDPlayerJournal.BGS;
|
||||
using System.Collections.Generic;
|
||||
using EDPlayerJournal;
|
||||
using EDPlayerJournal.BGS;
|
||||
using System.Text;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using EDPlayerJournal;
|
||||
|
||||
namespace EliteBGS.LogGenerator;
|
||||
|
||||
@@ -36,14 +34,14 @@ public class MurderFormat : LogFormatter {
|
||||
type = "person";
|
||||
}
|
||||
}
|
||||
builder.AppendFormat("Murdered {0} {1} (Bounties: {2}, Fines: {3})",
|
||||
long bounties = log.Value.Sum(x => x.Bounties);
|
||||
builder.AppendFormat("Murdered {0} {1} (Bounties: {2})\n",
|
||||
log.Value.Count, type,
|
||||
log.Value.Sum(x => x.Bounties),
|
||||
log.Value.Sum(x => x.Fines)
|
||||
Credits.FormatMillions(bounties)
|
||||
);
|
||||
}
|
||||
|
||||
return builder.ToString();
|
||||
return builder.ToString().Trim();
|
||||
}
|
||||
|
||||
public string GenerateSummary(Objective objective) {
|
||||
|
||||
@@ -37,8 +37,9 @@ public class ThargoidFormatter : LogFormatter {
|
||||
return "";
|
||||
}
|
||||
|
||||
int drones = kills.Where(x => x.ThargoidType == ThargoidVessel.Revenant).Count();
|
||||
int scouts = kills.Where(x => x.ThargoidType == ThargoidVessel.Scout).Count();
|
||||
int interceptors = kills.Count - scouts;
|
||||
int interceptors = kills.Count - scouts - drones;
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
@@ -48,10 +49,16 @@ public class ThargoidFormatter : LogFormatter {
|
||||
}
|
||||
if (scouts > 0) {
|
||||
if (interceptors > 0) {
|
||||
builder.Append(" + ");
|
||||
builder.Append(", ");
|
||||
}
|
||||
builder.AppendFormat("{0} SCT", scouts);
|
||||
}
|
||||
if (drones > 0) {
|
||||
if (interceptors > 0 || scouts > 0) {
|
||||
builder.Append(", ");
|
||||
}
|
||||
builder.AppendFormat("{0} DRN", drones);
|
||||
}
|
||||
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
@@ -120,8 +120,10 @@
|
||||
<Expander Header="Optional Objectives" Visibility="{Binding IsShipCombatZone}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<ToggleButton x:Name="CapitalShip" Margin="2,0,2,0" Content="Capital Ship" IsChecked="{Binding HasCapitalShip, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="Captain" Margin="2,0,2,0" Content="Captain" IsChecked="{Binding HasCaptain, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="Correspondent" Margin="2,0,2,0" Content="Correspondent" IsChecked="{Binding HasCorrespondent, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="AlliedCaptain" Margin="2,0,2,0" Content="Allied Captain" IsChecked="{Binding HasAlliedCaptain, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="EnemyCaptain" Margin="2,0,2,0" Content="Enemy Captain" IsChecked="{Binding HasEnemyCaptain, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="AlliedCorrespondent" Margin="2,0,2,0" Content="Allied Correspondent" IsChecked="{Binding HasAlliedCorrespondent, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="EnemyCorrespondent" Margin="2,0,2,0" Content="Enemy Correspondent" IsChecked="{Binding HasEnemyCorrespondent, Mode=TwoWay}" IsThreeState="False"/>
|
||||
<ToggleButton x:Name="SpecOps" Margin="2,0,2,0" Content="Spec Ops" IsChecked="{Binding HasSpecOps, Mode=TwoWay}" IsThreeState="False"/>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
@@ -182,10 +184,13 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="Location on disk for the player journal. There is usually no need to change this setting." Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.08,0.496"/>
|
||||
<TextBox x:Name="journallocation" IsReadOnly="true" Text="" Grid.Row="1" Grid.Column="0" Margin="5,0,5,10" TextWrapping="Wrap" />
|
||||
<Button x:Name="browsejournallocation" Content="Browse" Grid.Row="1" Grid.Column="1" Margin="0,0,0,0" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Left" Click="browsejournallocation_Click"/>
|
||||
<Button x:Name="OpenInExplorer" Content="Open Folder" Grid.Row="1" Grid.Column="2" Margin="5,0,0,0" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Left" Click="OpenInExplorer_Click" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="Theme Colour" Height="Auto" Grid.Row="1" VerticalAlignment="Top" Width="Auto" Grid.ColumnSpan="3" Margin="0,5,0,0">
|
||||
@@ -213,9 +218,9 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<mah:ToggleSwitch x:Name="NoInfluenceSupport" Grid.Row="1" Grid.ColumnSpan="2" Content="Ignore secondary influence support given out by certain missions" Toggled="NoInfluenceSupport_Toggled"/>
|
||||
<mah:ToggleSwitch x:Name="NoMarketBuy" Grid.Row="2" Grid.ColumnSpan="2" Content="Ignore commodities bought at stations" Toggled="NoMarketBuy_Toggled"/>
|
||||
|
||||
<mah:ToggleSwitch x:Name="NoInfluenceSupport" Grid.Row="0" Grid.ColumnSpan="2" Content="Ignore secondary influence support given out by certain missions" Toggled="NoInfluenceSupport_Toggled"/>
|
||||
<mah:ToggleSwitch x:Name="NoMarketBuy" Grid.Row="1" Grid.ColumnSpan="2" Content="Ignore commodities bought at stations" Toggled="NoMarketBuy_Toggled"/>
|
||||
<mah:ToggleSwitch x:Name="NoFleetCarrier" Grid.Row="2" Grid.ColumnSpan="2" Content="Ignore transactions done on a Fleet Carrier" Toggled="NoFleetCarrier_Toggled" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
@@ -60,6 +60,7 @@ public partial class MainWindow : MetroWindow {
|
||||
|
||||
this.NoInfluenceSupport.IsOn = Config.Global.IgnoreInfluenceSupport;
|
||||
this.NoMarketBuy.IsOn = Config.Global.IgnoreMarketBuy;
|
||||
this.NoFleetCarrier.IsOn = Config.Global.IgnoreFleetCarrier;
|
||||
|
||||
// Apply theme
|
||||
try {
|
||||
@@ -173,6 +174,7 @@ public partial class MainWindow : MetroWindow {
|
||||
|
||||
options.IgnoreInfluenceSupport = Config.Global.IgnoreInfluenceSupport;
|
||||
options.IgnoreMarketBuy = Config.Global.IgnoreMarketBuy;
|
||||
options.IgnoreFleetCarrierFaction = Config.Global.IgnoreFleetCarrier;
|
||||
|
||||
List<Transaction> transactions = parser.Parse(entries, options);
|
||||
|
||||
@@ -536,4 +538,17 @@ public partial class MainWindow : MetroWindow {
|
||||
private void NoMarketBuy_Toggled(object sender, RoutedEventArgs e) {
|
||||
Config.Global.IgnoreMarketBuy = this.NoMarketBuy.IsOn;
|
||||
}
|
||||
|
||||
private void NoFleetCarrier_Toggled(object sender, RoutedEventArgs e) {
|
||||
Config.Global.IgnoreFleetCarrier = this.NoFleetCarrier.IsOn;
|
||||
}
|
||||
|
||||
private void OpenInExplorer_Click(object sender, RoutedEventArgs e) {
|
||||
try {
|
||||
Process.Start(new ProcessStartInfo(Config.Global.JournalLocation) {
|
||||
UseShellExecute = true,
|
||||
});
|
||||
} catch (Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,14 +120,14 @@ public class UITransaction : INotifyPropertyChanged {
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasCaptain {
|
||||
public bool HasEnemyCaptain {
|
||||
get {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return combat.Captain ?? false;
|
||||
return combat.EnemyCaptain ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
@@ -135,18 +135,18 @@ public class UITransaction : INotifyPropertyChanged {
|
||||
return;
|
||||
}
|
||||
|
||||
combat.Captain = value;
|
||||
combat.EnemyCaptain = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasCorrespondent {
|
||||
public bool HasAlliedCaptain {
|
||||
get {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return combat.Correspondent ?? false;
|
||||
return combat.AlliedCaptain ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
@@ -154,7 +154,45 @@ public class UITransaction : INotifyPropertyChanged {
|
||||
return;
|
||||
}
|
||||
|
||||
combat.Correspondent = value;
|
||||
combat.AlliedCaptain = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasEnemyCorrespondent {
|
||||
get {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return combat.EnemyCorrespondent ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
combat.EnemyCorrespondent = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasAlliedCorrespondent {
|
||||
get {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return combat.AlliedCorrespondent ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
combat.AlliedCorrespondent = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,5 +51,5 @@ using System.Windows;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.1.1.0")]
|
||||
[assembly: AssemblyFileVersion("0.1.1.0")]
|
||||
[assembly: AssemblyVersion("0.3.4.0")]
|
||||
[assembly: AssemblyFileVersion("0.3.4.0")]
|
||||
|
||||
@@ -58,6 +58,11 @@ namespace EliteBGS.Util {
|
||||
/// </summary>
|
||||
public bool IgnoreMarketBuy { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to ignore fleet carrier stuff when parsing.
|
||||
/// </summary>
|
||||
public bool IgnoreFleetCarrier { get; set; } = true;
|
||||
|
||||
[JsonIgnore]
|
||||
public string FullTheme {
|
||||
get { return Theme + "." + Colour; }
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# EliteBGS changelog
|
||||
|
||||
## 0.3.4 on 18.06.2023
|
||||
|
||||
* Added possibility to specify allied, as well as enemy captain and correspondent.
|
||||
* Added date range, and tool version to standard log format.
|
||||
* Added new English mission names.
|
||||
|
||||
## 0.3.3 on 15.05.2023
|
||||
|
||||
* Added payout for the Thargoid Glaive.
|
||||
* Added payout and support for the Thargoid Revenant.
|
||||
* Added more English mission names.
|
||||
* Ship and AX combat zones can now be detected through a new event, which
|
||||
allows the tool to properly determine the difficulty. Combat zone outcome,
|
||||
additional objectives, or the name of the factions fighting are still guess
|
||||
work however.
|
||||
* Fixed a bug where newly added factions to a system weren't properly
|
||||
recognised. Thanks to Shakaka.
|
||||
* Added option to ignore FleetCarrier actions.
|
||||
* Added an "Open in Explorer" button to journal locations.
|
||||
|
||||
## 0.3.2 on 19.04.2023
|
||||
|
||||
* Orthrus payout has been adapted to 14.02 values.
|
||||
|
||||
@@ -68,6 +68,9 @@ The time span you specify must include the day where you accepted the mission,
|
||||
as well as the day where you failed the mission. Otherwise the tool cannot handle
|
||||
that failed mission.
|
||||
|
||||
Prior to update 15 missions only failed once you dismissed them from your transaction
|
||||
tab. With update 15, this behaviour should be fixed.
|
||||
|
||||
### The tool complains about missing factions for an NPC I murdered.
|
||||
|
||||
The player journal only tells the faction that issued the bounty upon murder, and
|
||||
|
||||
@@ -20,13 +20,13 @@ command line:
|
||||
winget install Microsoft.DotNet.DesktopRuntime.7
|
||||
```
|
||||
|
||||
You can download the **latest** version **0.3.2** at CodeBerg:
|
||||
You can download the **latest** version **0.3.4** at CodeBerg:
|
||||
|
||||
* [https://codeberg.org/nola/EDBGS/releases](https://codeberg.org/nola/EDBGS/releases)
|
||||
|
||||
Or alternatively from my server:
|
||||
|
||||
* [https://bgs.n0la.org/elitebgs-0.3.2.zip](https://bgs.n0la.org/elitebgs-0.3.2.zip)
|
||||
* [https://bgs.n0la.org/elitebgs-0.3.4.zip](https://bgs.n0la.org/elitebgs-0.3.4.zip)
|
||||
|
||||
## Old Versions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user