fix completed at for combat zones
This commit is contained in:
parent
0be9791abc
commit
1da4549e2c
@ -6,13 +6,6 @@ public class CombatZone : Transaction {
|
|||||||
public string Type { get; set; } = "";
|
public string Type { get; set; } = "";
|
||||||
public string Grade { get; set; } = "";
|
public string Grade { get; set; } = "";
|
||||||
public int Amount { get; set; } = 0;
|
public int Amount { get; set; } = 0;
|
||||||
public DateTime Completed { get; set; } = DateTime.UtcNow;
|
|
||||||
|
|
||||||
public override string CompletedAt {
|
|
||||||
get {
|
|
||||||
return Completed.ToString("dd.MM.yyyy HH:mm UTC");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int CompareTo(Transaction? obj) {
|
public override int CompareTo(Transaction? obj) {
|
||||||
if (obj == null || obj.GetType() != typeof(CombatZone)) {
|
if (obj == null || obj.GetType() != typeof(CombatZone)) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using EDPlayerJournal.Entries;
|
using EDPlayerJournal.Entries;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace EDPlayerJournal.BGS;
|
namespace EDPlayerJournal.BGS;
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ internal class TransactionParserContext {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<string, long> BuyCost = new();
|
public Dictionary<string, long> BuyCost = new();
|
||||||
|
|
||||||
public void DiscernCombatZone(TransactionList transactions) {
|
public void DiscernCombatZone(TransactionList transactions, Entry e) {
|
||||||
string grade = "Low";
|
string grade = "Low";
|
||||||
string cztype;
|
string cztype;
|
||||||
ulong? highest = HighestCombatBond;
|
ulong? highest = HighestCombatBond;
|
||||||
@ -86,6 +86,7 @@ internal class TransactionParserContext {
|
|||||||
Type = cztype,
|
Type = cztype,
|
||||||
Amount = 1,
|
Amount = 1,
|
||||||
};
|
};
|
||||||
|
zone.Entries.Add(e);
|
||||||
transactions.Add(zone);
|
transactions.Add(zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,14 +710,14 @@ internal class EmbarkDisembarkParser : TransactionParserPart {
|
|||||||
|
|
||||||
internal class SupercruiseEntryParser : TransactionParserPart {
|
internal class SupercruiseEntryParser : TransactionParserPart {
|
||||||
public void Parse(Entry entry, TransactionParserContext context, TransactionList transactions) {
|
public void Parse(Entry entry, TransactionParserContext context, TransactionList transactions) {
|
||||||
context.DiscernCombatZone(transactions);
|
context.DiscernCombatZone(transactions, entry);
|
||||||
context.ResetCombatZone();
|
context.ResetCombatZone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class ShutdownParser : TransactionParserPart {
|
internal class ShutdownParser : TransactionParserPart {
|
||||||
public void Parse(Entry entry, TransactionParserContext context, TransactionList transactions) {
|
public void Parse(Entry entry, TransactionParserContext context, TransactionList transactions) {
|
||||||
context.DiscernCombatZone(transactions);
|
context.DiscernCombatZone(transactions, entry);
|
||||||
context.ResetCombatZone();
|
context.ResetCombatZone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user