Skip to content

Commit eba9b1f

Browse files
committed
Fixing the "No MM Installed" use case, as it was being misunderstood with MM/L being installed but not KSPe. Creating an Use Case for "MM/L installed but not its dependencies".
1 parent 38bea24 commit eba9b1f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Source/ModuleManagerWatchDog/ErrorMessages.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ internal static class ErrorMessage
2525
public static readonly string ERR_MM_DOPPELGANGER = "There're more than one Module Manager on this KSP installment! Please delete all but the one you intend to use!";
2626
public static readonly string ERR_MM_FORUMDELETED = "You had selected MM/L as preferred Module Manager, but somehow other forks were installed. They were automatically removed.";
2727
public static readonly string ERR_MM_MYFORKDELETED = "You had selected Forum's as preferred Module Manager, but somehow other forks were installed. They were automatically removed.";
28+
public static readonly string ERR_MM_MISSING_DEPENDENCIES = "You have MM installed, but not its dependencies. If using MM/L, you need to install KSPe too!";
2829

2930
internal static class Conflict
3031
{

Source/ModuleManagerWatchDog/InstallChecker.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ private string CheckModuleManager()
128128
Log.dbg("{0} :: {1}", la.assembly.FullName, la.assembly.Location);
129129
#endif
130130

131-
if (0 == loaded.Count()) return ErrorMessage.ERR_MM_ABSENT;
131+
if (0 == loaded.Count())
132+
{
133+
SIO.DirectoryInfo d = new SIO.DirectoryInfo(GAMEDATA);
134+
SIO.FileInfo[] files = d.GetFiles(ASSEMBLY_NAME + "*.dll"); //Getting Text files
135+
return (0 != files.Count() && this.IsMyFork(files[0])) ? ErrorMessage.ERR_MM_MISSING_DEPENDENCIES : ErrorMessage.ERR_MM_ABSENT;
136+
}
132137
if (!SanityLib.CheckIsOnGameData(loaded.First().path))
133138
return ErrorMessage.ERR_MM_WRONGPLACE;
134139
return null;

0 commit comments

Comments
 (0)