Skip to content

Commit

Permalink
Append instead of replacing research
Browse files Browse the repository at this point in the history
  • Loading branch information
Goz3rr committed Mar 29, 2019
1 parent 7c260a7 commit 5feb849
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion SatisfactorySaveEditor/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ private void Cheat(string cheatType)
return;
}

arrayField.Elements = Researches.Values.Select(v => (SerializedProperty)new ObjectProperty(null, "", v)).ToList();
foreach(var research in Researches.Values)
{
if(!arrayField.Elements.Cast<ObjectProperty>().Any(e => e.Str2 == research))
{
arrayField.Elements.Add(new ObjectProperty(null, "", research));
}
}
}
}

Expand Down

0 comments on commit 5feb849

Please sign in to comment.