mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-04-12 06:54:43 -04:00
Nullability Updates
& Add missing file
This commit is contained in:
parent
e33326611a
commit
69593851aa
@ -102,7 +102,7 @@ public class Botanist : IObservatoryWorker
|
|||||||
switch (journal)
|
switch (journal)
|
||||||
{
|
{
|
||||||
case LoadGame loadGame:
|
case LoadGame loadGame:
|
||||||
OdysseyLoaded = loadGame.Odyssey;
|
OdysseyLoaded = loadGame.Odyssey ?? false;
|
||||||
break;
|
break;
|
||||||
case SAASignalsFound signalsFound:
|
case SAASignalsFound signalsFound:
|
||||||
{
|
{
|
||||||
|
@ -5,5 +5,5 @@ public class Commander : JournalBase
|
|||||||
public override string Event => "Commander";
|
public override string Event => "Commander";
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
|
|
||||||
public string FID { get; init; }
|
public string? FID { get; init; }
|
||||||
}
|
}
|
@ -6,26 +6,26 @@ public class LoadGame : JournalBase
|
|||||||
{
|
{
|
||||||
public override string Event => "LoadGame";
|
public override string Event => "LoadGame";
|
||||||
public string Commander { get; init; }
|
public string Commander { get; init; }
|
||||||
public string FID { get; init; }
|
public string? FID { get; init; }
|
||||||
public bool Horizons { get; init; }
|
public bool? Horizons { get; init; }
|
||||||
public bool Odyssey { get; init; }
|
public bool? Odyssey { get; init; }
|
||||||
public string Ship { get; init; }
|
public string? Ship { get; init; }
|
||||||
public string Ship_Localised { get; init; }
|
public string? Ship_Localised { get; init; }
|
||||||
public ulong ShipID { get; init; }
|
public ulong ShipID { get; init; }
|
||||||
public bool StartLanded { get; init; }
|
public bool StartLanded { get; init; }
|
||||||
public bool StartDead { get; init; }
|
public bool StartDead { get; init; }
|
||||||
public string GameMode { get; init; }
|
public string? GameMode { get; init; }
|
||||||
public string? Group { get; init; }
|
public string? Group { get; init; }
|
||||||
public long Credits { get; init; }
|
public long Credits { get; init; }
|
||||||
public long Loan { get; init; }
|
public long Loan { get; init; }
|
||||||
public string ShipName { get; init; }
|
public string? ShipName { get; init; }
|
||||||
public string ShipIdent { get; init; }
|
public string? ShipIdent { get; init; }
|
||||||
public double FuelLevel { get; init; }
|
public double FuelLevel { get; init; }
|
||||||
public double FuelCapacity { get; init; }
|
public double FuelCapacity { get; init; }
|
||||||
[JsonPropertyName("language")]
|
[JsonPropertyName("language")]
|
||||||
public string Language { get; init; }
|
public string? Language { get; init; }
|
||||||
[JsonPropertyName("gameversion")]
|
[JsonPropertyName("gameversion")]
|
||||||
public string GameVersion { get; init; }
|
public string? GameVersion { get; init; }
|
||||||
[JsonPropertyName("build")]
|
[JsonPropertyName("build")]
|
||||||
public string Build { get; init; }
|
public string? Build { get; init; }
|
||||||
}
|
}
|
@ -27,5 +27,5 @@ public class Statistics : JournalBase
|
|||||||
public CQC? CQC { get; init; }
|
public CQC? CQC { get; init; }
|
||||||
[JsonPropertyName("FLEETCARRIER")]
|
[JsonPropertyName("FLEETCARRIER")]
|
||||||
public ParameterTypes.FleetCarrier? FleetCarrier { get; init; }
|
public ParameterTypes.FleetCarrier? FleetCarrier { get; init; }
|
||||||
public Exobiology Exobiology { get; init; }
|
public Exobiology? Exobiology { get; init; }
|
||||||
}
|
}
|
27
Pulsar/WebApp/src/types/api/LoadGame.ts
Normal file
27
Pulsar/WebApp/src/types/api/LoadGame.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import type JournalBase from "./JournalBase";
|
||||||
|
|
||||||
|
export interface LoadGame extends JournalBase {
|
||||||
|
event: "LoadGame";
|
||||||
|
commander: string;
|
||||||
|
fid: string;
|
||||||
|
horizons: boolean;
|
||||||
|
odyssey: boolean;
|
||||||
|
ship: string;
|
||||||
|
ship_Localised: string;
|
||||||
|
shipID: number;
|
||||||
|
startLanded: boolean;
|
||||||
|
startDead: boolean;
|
||||||
|
gameMode: string;
|
||||||
|
credits: number;
|
||||||
|
loan: number;
|
||||||
|
shipName: string;
|
||||||
|
shipIdent: string;
|
||||||
|
fuelLevel: number;
|
||||||
|
fuelCapacity: number;
|
||||||
|
language: string;
|
||||||
|
gameversion: string;
|
||||||
|
build: string;
|
||||||
|
}
|
||||||
|
export function IsLoadGameEvent(message: JournalBase): message is LoadGame {
|
||||||
|
return message.event === "LoadGame";
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user