Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
/ ModManager Public archive

Commit

Permalink
Version 5.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MatuxGG committed Sep 18, 2022
1 parent dce203b commit 41383e9
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MakeExecutableDotnet6.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "Installer\CodeDependencies.iss"

#define MyAppName "ModManager"
#define MyAppVersion "5.3.0"
#define MyAppVersion "5.3.1"
#define MyAppPublisher "Matux"
#define MyAppURL "https://goodloss.fr"
#define MyAppExeName "ModManager5.exe"
Expand Down
17 changes: 17 additions & 0 deletions ModManager5/Classes/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,22 @@ public class Config
public string launcher;
public List<string> favoriteMods;
public bool miniEnabled;
public bool multipleGames;
public List<string> availableAmongUsPaths;

public Config(string modManagerVersion, List<InstalledMod> installedMods, List<InstalledVanilla> installedVanilla, string amongUsPath, string launcher, List<string> faroriteMods, bool miniEnabled, bool multipleGames)
{
this.ModManagerVersion = modManagerVersion;
this.installedMods = installedMods;
this.installedVanilla = installedVanilla;
this.amongUsPath = amongUsPath;
this.launcher = launcher;
this.favoriteMods = faroriteMods;
this.miniEnabled = miniEnabled;
this.multipleGames = multipleGames;
this.availableAmongUsPaths = new List<string>() { };
}

public Config(string modManagerVersion, List<InstalledMod> installedMods, List<InstalledVanilla> installedVanilla, string amongUsPath, string launcher, List<string> faroriteMods, bool miniEnabled)
{
this.ModManagerVersion = modManagerVersion;
Expand All @@ -27,6 +41,7 @@ public Config(string modManagerVersion, List<InstalledMod> installedMods, List<I
this.launcher = launcher;
this.favoriteMods = faroriteMods;
this.miniEnabled = miniEnabled;
this.multipleGames = false;
this.availableAmongUsPaths = new List<string>() { };
}

Expand All @@ -39,6 +54,7 @@ public Config(string modManagerVersion, List<InstalledMod> installedMods, List<I
this.launcher = launcher;
this.favoriteMods = faroriteMods;
this.miniEnabled = miniEnabled;
this.multipleGames = false;
this.availableAmongUsPaths = availableAmongUsPaths;
}

Expand All @@ -52,6 +68,7 @@ public Config()
this.launcher = "Steam";
this.favoriteMods = new List<string>() { };
this.miniEnabled = true;
this.multipleGames = false;
this.availableAmongUsPaths = new List<string>() { };
}

Expand Down
27 changes: 27 additions & 0 deletions ModManager5/Classes/ModManagerUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,33 @@ public static void loadSettings()

SettingsForm.Controls.Add(Visuals.SettingsButton(LogButton, Translator.get("Log File")));

// Multiple game instances
MMButton MultipleGamesButton = new MMButton("trans");
MultipleGamesButton.Click += new EventHandler((object sender, EventArgs e) =>
{
MMButton c = (MMButton)sender;
if (c.Text == Translator.get("Enabled"))
{
ConfigManager.config.multipleGames = false;
c.Text = Translator.get("Disabled");
}
else
{
ConfigManager.config.multipleGames = true;
c.Text = Translator.get("Enabled");
}
ConfigManager.update();
});
SettingsForm.Controls.Add(Visuals.SettingsButton(MultipleGamesButton, Translator.get("Multiple game instances")));
if (ConfigManager.config.multipleGames)
{
MultipleGamesButton.Text = Translator.get("Enabled");
}
else
{
MultipleGamesButton.Text = Translator.get("Disabled");
}

// Minimise in taskbar
MMButton MinimisationButton = new MMButton("trans");
MinimisationButton.Click += new EventHandler((object sender, EventArgs e) =>
Expand Down
15 changes: 8 additions & 7 deletions ModManager5/Classes/ModWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,7 @@ public static void startMod(Mod m)
Process.Start("explorer", ModManager.appDataPath + @"\mods\" + m.id + @"\Among Us.exe");
} else
{
Boolean modOpen = isGameOpen();
if (modOpen)
{
return;
}
if (!ConfigManager.config.multipleGames && isGameOpen()) return;

InstalledMod im = ConfigManager.getInstalledModById(m.id);

Expand Down Expand Up @@ -261,7 +257,7 @@ public static void cleanGame()

public static void startGame()
{
if (isGameOpen())
if (!ConfigManager.config.multipleGames && isGameOpen())
return;

Utils.log("Start vanilla game START", "ModWorker");
Expand Down Expand Up @@ -739,6 +735,10 @@ private static void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
backgroundWorker.ReportProgress(100);
return;
}
if (toInstallMod.id == "GLMod")
{
File.Create(destPath + @"\BepInEx\config\" + m.id + ".mm");
}
backgroundWorker.ReportProgress(installOffset);
}

Expand Down Expand Up @@ -782,8 +782,9 @@ private static void backgroundWorker_RunWorkerCompleted(object sender, RunWorker

public static Boolean installFiles(Mod m, string destPath)
{

Utils.log("Install files for mod " + m.name + " START", "ModWorker");
if (m.type == "mod")
if (m.type != "allInOne")
{
foreach (ReleaseAsset tab in m.release.Assets)
{
Expand Down
4 changes: 2 additions & 2 deletions ModManager5/ModManager5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>modmanager.ico</ApplicationIcon>
<AssemblyVersion>5.3.0.0</AssemblyVersion>
<FileVersion>5.3.0.0</FileVersion>
<AssemblyVersion>5.3.1.0</AssemblyVersion>
<FileVersion>5.3.1.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
Expand Down

0 comments on commit 41383e9

Please sign in to comment.