Skip to content

Commit 5cfd25e

Browse files
committed
Since we are here, I never liked how DataBaseReloadWithMM was being called. Shoving a bit of sense on this (coupling is bad!)
1 parent f790d20 commit 5cfd25e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Source/ModuleManager/GUI/Menu.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,13 @@ private void Show()
6363
new DialogGUIButton("Reload Database",
6464
delegate
6565
{
66-
MMPatchLoader.keepPartDB = false;
67-
this.parent.StartCoroutine(this.parent.DataBaseReloadWithMM());
66+
this.parent.StartCoroutine(this.parent.DataBaseReloadWithMM(false));
6867
this.Dismiss();
6968
}, 140.0f, 30.0f, false),
7069
new DialogGUIButton("Quick Reload Database",
7170
delegate
7271
{
73-
MMPatchLoader.keepPartDB = true;
74-
this.parent.StartCoroutine(this.parent.DataBaseReloadWithMM());
72+
this.parent.StartCoroutine(this.parent.DataBaseReloadWithMM(true));
7573
this.Dismiss();
7674
}, 140.0f, 30.0f, false),
7775
new DialogGUIButton("Dump Database to Files",

Source/ModuleManager/ModuleManager.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,10 @@ public static bool IsABadIdea()
324324
}
325325
*/
326326

327-
internal IEnumerator DataBaseReloadWithMM()
327+
internal IEnumerator DataBaseReloadWithMM(bool keepPartDB)
328328
{
329+
MMPatchLoader.keepPartDB = keepPartDB;
330+
329331
GUI.ReloadingDatabaseDialog reloadingDialog = GUI.ReloadingDatabaseDialog.Show(this);
330332
try
331333
{

0 commit comments

Comments
 (0)