add a few more entries for the AFK build

This commit is contained in:
Florian Stinglmayr 2021-08-27 12:11:03 +02:00
parent 45a3bb5098
commit 1cab477db7
4 changed files with 21 additions and 0 deletions

View File

@ -25,6 +25,7 @@ namespace EDJournal {
{ Events.ShipTargeted, typeof(ShipTargetedEntry) }, { Events.ShipTargeted, typeof(ShipTargetedEntry) },
{ Events.UnderAttack, typeof(UnderAttackEntry) }, { Events.UnderAttack, typeof(UnderAttackEntry) },
{ Events.ShieldState, typeof(ShieldStateEntry) }, { Events.ShieldState, typeof(ShieldStateEntry) },
{ Events.HullDamage, typeof(HullDamageEntry) },
}; };
private string eventtype = null; private string eventtype = null;

View File

@ -16,5 +16,7 @@
public static readonly string ShieldState = "ShieldState"; public static readonly string ShieldState = "ShieldState";
public static readonly string MissionRedirected = "MissionRedirected"; public static readonly string MissionRedirected = "MissionRedirected";
public static readonly string UnderAttack = "UnderAttack"; public static readonly string UnderAttack = "UnderAttack";
public static readonly string HullDamage = "HullDamage";
public static readonly string FighterDestroyed = "FighterDestroyed";
} }
} }

17
HullDamageEntry.cs Normal file
View File

@ -0,0 +1,17 @@
namespace EDJournal {
public class HullDamageEntry : Entry {
private double health = 0;
private bool playerpilot = false;
private bool fighter = false;
public double Health => health;
public bool PlayerPilot => playerpilot;
public bool Fighter => fighter;
protected override void Initialise() {
health = JSON.Value<double?>("Health") ?? 100.0;
playerpilot = JSON.Value<bool?>("PlayerPilot") ?? true;
fighter = JSON.Value<bool?>("Fighter") ?? false;
}
}
}

View File

@ -51,6 +51,7 @@
<Compile Include="Entry.cs" /> <Compile Include="Entry.cs" />
<Compile Include="Events.cs" /> <Compile Include="Events.cs" />
<Compile Include="FSDJumpEntry.cs" /> <Compile Include="FSDJumpEntry.cs" />
<Compile Include="HullDamageEntry.cs" />
<Compile Include="JournalException.cs" /> <Compile Include="JournalException.cs" />
<Compile Include="JournalFile.cs" /> <Compile Include="JournalFile.cs" />
<Compile Include="JournalStream.cs" /> <Compile Include="JournalStream.cs" />