Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
tinygrox authored Oct 28, 2019
1 parent c33668b commit 632a39f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MechJeb2/InstallChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
using KSP.Localization;

namespace MuMech
{
Expand All @@ -18,19 +19,19 @@ protected void Start()
var badPaths = assemblies.Select(a => a.path).Select(p => Uri.UnescapeDataString(new Uri(Path.GetFullPath(KSPUtil.ApplicationRootPath)).MakeRelativeUri(new Uri(p)).ToString().Replace('/', Path.DirectorySeparatorChar)));
PopupDialog.SpawnPopupDialog(
new MultiOptionDialog("InstallCheckerA",
null, "Incorrect MechJeb2 Installation",
null, Localizer.Format("#MechJeb_InstallCheckA_title"),//"Incorrect MechJeb2 Installation"
HighLogic.UISkin,
new Rect(0.5f, 0.5f, 100f, 100f),
new DialogGUIContentSizer(ContentSizeFitter.FitMode.PreferredSize, ContentSizeFitter.FitMode.MinSize),
new DialogGUILabel("MechJeb2 has been installed incorrectly and will not function properly.\nAll MechJeb2 files should be located in KSP like this \n<KSP>\n\tGameData\n\t\tMechJeb2\n\t\t\tParts\n\t\t\tPlugins\n\nDo not move any files from inside the MechJeb2 folder.\n\nIncorrect path(s):\n" + String.Join("\n", badPaths.ToArray())),
new DialogGUILabel(Localizer.Format("#MechJeb_InstallCheckA_msg") +String.Join("\n", badPaths.ToArray())),//"MechJeb2 has been installed incorrectly and will not function properly.\nAll MechJeb2 files should be located in KSP like this \n<KSP>\n\tGameData\n\t\tMechJeb2\n\t\t\tParts\n\t\t\tPlugins\n\nDo not move any files from inside the MechJeb2 folder.\n\nIncorrect path(s):\n"
new DialogGUIButton("OK", () => { }, true)
), false, HighLogic.UISkin);
}
assemblies = AssemblyLoader.loadedAssemblies.Where(a=> a.assembly.GetName().Name == "MechJebMenuToolbar" );
if (assemblies.Any())
{
var badPaths = assemblies.Select(a => a.path).Select(p => Uri.UnescapeDataString(new Uri(Path.GetFullPath(KSPUtil.ApplicationRootPath)).MakeRelativeUri(new Uri(p)).ToString().Replace('/', Path.DirectorySeparatorChar)));
PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), "InstallCheckerB", "Redundant MechJebMenuToolbar Installation", "MechJebMenuToolbar is installed but this version of MechJeb2 already includes support for Blizzy78 Toolbar Plugin.\nPlease delete this dll:\n" + String.Join("\n", badPaths.ToArray()), "OK", false, HighLogic.UISkin);
PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), "InstallCheckerB", Localizer.Format("#MechJeb_InstallCheckB_title"), Localizer.Format("#MechJeb_InstallCheckB_msg") + String.Join("\n", badPaths.ToArray()), "OK", false, HighLogic.UISkin);//"Redundant MechJebMenuToolbar Installation""MechJebMenuToolbar is installed but this version of MechJeb2 already includes support for Blizzy78 Toolbar Plugin.\nPlease delete this dll:\n"
}
}
}
Expand Down

0 comments on commit 632a39f

Please sign in to comment.