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 4.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MatuxGG committed Nov 2, 2021
1 parent 73ea2e1 commit 8ba92c2
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 16 deletions.
2 changes: 1 addition & 1 deletion MakeExecutableFile.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "ModManager"
#define MyAppVersion "4.1.2"
#define MyAppVersion "4.1.3"
#define MyAppPublisher "Matux"
#define MyAppURL "https://matux.fr"
#define MyAppExeName "ModManager4.exe"
Expand Down
39 changes: 36 additions & 3 deletions ModManager4/Class/Componentlist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,8 @@ public void load()
MethodComboBox.MouseLeave += new EventHandler(this.tooltips.hide);
MethodComboBox.MouseHover += new EventHandler(this.tooltips.show);

MethodComboBox.Items.AddRange(new string[] { "Direct Link", "Steam" });
//MethodComboBox.Items.AddRange(new string[] { "Direct Link", "Steam", "Epic Games Store" });
//MethodComboBox.Items.AddRange(new string[] { "Direct Link", "Steam" });
MethodComboBox.Items.AddRange(new string[] { "Direct Link", "Steam", "Epic Games Store" });

string currentMethod = this.modManager.config.startMethod;

Expand Down Expand Up @@ -1813,7 +1813,7 @@ public Component loadModPage(Component c) {
ModGithubField.Font = new System.Drawing.Font("Arial", fonts.sizeS, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
ModGithubField.LinkColor = System.Drawing.SystemColors.Control;
ModGithubField.ForeColor = System.Drawing.SystemColors.Control;
ModGithubField.Size = new System.Drawing.Size((int)(700 * ratioX), (int)(40 * ratioY));
ModGithubField.Size = new System.Drawing.Size((int)(600 * ratioX), (int)(40 * ratioY));
ModGithubField.Location = new System.Drawing.Point((int)(960 * ratioX), (int)(categoryOffset * ratioY));
ModGithubField.Name = "ModGithubField=" + mod.id;
ModGithubField.TabStop = false;
Expand All @@ -1829,6 +1829,39 @@ public Component loadModPage(Component c) {
}

CategoryPanel.Controls.Add(ModGithubField);

if (mod.worksOnSteam == "1")
{
PictureBox ModSteam = new System.Windows.Forms.PictureBox();
ModSteam.Image = global::ModManager4.Properties.Resources.steam;
ModSteam.BackColor = System.Drawing.Color.Transparent;
ModSteam.Location = new System.Drawing.Point((int)(1580 * ratioX), (int)(categoryOffset * ratioY));
ModSteam.Name = "ModSteam=" + mod.id;
ModSteam.Size = new System.Drawing.Size((int)(30 * ratioX), (int)(30 * ratioY));
ModSteam.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
ModSteam.TabStop = false;
ModSteam.Cursor = Cursors.Hand;
ModSteam.MouseLeave += new EventHandler(this.tooltips.hide);
ModSteam.MouseHover += new EventHandler(this.tooltips.show);
CategoryPanel.Controls.Add(ModSteam);
}

if (mod.worksOnEGS == "1")
{
PictureBox ModEGS = new System.Windows.Forms.PictureBox();
ModEGS.Image = global::ModManager4.Properties.Resources.epicGames;
ModEGS.BackColor = System.Drawing.Color.Transparent;
ModEGS.Location = new System.Drawing.Point((int)(1630 * ratioX), (int)(categoryOffset * ratioY));
ModEGS.Name = "ModEGS=" + mod.id;
ModEGS.Size = new System.Drawing.Size((int)(30 * ratioX), (int)(30 * ratioY));
ModEGS.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
ModEGS.TabStop = false;
ModEGS.Cursor = Cursors.Hand;
ModEGS.MouseLeave += new EventHandler(this.tooltips.hide);
ModEGS.MouseHover += new EventHandler(this.tooltips.show);
CategoryPanel.Controls.Add(ModEGS);
}

}

else
Expand Down
2 changes: 1 addition & 1 deletion ModManager4/Class/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public void load(ModManager modManager)
{
modManager.logs.log("- Among Us detected on Epic Games Store");
this.amongUsPath = egsPath;
//this.startMethod = "Epic Games Store";
this.startMethod = "Epic Games Store";

modManager.logs.log("- Saving Among Us path : " + this.amongUsPath);
this.update(modManager);
Expand Down
5 changes: 2 additions & 3 deletions ModManager4/Class/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ public void validAddMod(object sender, EventArgs e)
string newPath = this.modManager.appDataPath + "\\localMods\\" + Path.GetFileName(fileName);
this.modManager.utils.FileCopy(fileName, newPath);
List<Mod> localMods = this.modManager.modlist.getLocalMods();
Mod newMod = new Mod("Localmod" + localMods.Count, name, "local", "localMod", this.modManager.serverConfig.get("gameVersion").value, dependencies, "You", newPath, "0", new List<string>(){ }, new List<string>() { }, new List<string>() { });
Mod newMod = new Mod("Localmod" + localMods.Count, name, "local", "localMod", this.modManager.serverConfig.get("gameVersion").value, dependencies, "You", newPath, "0", new List<string>(){ }, new List<string>() { }, new List<string>() { }, "1", "1");
this.modManager.modlist.mods.Add(newMod);
this.modManager.modlist.updateLocalMods();
this.modManager.componentlist.refreshModSelection();
Expand Down Expand Up @@ -933,7 +933,6 @@ public void startAllInOne(object sender, EventArgs e)
this.modManager.logs.log("Error : Disconnected during Better Crewlink install");
this.modManager.componentlist.events.exitMM();
}
this.modManager.logs.debug(dlPath);
Process.Start("explorer.exe", dlPath);

Boolean installed = false;
Expand Down Expand Up @@ -1072,7 +1071,7 @@ public void startGame()
worked = true;
} else if (this.modManager.config.startMethod == "Epic Games Store")
{
Process.Start("explorer", "com.epicgames.launcher://apps/33956bcb55d4452d8c47e16b94e294bd%3A729a86a5146640a2ace9e8c595414c56%3A963137e4c29d4c79a81323b8fab03a40?action=launch&silent=true");
Process.Start(new ProcessStartInfo("cmd", $"/c start {"com.epicgames.launcher://apps/33956bcb55d4452d8c47e16b94e294bd%3A729a86a5146640a2ace9e8c595414c56%3A963137e4c29d4c79a81323b8fab03a40?action=launch&silent=true"}") { CreateNoWindow = true });
worked = true;
}
if (worked == false)
Expand Down
6 changes: 5 additions & 1 deletion ModManager4/Class/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ public class Mod
public List<string> data { get; set; }

public List<string> excludeFiles { get; set; }
public string worksOnSteam { get; set; }
public string worksOnEGS { get; set; }

public Release release { get; set; }

public Mod(string id, string name, string category, string type, string gameVersion, List<string> dependencies, string author, string github, string githubLink, List<string> folders, List<string> data, List<string> excludeFiles)
public Mod(string id, string name, string category, string type, string gameVersion, List<string> dependencies, string author, string github, string githubLink, List<string> folders, List<string> data, List<string> excludeFiles, string worksOnSteam, string worksOnEGS)
{
this.id = id;
this.name = name;
Expand All @@ -41,6 +43,8 @@ public Mod(string id, string name, string category, string type, string gameVers
this.folders = folders;
this.data = data;
this.excludeFiles = excludeFiles;
this.worksOnSteam = worksOnSteam;
this.worksOnEGS = worksOnEGS;

if (this.dependencies == null)
{
Expand Down
5 changes: 1 addition & 4 deletions ModManager4/Class/ModWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -706,10 +706,7 @@ public void installZip(Mod m, ReleaseAsset file)
DirectoryInfo dirInfo = new DirectoryInfo(tempPathZip + "\\" + folder);
if (dirInfo.Exists)
{
if (Directory.Exists(this.modManager.config.amongUsPath + "\\" + folder) == false)
{
Directory.CreateDirectory(this.modManager.config.amongUsPath + "\\" + folder);
}
Directory.CreateDirectory(this.modManager.config.amongUsPath + "\\" + folder);

FileInfo[] files = dirInfo.GetFiles("*");
foreach (FileInfo f in files)
Expand Down
9 changes: 8 additions & 1 deletion ModManager4/Class/Tooltips.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,21 @@ public Tooltips (ModManager modManager) {
{ "MMDiscordLabel", "Click here to join Mod Manager's discord server" },
{ "MatuxGithubLabel", "Click here to open Mod Manager's github repository" },
{ "MethodComboBox", "Click here to change the method used to start Among Us" },
{ "ModSteam", "This mod is compatible with Steam" },
{ "ModEGS", "This mod is compatible with Epic Games Store" },

};

public void show(object sender, EventArgs e)
{
Control c = (Control)sender;

string s = tips[c.Name];
string name = c.Name;
if (name.Contains("="))
{
name = name.Substring(0, name.IndexOf("="));
}
string s = tips[name];

Point locationOnForm = c.FindForm().PointToClient(c.Parent.PointToScreen(c.Location));

Expand Down
4 changes: 2 additions & 2 deletions ModManager4/ModManager4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>modmanager.ico</ApplicationIcon>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<FileVersion>4.1.2.0</FileVersion>
<AssemblyVersion>4.1.3.0</AssemblyVersion>
<FileVersion>4.1.3.0</FileVersion>
<Authors>Matux</Authors>
<PackageProjectUrl>https://github.com/MatuxGG/ModManager</PackageProjectUrl>
<PackageIcon>modmanager.ico</PackageIcon>
Expand Down
Binary file modified ModManager4/assets/epicGames.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ModManager4/assets/steam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ba92c2

Please sign in to comment.