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

Add Startup Events to Database

Now emit startup events on conneciton
Some events still to add
This commit is contained in:
2024-05-25 19:41:38 +10:00
parent 579b2b115d
commit 68eff73dbd
80 changed files with 586 additions and 229 deletions

View File

@ -71,7 +71,7 @@ public class CodexEntry : JournalBase
/// <summary>
/// List of trais of the scanned item.
/// </summary>
public ImmutableList<string> Traits { get; init; }
public ICollection<string> Traits { get; init; }
/// <summary>
/// Value of the codex entry when sold to Universal Cartographics.
/// </summary>

View File

@ -12,7 +12,7 @@ public class MultiSellExplorationData : JournalBase
/// <summary>
/// List of all sold first discoveries.
/// </summary>
public ImmutableList<Discovered> Discovered { get; init; }
public IReadOnlyCollection<Discovered> Discovered { get; init; }
/// <summary>
/// Base value of total sold data.
/// </summary>

View File

@ -23,11 +23,11 @@ public class SAAScanComplete : JournalBase
/// <summary>
/// This property is indicated with strikethrough in Frontier's documentation and is likely unused.
/// </summary>
public ImmutableList<string> Discoverers { get; init; }
public ICollection<string> Discoverers { get; init; }
/// <summary>
/// This property is indicated with strikethrough in Frontier's documentation and is likely unused.
/// </summary>
public ImmutableList<string> Mappers { get; init; }
public ICollection<string> Mappers { get; init; }
/// <summary>
/// Number of probes fired to complete the surface scan.
/// </summary>

View File

@ -24,9 +24,9 @@ public class SAASignalsFound : JournalBase
/// <summary>
/// List of signals found.
/// </summary>
public ImmutableList<Signal> Signals { get; init; }
public IReadOnlyCollection<Signal> Signals { get; init; }
/// <summary>
/// List of genuses present.
/// </summary>
public ImmutableList<GenusType> Genuses { get; init; }
public IReadOnlyCollection<GenusType> Genuses { get; init; }
}

View File

@ -22,7 +22,7 @@ public class Scan : ScanBaryCentre
/// <summary>
/// List which reflects Frontier's JSON structure for the "Parents" object. Use of Parent property is recommended instead.
/// </summary>
public ImmutableList<Parent> Parents {
public IReadOnlyCollection<Parent> Parents {
get => _Parents;
init
{
@ -43,15 +43,16 @@ public class Scan : ScanBaryCentre
ParentList.Add((ParentType.Star, parent.Star.GetValueOrDefault(0)));
}
}
Parent = ParentList.ToImmutableList();
}
Parent = ParentList;
}
}
/// <summary>
/// "Parents" object rearranged into more intuitive structure for ease of use.
/// </summary>
[JsonIgnore]
public ImmutableList<(ParentType ParentType, int Body)> Parent { get; init; }
private ImmutableList<Parent> _Parents;
public IReadOnlyCollection<(ParentType ParentType, int Body)> Parent { get; init; }
private IReadOnlyCollection<Parent> _Parents;
/// <summary>
/// Body distance from system arrival point in light-seconds.
/// </summary>
@ -79,7 +80,7 @@ public class Scan : ScanBaryCentre
/// <summary>
/// List containing full breakdown of atmospheric components and their relative percentages.
/// </summary>
public ImmutableList<MaterialComposition> AtmosphereComposition { get; init; }
public IReadOnlyCollection<MaterialComposition> AtmosphereComposition { get; init; }
/// <summary>
/// Descriptive string for type of volcanism present, or an empty string for none, e.g. "major silicate vapour geysers volcanism".
/// </summary>
@ -112,7 +113,7 @@ public class Scan : ScanBaryCentre
/// List containing full breakdown of prospectable surface materials and their relative percentages.
/// </summary>
[JsonConverter(typeof(MaterialCompositionConverter))]
public ImmutableList<MaterialComposition> Materials { get; init; }
public IReadOnlyCollection<MaterialComposition> Materials { get; init; }
/// <summary>
/// Overall composition of body, expressed as percentages of ice, rock, and metal.
/// </summary>
@ -129,7 +130,7 @@ public class Scan : ScanBaryCentre
/// <summary>
/// List of all planetary or stellar ring systems around the body.
/// </summary>
public ImmutableList<Ring> Rings { get; init; }
public IReadOnlyCollection<Ring> Rings { get; init; }
/// <summary>
/// Description of the minable material abundance.<br/>Possible values inclue "PristineResources", "MajorResources", "CommonResources", "LowResources", and "DepletedResources".
/// </summary>

View File

@ -11,11 +11,11 @@ public class SellExplorationData : JournalBase
/// <summary>
/// List of systems for which data was sold.
/// </summary>
public ImmutableList<string> Systems { get; init; }
public ICollection<string> Systems { get; init; }
/// <summary>
/// List of first discovered bodies.
/// </summary>
public ImmutableList<string> Discovered { get; init; }
public ICollection<string> Discovered { get; init; }
/// <summary>
/// Base value of sold data.
/// </summary>