fixing shit part 1

This commit is contained in:
Bitl 2022-09-12 14:26:34 -07:00
parent 87823a1578
commit 79a903e6ce
10 changed files with 87 additions and 86 deletions

View File

@ -15,8 +15,8 @@ namespace Novetus.Bootstrapper
{ {
public static void LaunchApplicationExt(string filePath, string appName, string args = "") public static void LaunchApplicationExt(string filePath, string appName, string args = "")
{ {
GlobalFuncs.Config(LocalPaths.ConfigPath, true); FileManagement.Config(LocalPaths.ConfigPath, true);
GlobalFuncs.LogPrint("Starting " + appName); Util.LogPrint("Starting " + appName);
try try
{ {
Process client = new Process(); Process client = new Process();
@ -31,7 +31,7 @@ namespace Novetus.Bootstrapper
} }
catch (Exception ex) catch (Exception ex)
{ {
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to launch Novetus. (Error: " + ex.Message + ")", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }

View File

@ -15,7 +15,7 @@ namespace Novetus.Bootstrapper
private void NovetusLaunchForm_Load(object sender, EventArgs e) private void NovetusLaunchForm_Load(object sender, EventArgs e)
{ {
GlobalFuncs.ReadInfoFile(LocalPaths.InfoPath, true, LocalPaths.LauncherPath); FileManagement.ReadInfoFile(LocalPaths.InfoPath, true, LocalPaths.LauncherPath);
ReadConfigValues(LocalPaths.ConfigPath); ReadConfigValues(LocalPaths.ConfigPath);
if (GlobalVars.UserConfiguration.BootstrapperShowUI) if (GlobalVars.UserConfiguration.BootstrapperShowUI)
@ -53,7 +53,7 @@ namespace Novetus.Bootstrapper
void ReadConfigValues(string cfgpath) void ReadConfigValues(string cfgpath)
{ {
GlobalFuncs.Config(cfgpath, false); FileManagement.Config(cfgpath, false);
LauncherBox.Checked = !GlobalVars.UserConfiguration.BootstrapperShowUI; LauncherBox.Checked = !GlobalVars.UserConfiguration.BootstrapperShowUI;
} }

View File

@ -47,9 +47,9 @@ class CharacterCustomizationShared
#region Form Event Functions #region Form Event Functions
public void InitForm() public void InitForm()
{ {
if (GlobalFuncs.HasColorsChanged()) if (FileManagement.HasColorsChanged())
{ {
GlobalVars.ColorsLoaded = GlobalFuncs.InitColors(); GlobalVars.ColorsLoaded = FileManagement.InitColors();
closeOnLaunch = !GlobalVars.ColorsLoaded; closeOnLaunch = !GlobalVars.ColorsLoaded;
} }
@ -167,21 +167,21 @@ class CharacterCustomizationShared
if (File.Exists(backgroundImage)) if (File.Exists(backgroundImage))
{ {
Image im = GlobalFuncs.LoadImage(backgroundImage); Image im = Util.LoadImage(backgroundImage);
CharBackground.Image = im; CharBackground.Image = im;
} }
} }
//discord //discord
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InCustomization); ClientManagement.UpdateRichPresence(GlobalVars.LauncherState.InCustomization);
GlobalFuncs.ReloadLoadoutValue(); FileManagement.ReloadLoadoutValue();
} }
public void CloseEvent() public void CloseEvent()
{ {
GlobalFuncs.UpdateRichPresence(GlobalFuncs.GetStateForType(GlobalVars.GameOpened)); ClientManagement.UpdateRichPresence(ClientManagement.GetStateForType(GlobalVars.GameOpened));
GlobalFuncs.ReloadLoadoutValue(); FileManagement.ReloadLoadoutValue();
SaveOutfit(false); SaveOutfit(false);
} }
@ -579,7 +579,7 @@ class CharacterCustomizationShared
{ {
MessageBox.Show("Failed to load required colors for the preset.", "Novetus - Preset Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Failed to load required colors for the preset.", "Novetus - Preset Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
ResetColors(); ResetColors();
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
} }
} }
@ -644,7 +644,7 @@ class CharacterCustomizationShared
public void SaveOutfit(bool box = true) public void SaveOutfit(bool box = true)
{ {
GlobalFuncs.Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, true); FileManagement.Customization(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization, true);
if (box) if (box)
{ {
MessageBox.Show("Outfit Saved!", "Novetus - Outfit Saved", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("Outfit Saved!", "Novetus - Outfit Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
@ -661,7 +661,7 @@ class CharacterCustomizationShared
ofd.Title = "Load config_customization.ini"; ofd.Title = "Load config_customization.ini";
if (ofd.ShowDialog() == DialogResult.OK) if (ofd.ShowDialog() == DialogResult.OK)
{ {
GlobalFuncs.Customization(ofd.FileName, false); FileManagement.Customization(ofd.FileName, false);
ReloadColors(); ReloadColors();
MessageBox.Show("Outfit Loaded!", "Novetus - Outfit Loaded", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show("Outfit Loaded!", "Novetus - Outfit Loaded", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
@ -709,7 +709,7 @@ class CharacterCustomizationShared
} }
catch (Exception ex) catch (Exception ex)
{ {
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
box.SelectedItem = defaultitem + ".rbxm"; box.SelectedItem = defaultitem + ".rbxm";
} }
@ -732,7 +732,7 @@ class CharacterCustomizationShared
} }
else else
{ {
outputImage.Image = GlobalFuncs.LoadImage(itemdir + @"\\" + item.Replace(".rbxm", "") + ".png", itemdir + @"\\" + defaultitem + ".png"); outputImage.Image = Util.LoadImage(itemdir + @"\\" + item.Replace(".rbxm", "") + ".png", itemdir + @"\\" + defaultitem + ".png");
} }
} }
@ -747,24 +747,24 @@ class CharacterCustomizationShared
public Image GetItemURLImageFromProvider(Provider provider) public Image GetItemURLImageFromProvider(Provider provider)
{ {
if (provider != null) if (provider != null)
return GlobalFuncs.LoadImage(GlobalPaths.CustomPlayerDir + @"\\" + provider.Icon, GlobalPaths.extradir + @"\\NoExtra.png"); return Util.LoadImage(GlobalPaths.CustomPlayerDir + @"\\" + provider.Icon, GlobalPaths.extradir + @"\\NoExtra.png");
return GlobalFuncs.LoadImage(GlobalPaths.extradir + @"\\NoExtra.png"); return Util.LoadImage(GlobalPaths.extradir + @"\\NoExtra.png");
} }
//we launch the 3dview seperately from normal clients. //we launch the 3dview seperately from normal clients.
public void Launch3DView() public void Launch3DView()
{ {
GlobalFuncs.ReloadLoadoutValue(); FileManagement.ReloadLoadoutValue();
SaveOutfit(false); SaveOutfit(false);
//HACK! //HACK!
try try
{ {
GlobalFuncs.ChangeGameSettings("2011E"); ClientManagement.ChangeGameSettings("2011E");
} }
catch (Exception ex) catch (Exception ex)
{ {
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
} }
string luafile = "rbxasset://scripts\\\\CSView.lua"; string luafile = "rbxasset://scripts\\\\CSView.lua";
@ -787,12 +787,12 @@ class CharacterCustomizationShared
try try
{ {
GlobalFuncs.OpenClient(ScriptType.None, rbxexe, args, "", "", null, true); ClientManagement.OpenClient(ScriptType.None, rbxexe, args, "", "", null, true);
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show("Failed to launch the 3D Preview. (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); Util.LogExceptions(ex);
} }
} }
@ -805,7 +805,7 @@ class CharacterCustomizationShared
} }
catch (Exception ex) catch (Exception ex)
{ {
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
} }
if (!string.IsNullOrWhiteSpace(icon.getInstallOutcome())) if (!string.IsNullOrWhiteSpace(icon.getInstallOutcome()))
@ -825,7 +825,7 @@ class CharacterCustomizationShared
public void LoadLocalIcon() public void LoadLocalIcon()
{ {
Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png", GlobalPaths.extradir + "\\NoExtra.png"); Image icon1 = Util.LoadImage(GlobalPaths.extradirIcons + "\\" + GlobalVars.UserConfiguration.PlayerName + ".png", GlobalPaths.extradir + "\\NoExtra.png");
IconImage.Image = icon1; IconImage.Image = icon1;
} }
@ -861,9 +861,9 @@ class CharacterCustomizationShared
} }
catch (Exception ex) catch (Exception ex)
{ {
Image icon1 = GlobalFuncs.LoadImage(GlobalPaths.extradir + "\\NoExtra.png", GlobalPaths.extradir + "\\NoExtra.png"); Image icon1 = Util.LoadImage(GlobalPaths.extradir + "\\NoExtra.png", GlobalPaths.extradir + "\\NoExtra.png");
IconImage.Image = icon1; IconImage.Image = icon1;
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
} }
} }
#endregion #endregion

View File

@ -103,7 +103,7 @@ class Downloader
#if URI || LAUNCHER || CMD || BASICLAUNCHER #if URI || LAUNCHER || CMD || BASICLAUNCHER
catch (Exception ex) catch (Exception ex)
{ {
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
#else #else
catch (Exception) catch (Exception)
{ {
@ -117,7 +117,7 @@ class Downloader
if (File.Exists(name) && read > 0) if (File.Exists(name) && read > 0)
{ {
downloadSize = read; downloadSize = read;
downloadOutcome = "File " + Path.GetFileName(name) + " downloaded! " + GlobalFuncs.SizeSuffix(Convert.ToInt64(downloadSize), 2) + " written (" + downloadSize + " bytes)! " + additionalText; downloadOutcome = "File " + Path.GetFileName(name) + " downloaded! " + Util.SizeSuffix(Convert.ToInt64(downloadSize), 2) + " written (" + downloadSize + " bytes)! " + additionalText;
} }
else else
{ {
@ -212,7 +212,7 @@ class Downloader
catch (Exception e) catch (Exception e)
{ {
#if URI || LAUNCHER || CMD || BASICLAUNCHER #if URI || LAUNCHER || CMD || BASICLAUNCHER
GlobalFuncs.LogExceptions(e); Util.LogExceptions(e);
#endif #endif
if (e is WebException && bytesProcessed == 0) if (e is WebException && bytesProcessed == 0)
{ {

View File

@ -87,7 +87,7 @@ public class INIFile
#if URI || LAUNCHER || CMD || BASICLAUNCHER #if URI || LAUNCHER || CMD || BASICLAUNCHER
catch (Exception ex) catch (Exception ex)
{ {
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
#else #else
catch (Exception) catch (Exception)
{ {

View File

@ -9,6 +9,7 @@ using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml.Linq; using System.Xml.Linq;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Reflection;
#endregion #endregion
#region Client Management #region Client Management
@ -53,9 +54,9 @@ public class ClientManagement
try try
{ {
#if LAUNCHER #if LAUNCHER
ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available. Novetus will attempt to generate one.", 2, box); Util.ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available. Novetus will attempt to generate one.", 2, box);
#elif CMD #elif CMD
ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available. Novetus will attempt to generate one.", 2); Util.ConsolePrint("ERROR - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available. Novetus will attempt to generate one.", 2);
#endif #endif
GenerateDefaultClientInfo(Path.GetDirectoryName(clientpath)); GenerateDefaultClientInfo(Path.GetDirectoryName(clientpath));
@ -75,11 +76,11 @@ public class ClientManagement
#endif #endif
#if LAUNCHER #if LAUNCHER
ConsolePrint("ERROR - Failed to generate default clientinfo.nov. Info: " + ex.Message, 2, box); Util.ConsolePrint("ERROR - Failed to generate default clientinfo.nov. Info: " + ex.Message, 2, box);
ConsolePrint("Loading default client '" + GlobalVars.ProgramInformation.DefaultClient + "'", 4, box); Util.ConsolePrint("Loading default client '" + GlobalVars.ProgramInformation.DefaultClient + "'", 4, box);
#elif CMD #elif CMD
ConsolePrint("ERROR - Failed to generate default clientinfo.nov. Info: " + ex.Message, 2); Util.ConsolePrint("ERROR - Failed to generate default clientinfo.nov. Info: " + ex.Message, 2);
ConsolePrint("Loading default client '" + GlobalVars.ProgramInformation.DefaultClient + "'", 4); Util.ConsolePrint("Loading default client '" + GlobalVars.ProgramInformation.DefaultClient + "'", 4);
#endif #endif
name = GlobalVars.ProgramInformation.DefaultClient; name = GlobalVars.ProgramInformation.DefaultClient;
#if LAUNCHER #if LAUNCHER
@ -96,9 +97,9 @@ public class ClientManagement
if (initial) if (initial)
{ {
#if LAUNCHER #if LAUNCHER
ConsolePrint("Client '" + name + "' successfully loaded.", 3, box); Util.ConsolePrint("Client '" + name + "' successfully loaded.", 3, box);
#elif CMD #elif CMD
ConsolePrint("Client '" + name + "' successfully loaded.", 3); Util.ConsolePrint("Client '" + name + "' successfully loaded.", 3);
#endif #endif
} }
} }
@ -1055,10 +1056,10 @@ public class ClientManagement
#if LAUNCHER #if LAUNCHER
if (box != null) if (box != null)
{ {
ConsolePrint("ERROR - Failed to launch Novetus. (A server is already running.)", 2, box); Util.ConsolePrint("ERROR - Failed to launch Novetus. (A server is already running.)", 2, box);
} }
#elif CMD #elif CMD
ConsolePrint("ERROR - Failed to launch Novetus. (A server is already running.)", 2); Util.ConsolePrint("ERROR - Failed to launch Novetus. (A server is already running.)", 2);
#endif #endif
#if LAUNCHER #if LAUNCHER
@ -1076,7 +1077,7 @@ public class ClientManagement
#if LAUNCHER #if LAUNCHER
MessageBox.Show(hostingTips, "Novetus - Hosting Tips", MessageBoxButtons.OK, MessageBoxIcon.Information); MessageBox.Show(hostingTips, "Novetus - Hosting Tips", MessageBoxButtons.OK, MessageBoxIcon.Information);
#elif CMD #elif CMD
ConsolePrint(hostingTips + "\nPress any key to continue...", 4); Util.ConsolePrint(hostingTips + "\nPress any key to continue...", 4);
Console.ReadKey(); Console.ReadKey();
#endif #endif
GlobalVars.UserConfiguration.FirstServerLaunch = false; GlobalVars.UserConfiguration.FirstServerLaunch = false;
@ -1095,10 +1096,10 @@ public class ClientManagement
#if LAUNCHER #if LAUNCHER
if (box != null) if (box != null)
{ {
ConsolePrint("ERROR - Failed to launch Novetus. (A game is already running.)", 2, box); Util.ConsolePrint("ERROR - Failed to launch Novetus. (A game is already running.)", 2, box);
} }
#elif CMD #elif CMD
ConsolePrint("ERROR - Failed to launch Novetus. (A game is already running.)", 2); Util.ConsolePrint("ERROR - Failed to launch Novetus. (A game is already running.)", 2);
#endif #endif
#if LAUNCHER #if LAUNCHER
@ -1150,12 +1151,12 @@ public class ClientManagement
#if URI #if URI
UpdateStatus(label, "The client has been detected as modified."); UpdateStatus(label, "The client has been detected as modified.");
#elif LAUNCHER #elif LAUNCHER
if (box != null) if (box != null)
{ {
ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2, box); Util.ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2, box);
} }
#elif CMD #elif CMD
ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2); Util.ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2);
#endif #endif
#if LAUNCHER #if LAUNCHER
@ -1229,10 +1230,9 @@ public class ClientManagement
try try
{ {
#if LAUNCHER #if LAUNCHER
ConsolePrint("Client Loaded.", 4, box); Util.ConsolePrint("Client Loaded.", 4, box);
#elif CMD #elif CMD
ConsolePrint("Client Loaded.", 4); Util.ConsolePrint("Client Loaded.", 4);
#elif URI
#endif #endif
if (type.Equals(ScriptType.Client)) if (type.Equals(ScriptType.Client))
@ -1252,10 +1252,10 @@ public class ClientManagement
#elif LAUNCHER #elif LAUNCHER
if (box != null) if (box != null)
{ {
ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2, box); Util.ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2, box);
} }
#elif CMD #elif CMD
ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2); Util.ConsolePrint("ERROR - Failed to launch Novetus. (The client has been detected as modified.)", 2);
#endif #endif
#if LAUNCHER #if LAUNCHER
@ -1296,9 +1296,9 @@ public class ClientManagement
break; break;
case ScriptType.Server: case ScriptType.Server:
#if LAUNCHER #if LAUNCHER
PingMasterServer(true, "Server will now display on the defined master server.", box); NovetusFuncs.PingMasterServer(true, "Server will now display on the defined master server.", box);
#elif CMD #elif CMD
PingMasterServer(true, "Server will now display on the defined master server."); NovetusFuncs.PingMasterServer(true, "Server will now display on the defined master server.");
#endif #endif
goto default; goto default;
default: default:
@ -1319,10 +1319,10 @@ public class ClientManagement
#elif LAUNCHER #elif LAUNCHER
if (box != null) if (box != null)
{ {
ConsolePrint("ERROR - Failed to launch Novetus. (Error: " + ex.Message + ")", 2, box); Util.ConsolePrint("ERROR - Failed to launch Novetus. (Error: " + ex.Message + ")", 2, box);
} }
#elif CMD #elif CMD
ConsolePrint("ERROR - Failed to launch Novetus. (Error: " + ex.Message + ")", 2); Util.ConsolePrint("ERROR - Failed to launch Novetus. (Error: " + ex.Message + ")", 2);
#endif #endif
#if URI || LAUNCHER #if URI || LAUNCHER
@ -1364,7 +1364,7 @@ public class ClientManagement
#if CMD #if CMD
GlobalVars.ProcessID = client.Id; GlobalVars.ProcessID = client.Id;
CreateTXT(); NovetusFuncs.CreateTXT();
#endif #endif
} }

View File

@ -6,6 +6,7 @@ using System.Threading.Tasks;
using System.Xml; using System.Xml;
using System.Xml.Linq; using System.Xml.Linq;
using System.Linq; using System.Linq;
using System.Windows.Forms;
#endregion #endregion
#region Novetus Functions #region Novetus Functions
@ -152,9 +153,9 @@ public class NovetusFuncs
} }
#if LAUNCHER #if LAUNCHER
ConsolePrint("Pinging master server. " + reason, 4, box); Util.ConsolePrint("Pinging master server. " + reason, 4, box);
#elif CMD #elif CMD
ConsolePrint("Pinging master server. " + reason, 4); Util.ConsolePrint("Pinging master server. " + reason, 4);
#endif #endif
#if LAUNCHER #if LAUNCHER
@ -175,9 +176,9 @@ public class NovetusFuncs
if (!string.IsNullOrWhiteSpace(response)) if (!string.IsNullOrWhiteSpace(response))
{ {
#if LAUNCHER #if LAUNCHER
ConsolePrint(response, response.Contains("ERROR:") ? 2 : 4, box); Util.ConsolePrint(response, response.Contains("ERROR:") ? 2 : 4, box);
#elif CMD #elif CMD
ConsolePrint(response, response.Contains("ERROR:") ? 2 : 4); Util.ConsolePrint(response, response.Contains("ERROR:") ? 2 : 4);
#endif #endif
if (response.Contains("ERROR:")) if (response.Contains("ERROR:"))
@ -189,9 +190,9 @@ public class NovetusFuncs
if (!GlobalVars.ServerID.Equals("N/A")) if (!GlobalVars.ServerID.Equals("N/A"))
{ {
#if LAUNCHER #if LAUNCHER
ConsolePrint("Your server's ID is " + GlobalVars.ServerID, 4, box); Util.ConsolePrint("Your server's ID is " + GlobalVars.ServerID, 4, box);
#elif CMD #elif CMD
ConsolePrint("Your server's ID is " + GlobalVars.ServerID, 4); Util.ConsolePrint("Your server's ID is " + GlobalVars.ServerID, 4);
#endif #endif
} }
@ -235,7 +236,7 @@ public class NovetusFuncs
string txt = GlobalPaths.BasePath + "\\" + GlobalVars.ServerInfoFileName; string txt = GlobalPaths.BasePath + "\\" + GlobalVars.ServerInfoFileName;
File.WriteAllLines(txt, text); File.WriteAllLines(txt, text);
ConsolePrint("Server Information sent to file " + txt, 4); Util.ConsolePrint("Server Information sent to file " + txt, 4);
} }
} }
#endif #endif

View File

@ -54,7 +54,7 @@ namespace NovetusURI
handlers.requestCallback += RequestCallback; handlers.requestCallback += RequestCallback;
DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, "");
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.LoadingURI, true); ClientManagement.UpdateRichPresence(GlobalVars.LauncherState.LoadingURI, true);
} }
} }
#endregion #endregion
@ -69,18 +69,18 @@ namespace NovetusURI
#region Form Events #region Form Events
void LoaderFormLoad(object sender, EventArgs e) void LoaderFormLoad(object sender, EventArgs e)
{ {
GlobalFuncs.UpdateStatus(label1, "Initializing..."); ClientManagement.UpdateStatus(label1, "Initializing...");
if (GlobalVars.UserConfiguration.URIQuickConfigure) if (GlobalVars.UserConfiguration.URIQuickConfigure)
{ {
GlobalFuncs.UpdateStatus(label1, "Loading Player Configuration Menu...."); ClientManagement.UpdateStatus(label1, "Loading Player Configuration Menu....");
QuickConfigure main = new QuickConfigure(); QuickConfigure main = new QuickConfigure();
main.ShowDialog(); main.ShowDialog();
} }
else else
{ {
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true); FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
GlobalFuncs.ReadClientValues(); ClientManagement.ReadClientValues();
LocalVars.ReadyToLaunch = true; LocalVars.ReadyToLaunch = true;
} }
@ -91,12 +91,12 @@ namespace NovetusURI
{ {
try try
{ {
GlobalFuncs.LaunchRBXClient(ScriptType.Client, false, true, new EventHandler(ClientExited), label1); ClientManagement.LaunchRBXClient(ScriptType.Client, false, true, new EventHandler(ClientExited), label1);
Visible = false; Visible = false;
} }
catch (Exception ex) catch (Exception ex)
{ {
GlobalFuncs.LogExceptions(ex); Util.LogExceptions(ex);
Close(); Close();
} }
} }
@ -107,7 +107,7 @@ namespace NovetusURI
{ {
GlobalVars.GameOpened = ScriptType.None; GlobalVars.GameOpened = ScriptType.None;
} }
GlobalFuncs.UpdateRichPresence(GlobalFuncs.GetStateForType(GlobalVars.GameOpened)); ClientManagement.UpdateRichPresence(ClientManagement.GetStateForType(GlobalVars.GameOpened));
Close(); Close();
} }
@ -119,15 +119,15 @@ namespace NovetusURI
} }
else else
{ {
GlobalFuncs.UpdateStatus(label1, "Ready to launch."); ClientManagement.UpdateStatus(label1, "Ready to launch.");
Visible = true; Visible = true;
CenterToScreen(); CenterToScreen();
if (GlobalVars.UserConfiguration.DiscordPresence) if (GlobalVars.UserConfiguration.DiscordPresence)
{ {
GlobalFuncs.UpdateStatus(label1, "Starting Discord Rich Presence..."); ClientManagement.UpdateStatus(label1, "Starting Discord Rich Presence...");
StartDiscord(); StartDiscord();
} }
GlobalFuncs.UpdateStatus(label1, "Launching Game..."); ClientManagement.UpdateStatus(label1, "Launching Game...");
LocalFuncs.SetupURIValues(); LocalFuncs.SetupURIValues();
StartGame(); StartGame();
} }

