add mission id to completed event

This commit is contained in:
Florian Stinglmayr 2021-08-27 19:58:22 +02:00
parent a64562cd48
commit ab424b5115

View File

@ -11,6 +11,7 @@ namespace EDJournal {
private string commodity = null;
private int count = 0;
private int donated = 0;
private int id = 0;
/* TODO: make this a file at some point for easier editing.
*/
@ -54,6 +55,7 @@ namespace EDJournal {
protected override void Initialise() {
MakeHumanReadableName();
id = JSON.Value<int?>("MissionID") ?? 0;
name = JSON.Value<string>("Name");
if (JSON.ContainsKey("Commodity_Localised")) {
commodity = JSON.Value<string>("Commodity_Localised");
@ -69,6 +71,7 @@ namespace EDJournal {
public string Name => name;
public string Commodity => commodity;
public int Count => count;
public int MissionID => id;
private void MakeHumanReadableName() {
if (readable_name != null && readable_name.Length > 0) {