From 199e77c68f7352dda083f5379ff0bc3fb726d319 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Sat, 15 May 2021 02:21:05 +0200 Subject: [PATCH] Update to work with .NET 5 tools, GC->TB --- GCMM/GCMM.csproj | 4 +++- GCMM/MainForm.Designer.cs | 2 +- GCMM/MainForm.cs | 18 +++++++++--------- GCMM/MainModInstaller.cs | 10 +++++----- GCMM/MainPatcher.cs | 2 +- GCMM/MainUtils.cs | 18 ++++++++---------- GCMM/Properties/launchSettings.json | 2 +- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/GCMM/GCMM.csproj b/GCMM/GCMM.csproj index af4a3b4..212bdbd 100644 --- a/GCMM/GCMM.csproj +++ b/GCMM/GCMM.csproj @@ -9,7 +9,8 @@ 1.4.0 NorbiPeti ExMods - A mod manager for Gamecraft. It automatically downloads and runs GCIPA and allows the user to install mods. + A mod manager for Techblox. It automatically downloads and runs GCIPA and allows the user to install mods. + true @@ -24,6 +25,7 @@ + diff --git a/GCMM/MainForm.Designer.cs b/GCMM/MainForm.Designer.cs index a483125..ddd8c9d 100644 --- a/GCMM/MainForm.Designer.cs +++ b/GCMM/MainForm.Designer.cs @@ -271,7 +271,7 @@ this.ForeColor = System.Drawing.Color.Lime; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "MainForm"; - this.Text = "Gamecraft Mod Manager"; + this.Text = "Techblox Mod Manager"; this.Load += new System.EventHandler(this.Form1_Load); this.Shown += new System.EventHandler(this.MainForm_Shown); this.ResumeLayout(false); diff --git a/GCMM/MainForm.cs b/GCMM/MainForm.cs index 0083969..7ce5e09 100644 --- a/GCMM/MainForm.cs +++ b/GCMM/MainForm.cs @@ -28,21 +28,21 @@ namespace GCMM private DateTime lastGameUpdateTime; private string steamPath; private const string defaultInfo = @" -Gamecraft Mod Manager +Techblox Mod Manager If you click on a mod it will show some info about it. The install instructions there are usually for manual installs. -To get started, click on a mod and select Install mod. Most mods need GamecraftModdingAPI as well so it'll be installed. -Then launch Gamecraft: if you enabled auto-patching then you can use Steam but if you didn't then you must use the Play button. -This will first download and run the patcher (GCIPA) if needed. If all goes well, after some time a modded Gamecraft should launch. +To get started, click on a mod and select Install mod. Most mods need TechbloxModdingAPI as well so it'll be installed. +Then launch Techblox: if you enabled auto-patching then you can use Steam but if you didn't then you must use the Play button. +This will first download and run the patcher (GCIPA) if needed. If all goes well, after some time a modded Techblox should launch. -After a Gamecraft update there's a good chance that mods will break. If this happens you may get errors when trying to start Gamecraft. +After a Techblox update there's a good chance that mods will break. If this happens you may get errors when trying to start Techblox. Until updated versions are released, use the ""Disable mods"" checkbox at the bottom to launch the game without mods. If you enabled auto-patching you will get a warning about this. -If you don't have auto-patching enabled then you will need to run the mod manager each time Gamecraft updates and click ""Patch & Play"". +If you don't have auto-patching enabled then you will need to run the mod manager each time Techblox updates and click ""Patch & Play"". Disclaimer: -This mod manager and the mods in the list are made by the ExMods developers. We are not associated with Freejam or Gamecraft. Modify Gamecraft at your own risk. +This mod manager and the mods in the list are made by the ExMods developers. We are not associated with Freejam or Techblox. Modify Techblox at your own risk. If you encounter an issue while any mods are installed, report it to us. If you think it's an issue with the game, test again with the ""Disable mods"" option checked before reporting to Freejam. You may also want to verify the game's files by clicking on the Validate game button. @@ -79,8 +79,8 @@ You may also want to verify the game's files by clicking on the Validate game bu { if (MessageBox.Show("Do you want GCMM to change the game's launch settings so it can ensure the game is patched?\n\n" + "If you say yes, GCMM will do a quick check before the game is launched and patches if necessary. " + - "This way you (hopefully) won't see crashes after a Gamecraft update.\n\n" + - "Note that this also means that if you (re)move GCMM without disabling this in the settings then you won't be able to launch Gamecraft until you change the launch options in Steam.", + "This way you (hopefully) won't see crashes after a Techblox update.\n\n" + + "Note that this also means that if you (re)move GCMM without disabling this in the settings then you won't be able to launch Techblox until you change the launch options in Steam.", "GCMM auto-patching", MessageBoxButtons.YesNo) == DialogResult.Yes) DetectConfigLocationAndAutoStart(steamPath, ref user); else diff --git a/GCMM/MainModInstaller.cs b/GCMM/MainModInstaller.cs index 49d6f9d..6128c1b 100644 --- a/GCMM/MainModInstaller.cs +++ b/GCMM/MainModInstaller.cs @@ -18,7 +18,7 @@ namespace GCMM if (mod.DownloadURL == null) return; if (CheckNoExe()) return; - if (mod.Name != "GamecraftModdingAPI") + if (mod.Name != "TechbloxModdingAPI") await UpdateAPI(); var tmp = Directory.CreateDirectory("temp"); var plugins = Directory.CreateDirectory(GamePath(@"\Plugins")); @@ -166,14 +166,14 @@ namespace GCMM public async Task UpdateAPI() { - if (!mods.ContainsKey("GamecraftModdingAPI")) + if (!mods.ContainsKey("TechbloxModdingAPI")) return; - var gcmapi = mods["GamecraftModdingAPI"]; + var gcmapi = mods["TechbloxModdingAPI"]; if (!gcmapi.Installed || gcmapi.Updatable) { if (MessageBox.Show(gcmapi.Installed ? - "GamecraftModdingAPI will be updated as there's a new version available. It's needed for most mods to function." - : "GamecraftModdingAPI will be installed as most mods need it to work. You can uninstall it if you're sure you don't need it.", "API needed", + "TechbloxModdingAPI will be updated as there's a new version available. It's needed for most mods to function." + : "TechbloxModdingAPI will be installed as most mods need it to work. You can uninstall it if you're sure you don't need it.", "API needed", MessageBoxButtons.OKCancel) == DialogResult.OK) await InstallMod(gcmapi); } diff --git a/GCMM/MainPatcher.cs b/GCMM/MainPatcher.cs index 1d9d704..44e3cfb 100644 --- a/GCMM/MainPatcher.cs +++ b/GCMM/MainPatcher.cs @@ -86,7 +86,7 @@ namespace GCMM switch (status) { case GameState.NotFound: - MessageBox.Show("Gamecraft not found! Set the correct path in Settings."); + MessageBox.Show("Techblox not found! Set the correct path in Settings."); EndWork(false); return retOpenedWindowShouldStay; case GameState.NoPatcher: diff --git a/GCMM/MainUtils.cs b/GCMM/MainUtils.cs index 0270484..378ca65 100644 --- a/GCMM/MainUtils.cs +++ b/GCMM/MainUtils.cs @@ -47,10 +47,8 @@ namespace GCMM continue; string library = match.Groups[1].Value.Replace("\\\\", "\\"); library += @"\steamapps\common\"; - if (GetExe(library + "Gamecraft") != null) - return library + "Gamecraft"; - if (GetExe(library + "RobocraftX") != null) - return library + "RobocraftX"; + if (GetExe(library + "Techblox") != null) + return library + "Techblox"; } return null; } @@ -58,7 +56,7 @@ namespace GCMM public string SelectGameFolder() { var ofd = new OpenFileDialog(); - ofd.Filter = "Gamecraft executable|Gamecraft.exe|Gamecraft Preview executable|GamecraftPreview.exe"; + ofd.Filter = "Techblox executable|Techblox.exe|Techblox Preview executable|TechbloxPreview.exe"; ofd.Title = "Game location"; ofd.InitialDirectory = steamPath + @"\steamapps\common\"; ofd.CheckFileExists = true; @@ -290,10 +288,10 @@ namespace GCMM public string GetExe(string path = null) { - if (File.Exists(GamePath("\\Gamecraft.exe", path))) - return "Gamecraft.exe"; - if (File.Exists(GamePath("\\GamecraftPreview.exe", path))) - return "GamecraftPreview.exe"; + if (File.Exists(GamePath("\\Techblox.exe", path))) + return "Techblox.exe"; + if (File.Exists(GamePath("\\TechbloxPreview.exe", path))) + return "TechbloxPreview.exe"; return null; } @@ -307,7 +305,7 @@ namespace GCMM path = GetExe(); if (path == null) { - MessageBox.Show("Gamecraft not found! Set the correct path in Settings."); + MessageBox.Show("Techblox not found! Set the correct path in Settings."); return true; } return false; diff --git a/GCMM/Properties/launchSettings.json b/GCMM/Properties/launchSettings.json index 4e41c41..e20f490 100644 --- a/GCMM/Properties/launchSettings.json +++ b/GCMM/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "GCMM": { "commandName": "Project", - "commandLineArgs": "-start steam:\"\"" + "commandLineArgs": "" } } } \ No newline at end of file