View File

@ -31,7 +31,7 @@ namespace NovetusURI
void ReadConfigValues(string cfgpath) void ReadConfigValues(string cfgpath)
{ {
GlobalFuncs.Config(cfgpath, false); FileManagement.Config(cfgpath, false);
DontShowBox.Checked = !GlobalVars.UserConfiguration.URIQuickConfigure; DontShowBox.Checked = !GlobalVars.UserConfiguration.URIQuickConfigure;
IDBox.Text = GlobalVars.UserConfiguration.UserID.ToString(); IDBox.Text = GlobalVars.UserConfiguration.UserID.ToString();
TripcodeLabel.Text = GlobalVars.PlayerTripcode.ToString(); TripcodeLabel.Text = GlobalVars.PlayerTripcode.ToString();
@ -40,7 +40,7 @@ namespace NovetusURI
void GeneratePlayerID() void GeneratePlayerID()
{ {
GlobalFuncs.GeneratePlayerID(); NovetusFuncs.GeneratePlayerID();
IDBox.Text = GlobalVars.UserConfiguration.UserID.ToString(); IDBox.Text = GlobalVars.UserConfiguration.UserID.ToString();
} }
@ -71,7 +71,7 @@ namespace NovetusURI
void Button1Click(object sender, EventArgs e) void Button1Click(object sender, EventArgs e)
{ {
GlobalFuncs.LaunchCharacterCustomization(); NovetusFuncs.LaunchCharacterCustomization();
} }
void Button2Click(object sender, EventArgs e) void Button2Click(object sender, EventArgs e)
@ -86,8 +86,8 @@ namespace NovetusURI
void QuickConfigureClose(object sender, CancelEventArgs e) void QuickConfigureClose(object sender, CancelEventArgs e)
{ {
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true); FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
GlobalFuncs.ReadClientValues(); ClientManagement.ReadClientValues();
LocalVars.ReadyToLaunch = true; LocalVars.ReadyToLaunch = true;
} }
#endregion #endregion

View File

@ -30,9 +30,9 @@ namespace NovetusURI
config.AddRuleForAllLevels(logfile); config.AddRuleForAllLevels(logfile);
LogManager.Configuration = config; LogManager.Configuration = config;
GlobalFuncs.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName); FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName);
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false); FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
GlobalVars.ColorsLoaded = GlobalFuncs.InitColors(); GlobalVars.ColorsLoaded = FileManagement.InitColors();
if (args.Length == 0) if (args.Length == 0)
{ {
Application.Run(new InstallForm()); Application.Run(new InstallForm());