using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EDPlayerJournal.Entries; public class LoadGameEntry : Entry { public string? Commander { get; set; } public string? FID { get; set; } public bool Horizons { get; set; } public bool Odyssey { get; set; } public string? Ship { get; set; } public long ShipID { get; set; } public bool StartLanded { get; set; } public bool StartDead { get; set; } public string? GameMode { get; set; } public string? Group { get; set; } public long Credits { get; set; } public long Loan { get; set; } public string? ShipName { get; set; } public string? ShipIdent { get; set; } public double FuelLevel { get; set; } public double FuelCapacity { get; set; } protected override void Initialise() { Commander = JSON.Value("Commander"); FID = JSON.Value("FID"); // Game Horizons = JSON.Value("Horizons") ?? false; Odyssey = JSON.Value("Odyssey") ?? false; // Ships Ship = JSON.Value("Ship"); ShipID = JSON.Value("ShipID") ?? 0; ShipName = JSON.Value("ShipName"); ShipIdent = JSON.Value("ShipIdent"); // Fuel FuelLevel = JSON.Value("FuelLevel") ?? 0.0; FuelCapacity = JSON.Value("FuelCapacity") ?? 0.0; // Landed/Dead StartLanded = JSON.Value("StartLanded") ?? false; StartDead = JSON.Value("StartDead") ?? false; // GameMode GameMode = JSON.Value("GameMode"); // Group Group = JSON.Value("Group"); // Wealth Credits = JSON.Value("Credits") ?? 0; Loan = JSON.Value("Loan") ?? 0; } }