diff --git a/Bobocraft 2 Launcher v4 auto update - live version/.gitignore b/Bobocraft 2 Launcher v5 noob bot collection to desktop/.gitignore similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/.gitignore rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/.gitignore diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/App.xaml b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/App.xaml similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/App.xaml rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/App.xaml diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/App.xaml.cs b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/App.xaml.cs similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/App.xaml.cs rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/App.xaml.cs diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/AssemblyInfo.cs b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/AssemblyInfo.cs similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/AssemblyInfo.cs rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/AssemblyInfo.cs diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/Bobocraft 2 Launcher Update Assistant.csproj b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/Bobocraft 2 Launcher Update Assistant.csproj similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/Bobocraft 2 Launcher Update Assistant.csproj rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/Bobocraft 2 Launcher Update Assistant.csproj diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/LauncherBackground.png b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/LauncherBackground.png similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/LauncherBackground.png rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/LauncherBackground.png diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/MainWindow.xaml b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/MainWindow.xaml similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/MainWindow.xaml rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/MainWindow.xaml diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/MainWindow.xaml.cs b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/MainWindow.xaml.cs similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/MainWindow.xaml.cs rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/MainWindow.xaml.cs diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/bobocraft 2 logo vector.png b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/bobocraft 2 logo vector.png similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Bobocraft 2 Launcher Update Assistant/bobocraft 2 logo vector.png rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Bobocraft 2 Launcher Update Assistant/bobocraft 2 logo vector.png diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher.sln b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher.sln similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher.sln rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher.sln diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/App.config b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/App.config similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/App.config rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/App.config diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/App.xaml b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/App.xaml similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/App.xaml rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/App.xaml diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/App.xaml.cs b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/App.xaml.cs similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/App.xaml.cs rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/App.xaml.cs diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/AssemblyInfo.cs b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/AssemblyInfo.cs similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/AssemblyInfo.cs rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/AssemblyInfo.cs diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/Bobocraft 2 Launcher.csproj b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/Bobocraft 2 Launcher.csproj similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/Bobocraft 2 Launcher.csproj rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/Bobocraft 2 Launcher.csproj diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/LauncherBackground.png b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/LauncherBackground.png similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/LauncherBackground.png rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/LauncherBackground.png diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/MainWindow.xaml b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/MainWindow.xaml similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/MainWindow.xaml rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/MainWindow.xaml diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/MainWindow.xaml.cs b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/MainWindow.xaml.cs similarity index 89% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/MainWindow.xaml.cs rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/MainWindow.xaml.cs index 9931134..2e01e1e 100644 --- a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/MainWindow.xaml.cs +++ b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/MainWindow.xaml.cs @@ -39,6 +39,7 @@ namespace GameLauncher private bool isNewInstall; private string chosenUserName; private string assistantPath; + private string botDirectory; private LauncherStatus _status; internal LauncherStatus Status @@ -95,6 +96,7 @@ namespace GameLauncher tempZip = Path.Combine(rootPath, "temp"); modZip = Path.Combine(rootPath, "BepInEx", "plugins"); configFile = Path.Combine(rootPath, "BepInEx", "config", "RC2MPWE.cfg"); + botDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Bobocraft 2 Community Starter Bots"); } private void CheckForLauncherUpdates() @@ -231,6 +233,39 @@ namespace GameLauncher } } + private void InstallStarterBots(Version _zero) + { + try + { + WebClient webClient = new WebClient(); + Status = LauncherStatus.downloadingUpdate; + webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadStarterBotsCompletedCallback); + webClient.DownloadFileAsync(new Uri("https://drive.google.com/uc?export=download&id=1DBX1tnU2rw7zVcgXFHAydG4wsbK2O-go"), tempZip, _zero); + } + catch (Exception ex) + { + Status = LauncherStatus.failed; + MessageBox.Show($"Error downloading community starter bots: {ex}"); + } + } + + private void DownloadStarterBotsCompletedCallback(object sender, AsyncCompletedEventArgs e) + { + try + { + ZipFile.ExtractToDirectory(tempZip, botDirectory, true); + File.Delete(tempZip); + MessageBox.Show("A collection of Community Starter Bots was placed your desktop, please check the readme file for instructions on how to use them, and welcome to Bobocraft 2!"); + Status = LauncherStatus.downloadingUpdate; + CheckForUpdates(); + } + catch (Exception ex) + { + Status = LauncherStatus.failed; + MessageBox.Show($"Error downloading community starter bots: {ex}"); + } + } + private void DownloadModCompletedCallback(object sender, AsyncCompletedEventArgs e) { try @@ -306,7 +341,7 @@ namespace GameLauncher configString = configString.Replace("UserName = Mod_Player", "UserName = " + chosenUserName); File.WriteAllText(configFile, configString); mainWindowBox.Visibility = Visibility.Hidden; - CheckForUpdates(); + InstallStarterBots(Version.zero); } else { try @@ -326,7 +361,7 @@ namespace GameLauncher MessageBox.Show($"Error writing config file: {ex}"); } mainWindowBox.Visibility = Visibility.Hidden; - CheckForUpdates(); + InstallStarterBots(Version.zero); } } } diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/Properties/Settings.Designer.cs b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/Properties/Settings.Designer.cs similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/Properties/Settings.Designer.cs rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/Properties/Settings.Designer.cs diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/Properties/Settings.settings b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/Properties/Settings.settings similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/Properties/Settings.settings rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/Properties/Settings.settings diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/bobocraft 2 logo vector.png b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/bobocraft 2 logo vector.png similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/bobocraft 2 logo vector.png rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/bobocraft 2 logo vector.png diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/images/Icon.ico b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/images/Icon.ico similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/images/Icon.ico rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/images/Icon.ico diff --git a/Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/images/LauncherBackground.png b/Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/images/LauncherBackground.png similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/GameLauncher/images/LauncherBackground.png rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/GameLauncher/images/LauncherBackground.png diff --git a/Bobocraft 2 Launcher v4 auto update - live version/Licence.txt b/Bobocraft 2 Launcher v5 noob bot collection to desktop/Licence.txt similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/Licence.txt rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/Licence.txt diff --git a/Bobocraft 2 Launcher v4 auto update - live version/README.md b/Bobocraft 2 Launcher v5 noob bot collection to desktop/README.md similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/README.md rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/README.md diff --git a/Bobocraft 2 Launcher v4 auto update - live version/VisualStudio.gitignore b/Bobocraft 2 Launcher v5 noob bot collection to desktop/VisualStudio.gitignore similarity index 100% rename from Bobocraft 2 Launcher v4 auto update - live version/VisualStudio.gitignore rename to Bobocraft 2 Launcher v5 noob bot collection to desktop/VisualStudio.gitignore