Skip to content

Commit 43b6020

Browse files
committed
Fix quest facts export.
1 parent f46ba50 commit 43b6020

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

CP2077SaveEditor/Views/Form1.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,15 @@ private void factsSaveButton_Click(object sender, EventArgs e)
11791179
saveWindow.Filter = "Text File|*.txt";
11801180
if (saveWindow.ShowDialog() == DialogResult.OK)
11811181
{
1182-
File.WriteAllText(saveWindow.FileName, JsonConvert.SerializeObject(activeSaveFile.GetKnownFacts(), Formatting.Indented));
1182+
var facts = activeSaveFile.GetKnownFacts();
1183+
var final = new List<KeyValuePair<string, uint>>(facts.Count);
1184+
1185+
foreach (var singleFact in facts)
1186+
{
1187+
final.Add(new KeyValuePair<string, uint>(activeSaveFile.KnownFacts[singleFact.FactName], singleFact.Value));
1188+
}
1189+
1190+
File.WriteAllText(saveWindow.FileName, JsonConvert.SerializeObject(final, Formatting.Indented));
11831191
}
11841192
}
11851193

0 commit comments

Comments
 (0)