Skip to content

Commit f790d20

Browse files
committed
Simplifying the Main Menu Dump Database to Files, avoiding an almost unwanted reload of the MM Cache. There's already an option to do exactly that, there's no need to force the user to reload it when all it wants is to dump it!
Reference: #25 (reply in thread)
1 parent 6d4cbb8 commit f790d20

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Source/ModuleManager/GUI/Menu.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private void Show()
7777
new DialogGUIButton("Dump Database to Files",
7878
delegate
7979
{
80-
this.parent.StartCoroutine(this.parent.DataBaseReloadWithMM(true));
80+
this.parent.StartCoroutine(this.parent.DumpDataBaseToFiles());
8181
this.Dismiss();
8282
}, 140.0f, 30.0f, false),
8383
new DialogGUIButton("Close", () => { this.Dismiss(); } , 140.0f, 30.0f, false)

Source/ModuleManager/ModuleManager.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public static bool IsABadIdea()
324324
}
325325
*/
326326

327-
internal IEnumerator DataBaseReloadWithMM(bool dump = false)
327+
internal IEnumerator DataBaseReloadWithMM()
328328
{
329329
GUI.ReloadingDatabaseDialog reloadingDialog = GUI.ReloadingDatabaseDialog.Show(this);
330330
try
@@ -348,9 +348,6 @@ internal IEnumerator DataBaseReloadWithMM(bool dump = false)
348348
while (!PostPatchLoader.Instance.IsReady())
349349
yield return null;
350350

351-
if (dump)
352-
OutputAllConfigs();
353-
354351
PartLoader.Instance.StartLoad();
355352

356353
while (!PartLoader.Instance.IsReady())
@@ -376,6 +373,12 @@ internal IEnumerator DataBaseReloadWithMM(bool dump = false)
376373
}
377374
}
378375

376+
internal IEnumerator DumpDataBaseToFiles()
377+
{
378+
OutputAllConfigs();
379+
yield return null;
380+
}
381+
379382
public static void OutputAllConfigs()
380383
{
381384
try

0 commit comments

Comments
 (0)