diff --git a/Novetus/Novetus.Bootstrapper/NovetusLaunchForm.Designer.cs b/Novetus/Novetus.Bootstrapper/NovetusLaunchForm.Designer.cs index 72457d0..8faba92 100644 --- a/Novetus/Novetus.Bootstrapper/NovetusLaunchForm.Designer.cs +++ b/Novetus/Novetus.Bootstrapper/NovetusLaunchForm.Designer.cs @@ -151,13 +151,14 @@ namespace Novetus.Bootstrapper // // VersionLabel // - this.VersionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.VersionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.VersionLabel.ForeColor = System.Drawing.Color.IndianRed; this.VersionLabel.ImageAlign = System.Drawing.ContentAlignment.BottomLeft; this.VersionLabel.Location = new System.Drawing.Point(20, 95); this.VersionLabel.Name = "VersionLabel"; this.VersionLabel.Size = new System.Drawing.Size(470, 34); this.VersionLabel.TabIndex = 8; + this.VersionLabel.Text = "v1.0"; this.VersionLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter; // // pictureBox1 diff --git a/Novetus/Novetus.Bootstrapper/NovetusLaunchForm.cs b/Novetus/Novetus.Bootstrapper/NovetusLaunchForm.cs index eac683b..c8b97e5 100644 --- a/Novetus/Novetus.Bootstrapper/NovetusLaunchForm.cs +++ b/Novetus/Novetus.Bootstrapper/NovetusLaunchForm.cs @@ -19,7 +19,8 @@ namespace Novetus.Bootstrapper GlobalFuncs.ReadInfoFile(LocalPaths.InfoPath, true, LocalPaths.LauncherPath); - GlobalFuncs.LogPrint("Loading Font..."); + //dammit windows 11... + /*GlobalFuncs.LogPrint("Loading Font..."); try { PrivateFontCollection pfc = new PrivateFontCollection(); @@ -36,7 +37,7 @@ namespace Novetus.Bootstrapper catch (Exception ex) { GlobalFuncs.LogExceptions(ex); - } + }*/ VersionLabel.Text = GlobalVars.ProgramInformation.Version.ToUpper(); CenterToScreen(); diff --git a/Novetus/NovetusCore/CharCustom/CharacterCustomizationShared.cs b/Novetus/NovetusCore/CharCustom/CharacterCustomizationShared.cs index 49cf189..33d033a 100644 --- a/Novetus/NovetusCore/CharCustom/CharacterCustomizationShared.cs +++ b/Novetus/NovetusCore/CharCustom/CharacterCustomizationShared.cs @@ -758,11 +758,13 @@ class CharacterCustomizationShared { GlobalFuncs.LogExceptions(ex); } + string luafile = "rbxasset://scripts\\\\CSView.lua"; string mapfile = GlobalPaths.BasePathLauncher + "\\preview\\content\\fonts\\3DView.rbxl"; string rbxexe = GlobalPaths.BasePathLauncher + (GlobalVars.AdminMode ? "\\preview\\3DView_studio.exe" : "\\preview\\3DView.exe"); string quote = "\""; string script = "_G.CS3DView(0,'" + GlobalVars.UserConfiguration.PlayerName + "'," + GlobalVars.Loadout + ");"; + if (GlobalVars.AdminMode) { DialogResult adminres = MessageBox.Show("Would you like to run 3D Preview Studio with or without scripts?\n\nPress Yes to load with scripts, press No to load without.", "Novetus - 3D Preview Studio", MessageBoxButtons.YesNo, MessageBoxIcon.Information); @@ -772,18 +774,16 @@ class CharacterCustomizationShared script = "_G.CS3DViewEdit();"; } } + string args = quote + mapfile + "\" -script \" dofile('" + luafile + "');" + script + quote; + try { - Process client = new Process(); - client.StartInfo.FileName = rbxexe; - client.StartInfo.Arguments = args; - client.Start(); - client.PriorityClass = GlobalVars.UserConfiguration.Priority; + GlobalFuncs.OpenClient(ScriptType.None, rbxexe, args, "", "", null, true); } catch (Exception ex) { - MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("Failed to launch the 3D Preview. (Error: " + ex.Message + ")", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); GlobalFuncs.LogExceptions(ex); } } diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs index ba74316..c37d4b1 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs @@ -2362,13 +2362,13 @@ public class GlobalFuncs #endif string response = HttpGet(pingURL); #if LAUNCHER - ConsolePrint(!response.Contains("ERROR:") ? "Pinging was successful." : "Unable to connect to the master server. Error: " + response, response.Contains("ERROR:") ? 2 : 4, box); + ConsolePrint(!response.Contains("ERROR:") ? "Pinging was successful." : "Unable to connect to the master server. " + response, response.Contains("ERROR:") ? 2 : 4, box); #elif CMD - ConsolePrint(!response.Contains("ERROR:") ? "Pinging was successful." : "Unable to connect to the master server. Error: " + response, response.Contains("ERROR:") ? 2 : 4); + ConsolePrint(!response.Contains("ERROR:") ? "Pinging was successful." : "Unable to connect to the master server. " + response, response.Contains("ERROR:") ? 2 : 4); #endif } - private static void OpenClient(ScriptType type, string rbxexe, string args, string clientname, string mapname, EventHandler e) + public static void OpenClient(ScriptType type, string rbxexe, string args, string clientname, string mapname, EventHandler e, bool customization = false) { Process client = new Process(); client.StartInfo.FileName = rbxexe; @@ -2381,11 +2381,16 @@ public class GlobalFuncs } client.Start(); client.PriorityClass = GlobalVars.UserConfiguration.Priority; - SecurityFuncs.RenameWindow(client, type, clientname, mapname); - if (e != null) + + if (!customization) { - UpdateRichPresence(GetStateForType(type), clientname, mapname); + SecurityFuncs.RenameWindow(client, type, clientname, mapname); + if (e != null) + { + UpdateRichPresence(GetStateForType(type), clientname, mapname); + } } + #if CMD GlobalVars.ProcessID = client.Id; CreateTXT(); diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs index 6410198..f633248 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs @@ -447,61 +447,64 @@ namespace NovetusLauncher } } - public void StartGame(ScriptType gameType, bool no3d = false, bool nomap = false) + public void StartGame(ScriptType gameType, bool no3d = false, bool nomap = false, bool console = false) { - if (gameType == ScriptType.Studio) + if (!console) { - DialogResult result = MessageBox.Show("If you want to test out your place, you will have to save your place in Novetus's map folder, then launch your place in Play Solo." + - "\n\nPress Yes to launch Studio with a map, or No to launch Studio without a map.", "Novetus - Launch Roblox Studio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); - bool nomapLegacy = false; - - switch (result) + if (gameType == ScriptType.Studio) { - case DialogResult.Cancel: - return; - case DialogResult.No: - nomapLegacy = true; - nomap = nomapLegacy; - break; - default: - break; - } - } - - if (gameType == ScriptType.Server) - { - if (FormStyle == Settings.Style.Stylish) - { - DialogResult result = MessageBox.Show("You have the option to launch your server with or without graphics. Launching the server without graphics enables better performance.\n" + - "However, launching the server with no graphics may cause some elements in later clients may be disabled, such as Dialog boxes. This feature may also make your server unstable.\n\n" + - "Press Yes to launch a server with graphics, or No to launch a Server in No3D Mode.", "Novetus - Launch Server", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); - bool no3dLegacy = false; + DialogResult result = MessageBox.Show("If you want to test out your place, you will have to save your place in Novetus's map folder, then launch your place in Play Solo." + + "\n\nPress Yes to launch Studio with a map, or No to launch Studio without a map.", "Novetus - Launch Roblox Studio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); + bool nomapLegacy = false; switch (result) { case DialogResult.Cancel: return; case DialogResult.No: - no3dLegacy = true; - no3d = no3dLegacy; + nomapLegacy = true; + nomap = nomapLegacy; break; default: break; } } - else if (FormStyle != Settings.Style.Stylish && no3d) - { - DialogResult result = MessageBox.Show("Launching the server without graphics enables better performance.\n" + - "However, launching the server with no graphics may cause some elements in later clients may be disabled, such as Dialog boxes. " + - "This feature may also make your server unstable.", - "Novetus - No3D Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); - switch (result) + if (gameType == ScriptType.Server) + { + if (FormStyle == Settings.Style.Stylish) { - case DialogResult.Cancel: - return; - default: - break; + DialogResult result = MessageBox.Show("You have the option to launch your server with or without graphics. Launching the server without graphics enables better performance.\n" + + "However, launching the server with no graphics may cause some elements in later clients may be disabled, such as Dialog boxes. This feature may also make your server unstable.\n\n" + + "Press Yes to launch a server with graphics, or No to launch a Server in No3D Mode.", "Novetus - Launch Server", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information); + bool no3dLegacy = false; + + switch (result) + { + case DialogResult.Cancel: + return; + case DialogResult.No: + no3dLegacy = true; + no3d = no3dLegacy; + break; + default: + break; + } + } + else if (FormStyle != Settings.Style.Stylish && no3d) + { + DialogResult result = MessageBox.Show("Launching the server without graphics enables better performance.\n" + + "However, launching the server with no graphics may cause some elements in later clients may be disabled, such as Dialog boxes. " + + "This feature may also make your server unstable.", + "Novetus - No3D Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); + + switch (result) + { + case DialogResult.Cancel: + return; + default: + break; + } } } } @@ -720,11 +723,29 @@ namespace NovetusLauncher { switch (cmd) { - case string server3d when string.Compare(server3d, "server 3d", true, CultureInfo.InvariantCulture) == 0: - StartGame(ScriptType.Server); - break; - case string serverno3d when string.Compare(serverno3d, "server no3d", true, CultureInfo.InvariantCulture) == 0: - StartGame(ScriptType.Server, true); + case string server when server.Contains("server", StringComparison.InvariantCultureIgnoreCase) == true: + try + { + string[] vals = server.Split(' '); + + if (vals[1].Equals("3d", StringComparison.InvariantCultureIgnoreCase)) + { + StartGame(ScriptType.Server, false, false, true); + } + else if (vals[1].Equals("no3d", StringComparison.InvariantCultureIgnoreCase)) + { + StartGame(ScriptType.Server, true, false, true); + } + else + { + StartGame(ScriptType.Server, false, false, true); + } + } + catch (Exception ex) + { + GlobalFuncs.LogExceptions(ex); + StartGame(ScriptType.Server, false, false, true); + } break; case string client when string.Compare(client, "client", true, CultureInfo.InvariantCulture) == 0: StartGame(ScriptType.Client); @@ -732,20 +753,57 @@ namespace NovetusLauncher case string solo when string.Compare(solo, "solo", true, CultureInfo.InvariantCulture) == 0: StartGame(ScriptType.Solo); break; - case string studiomap when string.Compare(studiomap, "studio map", true, CultureInfo.InvariantCulture) == 0: - StartGame(ScriptType.Studio); + case string studio when studio.Contains("studio", StringComparison.InvariantCultureIgnoreCase) == true: + try + { + string[] vals = studio.Split(' '); + + if (vals[1].Equals("map", StringComparison.InvariantCultureIgnoreCase)) + { + StartGame(ScriptType.Studio, false, false, true); + } + else if (vals[1].Equals("nomap", StringComparison.InvariantCultureIgnoreCase)) + { + StartGame(ScriptType.Studio, false, true, true); + } + else + { + StartGame(ScriptType.Studio, false, false, true); + } + } + catch (Exception ex) + { + GlobalFuncs.LogExceptions(ex); + StartGame(ScriptType.Studio, false, false, true); + } break; - case string studionomap when string.Compare(studionomap, "studio nomap", true, CultureInfo.InvariantCulture) == 0: - StartGame(ScriptType.Studio, false, true); - break; - case string configsave when string.Compare(configsave, "config save", true, CultureInfo.InvariantCulture) == 0: - WriteConfigValues(); - break; - case string configload when string.Compare(configload, "config load", true, CultureInfo.InvariantCulture) == 0: - ReadConfigValues(); - break; - case string configreset when string.Compare(configreset, "config reset", true, CultureInfo.InvariantCulture) == 0: - ResetConfigValues(); + case string config when config.Contains("config", StringComparison.InvariantCultureIgnoreCase) == true: + try + { + string[] vals = config.Split(' '); + + if (vals[1].Equals("save", StringComparison.InvariantCultureIgnoreCase)) + { + WriteConfigValues(); + } + else if (vals[1].Equals("load", StringComparison.InvariantCultureIgnoreCase)) + { + ReadConfigValues(); + } + else if (vals[1].Equals("reset", StringComparison.InvariantCultureIgnoreCase)) + { + ResetConfigValues(); + } + else + { + GlobalFuncs.ConsolePrint("Please specify 'save', 'load', or 'reset'.", 4, ConsoleBox); + } + } + catch (Exception ex) + { + GlobalFuncs.LogExceptions(ex); + GlobalFuncs.ConsolePrint("Please specify 'save', 'load', or 'reset'.", 4, ConsoleBox); + } break; case string help when string.Compare(help, "help", true, CultureInfo.InvariantCulture) == 0: ConsoleHelp(); @@ -753,13 +811,39 @@ namespace NovetusLauncher case string sdk when string.Compare(sdk, "sdk", true, CultureInfo.InvariantCulture) == 0: LoadLauncher(); break; - case string dlldeleteon when string.Compare(dlldeleteon, "dlldelete on", true, CultureInfo.InvariantCulture) == 0: - GlobalVars.UserConfiguration.DisableReshadeDelete = false; - GlobalFuncs.ConsolePrint("ReShade DLL deletion enabled.", 4, ConsoleBox); + case string dlldelete when string.Compare(dlldelete, "dlldelete", true, CultureInfo.InvariantCulture) == 0: + if (GlobalVars.UserConfiguration.DisableReshadeDelete == true) + { + GlobalVars.UserConfiguration.DisableReshadeDelete = false; + GlobalFuncs.ConsolePrint("ReShade DLL deletion enabled.", 4, ConsoleBox); + } + else + { + GlobalVars.UserConfiguration.DisableReshadeDelete = true; + GlobalFuncs.ConsolePrint("ReShade DLL deletion disabled.", 4, ConsoleBox); + } break; - case string dlldeleteoff when string.Compare(dlldeleteoff, "dlldelete off", true, CultureInfo.InvariantCulture) == 0: - GlobalVars.UserConfiguration.DisableReshadeDelete = true; - GlobalFuncs.ConsolePrint("ReShade DLL deletion disabled.", 4, ConsoleBox); + case string altserverip when altserverip.Contains("altserverip", StringComparison.InvariantCultureIgnoreCase) == true: + try + { + string[] vals = altserverip.Split(' '); + + if (vals[1].Equals("none", StringComparison.InvariantCultureIgnoreCase)) + { + GlobalVars.UserConfiguration.AlternateServerIP = ""; + GlobalFuncs.ConsolePrint("Alternate Server IP removed.", 4, ConsoleBox); + } + else + { + GlobalVars.UserConfiguration.AlternateServerIP = vals[1]; + GlobalFuncs.ConsolePrint("Alternate Server IP set to " + vals[1], 4, ConsoleBox); + } + } + catch (Exception ex) + { + GlobalFuncs.LogExceptions(ex); + GlobalFuncs.ConsolePrint("Please specify the IP address you would like to set Novetus to.", 4, ConsoleBox); + } break; case string important when string.Compare(important, LocalVars.important, true, CultureInfo.InvariantCulture) == 0: GlobalVars.AdminMode = true; @@ -795,13 +879,12 @@ namespace NovetusLauncher GlobalFuncs.ConsolePrint("= studio map | Launches Roblox Studio with the selected map", 4, ConsoleBox, true); GlobalFuncs.ConsolePrint("= studio nomap | Launches Roblox Studio without the selected map", 4, ConsoleBox, true); GlobalFuncs.ConsolePrint("= sdk | Launches the Novetus SDK Launcher", 4, ConsoleBox, true); + GlobalFuncs.ConsolePrint("= dlldelete | Toggle the deletion of opengl32.dll when ReShade is off.", 4, ConsoleBox, true); + GlobalFuncs.ConsolePrint("= altserverip | Sets the alternate server IP for server info. Replace with your specified IP or specify 'none' to remove the current alternate server IP", 4, ConsoleBox, true); GlobalFuncs.ConsolePrint("---------", 1, ConsoleBox, true); GlobalFuncs.ConsolePrint("= config save | Saves the config file", 4, ConsoleBox, true); GlobalFuncs.ConsolePrint("= config load | Reloads the config file", 4, ConsoleBox, true); GlobalFuncs.ConsolePrint("= config reset | Resets the config file", 4, ConsoleBox, true); - GlobalFuncs.ConsolePrint("---------", 1, ConsoleBox, true); - GlobalFuncs.ConsolePrint("= dlldelete off | Turn off the deletion of opengl32.dll when ReShade is off.", 4, ConsoleBox, true); - GlobalFuncs.ConsolePrint("= dlldelete on | Turn on the deletion of opengl32.dll when ReShade is off.", 4, ConsoleBox, true); GlobalFuncs.ConsolePrint(LocalVars.important2, 0, ConsoleBox, true, true); }