fix bug in name generation
This commit is contained in:
parent
e663ddc9c2
commit
8764139d5a
@ -14,7 +14,6 @@ namespace EDJournal {
|
|||||||
private int id = 0;
|
private int id = 0;
|
||||||
|
|
||||||
protected override void Initialise() {
|
protected override void Initialise() {
|
||||||
MakeHumanReadableName();
|
|
||||||
id = JSON.Value<int?>("MissionID") ?? 0;
|
id = JSON.Value<int?>("MissionID") ?? 0;
|
||||||
name = JSON.Value<string>("Name");
|
name = JSON.Value<string>("Name");
|
||||||
if (JSON.ContainsKey("Commodity_Localised")) {
|
if (JSON.ContainsKey("Commodity_Localised")) {
|
||||||
@ -26,6 +25,8 @@ namespace EDJournal {
|
|||||||
if (JSON.ContainsKey("Donated")) {
|
if (JSON.ContainsKey("Donated")) {
|
||||||
donated = JSON.Value<int>("Donated");
|
donated = JSON.Value<int>("Donated");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MakeHumanReadableName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name => name;
|
public string Name => name;
|
||||||
@ -34,7 +35,7 @@ namespace EDJournal {
|
|||||||
public int MissionID => id;
|
public int MissionID => id;
|
||||||
|
|
||||||
private void MakeHumanReadableName() {
|
private void MakeHumanReadableName() {
|
||||||
if (readable_name != null) {
|
if (readable_name != null || Name == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user