2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 08:23:42 -04:00

Fix issues with Journal handling

Implement basic database
Handle startup events
only send events after the most recent LoadGame
This commit is contained in:
2024-05-25 16:17:36 +10:00
parent efd0b3e0c0
commit 579b2b115d
24 changed files with 571 additions and 102 deletions

View File

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;
using DateTimeOffset = System.DateTimeOffset;
@ -275,6 +276,7 @@ using Travel;
public abstract class JournalBase
{
[JsonPropertyName("timestamp")]
[Key]
public DateTimeOffset Timestamp { get; init; }
/// <summary>

View File

@ -15,7 +15,7 @@ public class LoadGame : JournalBase
public bool StartLanded { get; init; }
public bool StartDead { get; init; }
public string GameMode { get; init; }
public string Group { get; init; }
public string? Group { get; init; }
public long Credits { get; init; }
public long Loan { get; init; }
public string ShipName { get; init; }

View File

@ -14,7 +14,7 @@ public class Statistics : JournalBase
public Trading Trading { get; init; }
public Mining Mining { get; init; }
public ParameterTypes.Exploration Exploration { get; init; }
public Passengers Passengers { get; init; }
public ParameterTypes.Passengers Passengers { get; init; }
[JsonPropertyName("Search_And_Rescue")]
public ParameterTypes.SearchAndRescue SearchAndRescue { get; init; }
public Crafting Crafting { get; init; }