add Commander event
This commit is contained in:
parent
86bd9f76c1
commit
9b31077a11
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
|||||||
/bin/Release
|
/bin/Release
|
||||||
/bin/Debug
|
/bin/Debug
|
||||||
/packages/Newtonsoft.Json.13.0.1
|
/packages/Newtonsoft.Json.13.0.1
|
||||||
|
/.vs/edjournal/v17/.suo
|
||||||
|
16
CommanderEntry.cs
Normal file
16
CommanderEntry.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EDJournal {
|
||||||
|
public class CommanderEntry : Entry {
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string FID { get; set; }
|
||||||
|
protected override void Initialise() {
|
||||||
|
Name = JSON.Value<string>("Name") ?? "";
|
||||||
|
FID = JSON.Value<string>("FID") ?? "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
Entry.cs
1
Entry.cs
@ -13,6 +13,7 @@ namespace EDJournal {
|
|||||||
public class Entry {
|
public class Entry {
|
||||||
private static readonly Dictionary<string, Type> classes = new Dictionary<string, Type> {
|
private static readonly Dictionary<string, Type> classes = new Dictionary<string, Type> {
|
||||||
{ Events.Bounty, typeof(BountyEntry) },
|
{ Events.Bounty, typeof(BountyEntry) },
|
||||||
|
{ Events.Commander, typeof(CommanderEntry) },
|
||||||
{ Events.CommitCrime, typeof(CommitCrimeEntry) },
|
{ Events.CommitCrime, typeof(CommitCrimeEntry) },
|
||||||
{ Events.Died, typeof(DiedEntry) },
|
{ Events.Died, typeof(DiedEntry) },
|
||||||
{ Events.Docked, typeof(DockedEntry) },
|
{ Events.Docked, typeof(DockedEntry) },
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
namespace EDJournal {
|
namespace EDJournal {
|
||||||
public class Events {
|
public class Events {
|
||||||
public static readonly string Bounty = "Bounty";
|
public static readonly string Bounty = "Bounty";
|
||||||
|
public static readonly string Commander = "Commander";
|
||||||
public static readonly string CommitCrime = "CommitCrime";
|
public static readonly string CommitCrime = "CommitCrime";
|
||||||
public static readonly string Died = "Died";
|
public static readonly string Died = "Died";
|
||||||
public static readonly string Docked = "Docked";
|
public static readonly string Docked = "Docked";
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="BountyEntry.cs" />
|
<Compile Include="BountyEntry.cs" />
|
||||||
|
<Compile Include="CommanderEntry.cs" />
|
||||||
<Compile Include="CommitCrimeEntry.cs" />
|
<Compile Include="CommitCrimeEntry.cs" />
|
||||||
<Compile Include="Credits.cs" />
|
<Compile Include="Credits.cs" />
|
||||||
<Compile Include="CrimeTypes.cs" />
|
<Compile Include="CrimeTypes.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user