fixing shit part 4 - the final fix
This commit is contained in:
parent
c4825952b1
commit
045a672508
|
|
@ -16,43 +16,43 @@ namespace NovetusCMD
|
|||
|
||||
public static void CommandInfo()
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("Novetus CMD Command Line Arguments", 3, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("General", 3, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("-help | Displays the help.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-no3d | Launches server in NoGraphics mode", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-outputinfo | Outputs all information about the running server to a text file.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-debug | Disables launching of the server for debugging purposes.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("Custom server options", 3, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("-upnp | Turns on UPnP.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-map <map filename> | Sets the map.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-client <client name> | Sets the client.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-port <port number> | Sets the server port.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-maxplayers <number of players> | Sets the number of players.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-notifications <true/false> | Toggles server join/leave notifications.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-serverbrowsername <server name> | Changes the name the server uses upon connection to the master server.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("-serverbrowseraddress <master server address> | Changes the master server address.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("How to launch:", 3, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("Create a shortcut to NovetusCMD in the bin folder of Novetus' Directory or", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("create a batch file that launches NovetusCMD.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("Shortcuts", 3, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("Right-click your shortcut and then go to Properties -> Shortcut.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("Go to 'Target' and then click the end of where it says 'NovetusCMD.exe'", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("Press space and then type in whatever arguments you please.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("Batch", 3, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("Click the end of where it says 'NovetusCMD.exe'", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("Press space and then type in whatever arguments you please.", 4, true, true);
|
||||
GlobalFuncs.ConsolePrint("---------", 1, true, true);
|
||||
GlobalFuncs.ConsolePrint("Press any key to close...", 2, true, true);
|
||||
Util.ConsolePrint("Novetus CMD Command Line Arguments", 3, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("General", 3, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("-help | Displays the help.", 4, true, true);
|
||||
Util.ConsolePrint("-no3d | Launches server in NoGraphics mode", 4, true, true);
|
||||
Util.ConsolePrint("-outputinfo | Outputs all information about the running server to a text file.", 4, true, true);
|
||||
Util.ConsolePrint("-debug | Disables launching of the server for debugging purposes.", 4, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("Custom server options", 3, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("-upnp | Turns on UPnP.", 4, true, true);
|
||||
Util.ConsolePrint("-map <map filename> | Sets the map.", 4, true, true);
|
||||
Util.ConsolePrint("-client <client name> | Sets the client.", 4, true, true);
|
||||
Util.ConsolePrint("-port <port number> | Sets the server port.", 4, true, true);
|
||||
Util.ConsolePrint("-maxplayers <number of players> | Sets the number of players.", 4, true, true);
|
||||
Util.ConsolePrint("-notifications <true/false> | Toggles server join/leave notifications.", 4, true, true);
|
||||
Util.ConsolePrint("-serverbrowsername <server name> | Changes the name the server uses upon connection to the master server.", 4, true, true);
|
||||
Util.ConsolePrint("-serverbrowseraddress <master server address> | Changes the master server address.", 4, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("How to launch:", 3, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("Create a shortcut to NovetusCMD in the bin folder of Novetus' Directory or", 4, true, true);
|
||||
Util.ConsolePrint("create a batch file that launches NovetusCMD.", 4, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("Shortcuts", 3, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("Right-click your shortcut and then go to Properties -> Shortcut.", 4, true, true);
|
||||
Util.ConsolePrint("Go to 'Target' and then click the end of where it says 'NovetusCMD.exe'", 4, true, true);
|
||||
Util.ConsolePrint("Press space and then type in whatever arguments you please.", 4, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("Batch", 3, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("Click the end of where it says 'NovetusCMD.exe'", 4, true, true);
|
||||
Util.ConsolePrint("Press space and then type in whatever arguments you please.", 4, true, true);
|
||||
Util.ConsolePrint("---------", 1, true, true);
|
||||
Util.ConsolePrint("Press any key to close...", 2, true, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -40,12 +40,12 @@ namespace NovetusCMD
|
|||
try
|
||||
{
|
||||
NetFuncs.InitUPnP(DeviceFound,DeviceLost);
|
||||
GlobalFuncs.ConsolePrint("UPnP: Service initialized", 3);
|
||||
Util.ConsolePrint("UPnP: Service initialized", 3);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("UPnP: Unable to initialize UPnP. Reason - " + ex.Message, 2);
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.ConsolePrint("UPnP: Unable to initialize UPnP. Reason - " + ex.Message, 2);
|
||||
Util.LogExceptions(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -58,12 +58,12 @@ namespace NovetusCMD
|
|||
{
|
||||
NetFuncs.StartUPnP(device,protocol,port);
|
||||
string IP = !string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : device.GetExternalIP().ToString();
|
||||
GlobalFuncs.ConsolePrint("UPnP: Port " + port + " opened on '" + IP + "' (" + protocol.ToString() + ")", 3);
|
||||
Util.ConsolePrint("UPnP: Port " + port + " opened on '" + IP + "' (" + protocol.ToString() + ")", 3);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("UPnP: Unable to open port mapping. Reason - " + ex.Message, 2);
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.ConsolePrint("UPnP: Unable to open port mapping. Reason - " + ex.Message, 2);
|
||||
Util.LogExceptions(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -76,12 +76,12 @@ namespace NovetusCMD
|
|||
{
|
||||
NetFuncs.StopUPnP(device,protocol,port);
|
||||
string IP = !string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : device.GetExternalIP().ToString();
|
||||
GlobalFuncs.ConsolePrint("UPnP: Port " + port + " closed on '" + IP + "' (" + protocol.ToString() + ")", 3);
|
||||
Util.ConsolePrint("UPnP: Port " + port + " closed on '" + IP + "' (" + protocol.ToString() + ")", 3);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("UPnP: Unable to close port mapping. Reason - " + ex.Message, 2);
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.ConsolePrint("UPnP: Unable to close port mapping. Reason - " + ex.Message, 2);
|
||||
Util.LogExceptions(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -92,14 +92,14 @@ namespace NovetusCMD
|
|||
{
|
||||
INatDevice device = args.Device;
|
||||
string IP = !string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : device.GetExternalIP().ToString();
|
||||
GlobalFuncs.ConsolePrint("UPnP: Device '" + IP + "' registered.", 3);
|
||||
Util.ConsolePrint("UPnP: Device '" + IP + "' registered.", 3);
|
||||
StartUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StartUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("UPnP: Unable to register device. Reason - " + ex.Message, 2);
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.ConsolePrint("UPnP: Unable to register device. Reason - " + ex.Message, 2);
|
||||
Util.LogExceptions(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -109,14 +109,14 @@ namespace NovetusCMD
|
|||
{
|
||||
INatDevice device = args.Device;
|
||||
string IP = !string.IsNullOrWhiteSpace(GlobalVars.UserConfiguration.AlternateServerIP) ? GlobalVars.UserConfiguration.AlternateServerIP : device.GetExternalIP().ToString();
|
||||
GlobalFuncs.ConsolePrint("UPnP: Device '" + IP + "' disconnected.", 3);
|
||||
Util.ConsolePrint("UPnP: Device '" + IP + "' disconnected.", 3);
|
||||
StopUPnP(device, Protocol.Udp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
StopUPnP(device, Protocol.Tcp, GlobalVars.UserConfiguration.RobloxPort);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("UPnP: Unable to disconnect device. Reason - " + ex.Message, 2);
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.ConsolePrint("UPnP: Unable to disconnect device. Reason - " + ex.Message, 2);
|
||||
Util.LogExceptions(ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -124,16 +124,16 @@ namespace NovetusCMD
|
|||
#region Loading/Saving files
|
||||
static void WriteConfigValues()
|
||||
{
|
||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
GlobalFuncs.ReadClientValues();
|
||||
GlobalFuncs.ConsolePrint("Config Saved.", 3);
|
||||
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
ClientManagement.ReadClientValues();
|
||||
Util.ConsolePrint("Config Saved.", 3);
|
||||
}
|
||||
|
||||
static void ReadConfigValues(bool initial = false)
|
||||
{
|
||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||
GlobalFuncs.ConsolePrint("Config loaded.", 3);
|
||||
GlobalFuncs.ReadClientValues(initial);
|
||||
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||
Util.ConsolePrint("Config loaded.", 3);
|
||||
ClientManagement.ReadClientValues(initial);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -157,19 +157,19 @@ namespace NovetusCMD
|
|||
|
||||
if (!LocalVars.PrintHelp)
|
||||
{
|
||||
GlobalFuncs.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName, true,
|
||||
FileManagement.ReadInfoFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName, true,
|
||||
GlobalPaths.RootPathLauncher + "\\Novetus.exe");
|
||||
GlobalFuncs.TurnOffInitialSequence();
|
||||
FileManagement.TurnOffInitialSequence();
|
||||
Console.Title = "Novetus " + GlobalVars.ProgramInformation.Version + " CMD";
|
||||
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD version " + GlobalVars.ProgramInformation.Version + " loaded.", 1);
|
||||
GlobalFuncs.ConsolePrint("Novetus path: " + GlobalPaths.BasePath, 1);
|
||||
Util.ConsolePrint("NovetusCMD version " + GlobalVars.ProgramInformation.Version + " loaded.", 1);
|
||||
Util.ConsolePrint("Novetus path: " + GlobalPaths.BasePath, 1);
|
||||
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD is now loading main server configurations from the INI file.", 5);
|
||||
Util.ConsolePrint("NovetusCMD is now loading main server configurations from the INI file.", 5);
|
||||
|
||||
if (!File.Exists(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName))
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("WARNING 2 - " + GlobalPaths.ConfigName + " not found. Creating one with default values.", 5);
|
||||
Util.ConsolePrint("WARNING 2 - " + GlobalPaths.ConfigName + " not found. Creating one with default values.", 5);
|
||||
WriteConfigValues();
|
||||
}
|
||||
|
||||
|
|
@ -177,19 +177,19 @@ namespace NovetusCMD
|
|||
LoadOverrideINIArgs(args);
|
||||
InitUPnP();
|
||||
|
||||
GlobalFuncs.ConsolePrint("Launching a " + GlobalVars.UserConfiguration.SelectedClient + " server on " + GlobalVars.UserConfiguration.Map + " with " + GlobalVars.UserConfiguration.PlayerLimit + " players.", 1);
|
||||
Util.ConsolePrint("Launching a " + GlobalVars.UserConfiguration.SelectedClient + " server on " + GlobalVars.UserConfiguration.Map + " with " + GlobalVars.UserConfiguration.PlayerLimit + " players.", 1);
|
||||
|
||||
switch (LocalVars.DebugMode)
|
||||
{
|
||||
case true:
|
||||
GlobalVars.RequestToOutputInfo = true;
|
||||
GlobalFuncs.CreateTXT();
|
||||
NovetusFuncs.CreateTXT();
|
||||
break;
|
||||
case false:
|
||||
default:
|
||||
if (GlobalVars.RequestToOutputInfo)
|
||||
{
|
||||
GlobalFuncs.CreateTXT();
|
||||
NovetusFuncs.CreateTXT();
|
||||
}
|
||||
|
||||
StartServer(LocalVars.StartInNo3D);
|
||||
|
|
@ -230,7 +230,7 @@ namespace NovetusCMD
|
|||
|
||||
if (GlobalVars.RequestToOutputInfo)
|
||||
{
|
||||
GlobalFuncs.FixedFileDelete(GlobalPaths.BasePath + "\\" + GlobalVars.ServerInfoFileName);
|
||||
Util.FixedFileDelete(GlobalPaths.BasePath + "\\" + GlobalPaths.ServerInfoFileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -251,8 +251,8 @@ namespace NovetusCMD
|
|||
if (CommandLine["no3d"] != null)
|
||||
{
|
||||
LocalVars.StartInNo3D = true;
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will now launch the server in No3D mode.", 4);
|
||||
GlobalFuncs.ConsolePrint("Launching the server without graphics enables better performance. " +
|
||||
Util.ConsolePrint("NovetusCMD will now launch the server in No3D mode.", 4);
|
||||
Util.ConsolePrint("Launching the server without graphics enables better performance. " +
|
||||
"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.", 5);
|
||||
}
|
||||
|
|
@ -279,7 +279,7 @@ namespace NovetusCMD
|
|||
{
|
||||
LocalVars.OverrideINI = true;
|
||||
GlobalVars.UserConfiguration.UPnP = true;
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will now use UPnP for port forwarding.", 4);
|
||||
Util.ConsolePrint("NovetusCMD will now use UPnP for port forwarding.", 4);
|
||||
}
|
||||
|
||||
if (CommandLine["notifications"] != null)
|
||||
|
|
@ -289,11 +289,11 @@ namespace NovetusCMD
|
|||
|
||||
if (GlobalVars.UserConfiguration.ShowServerNotifications)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will show notifications on player join/leave.", 4);
|
||||
Util.ConsolePrint("NovetusCMD will show notifications on player join/leave.", 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will no longer show notifications on player join/leave.", 4);
|
||||
Util.ConsolePrint("NovetusCMD will no longer show notifications on player join/leave.", 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -302,11 +302,11 @@ namespace NovetusCMD
|
|||
LocalVars.OverrideINI = true;
|
||||
GlobalVars.UserConfiguration.Map = CommandLine["map"];
|
||||
GlobalVars.UserConfiguration.MapPath = CommandLine["map"];
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will now launch the server with the map " + GlobalVars.UserConfiguration.MapPath, 4);
|
||||
Util.ConsolePrint("NovetusCMD will now launch the server with the map " + GlobalVars.UserConfiguration.MapPath, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will launch the server with the map defined in the INI file.", 4);
|
||||
Util.ConsolePrint("NovetusCMD will launch the server with the map defined in the INI file.", 4);
|
||||
}
|
||||
|
||||
if (CommandLine["client"] != null)
|
||||
|
|
@ -316,7 +316,7 @@ namespace NovetusCMD
|
|||
}
|
||||
else
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("NovetusCMD will launch the server with the client defined in the INI file.", 4);
|
||||
Util.ConsolePrint("NovetusCMD will launch the server with the client defined in the INI file.", 4);
|
||||
}
|
||||
|
||||
if (CommandLine["port"] != null)
|
||||
|
|
@ -349,13 +349,13 @@ namespace NovetusCMD
|
|||
#region Client Loading
|
||||
static void StartServer(bool no3d)
|
||||
{
|
||||
GlobalFuncs.LaunchRBXClient(ScriptType.Server, no3d, false, new System.EventHandler(ServerExited));
|
||||
ClientManagement.LaunchRBXClient(ScriptType.Server, no3d, false, new System.EventHandler(ServerExited));
|
||||
}
|
||||
|
||||
static void ServerExited(object sender, EventArgs e)
|
||||
{
|
||||
GlobalVars.GameOpened = ScriptType.None;
|
||||
GlobalFuncs.PingMasterServer(false, "The server has removed itself from the master server list.");
|
||||
NovetusFuncs.PingMasterServer(false, "The server has removed itself from the master server list.");
|
||||
CloseHandlerInternal();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ public class GlobalPaths
|
|||
public static readonly string PartColorXMLName = "PartColors.xml";
|
||||
public static readonly string FileDeleteFilterName = "FileDeleteFilter.txt";
|
||||
public static readonly string InitialFileListIgnoreFilterName = "InitialFileListIgnoreFilter.txt";
|
||||
public static readonly string ServerInfoFileName = "serverinfo.txt";
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ public static class GlobalVars
|
|||
//only for novetuscmd. only here because of launchrbxclient >:(
|
||||
public static int ProcessID = 0;
|
||||
public static bool RequestToOutputInfo = false;
|
||||
public static string ServerInfoFileName = "serverinfo.txt";
|
||||
#endregion
|
||||
|
||||
#region Customization
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ public class NovetusFuncs
|
|||
URI2
|
||||
};
|
||||
|
||||
string txt = GlobalPaths.BasePath + "\\" + GlobalVars.ServerInfoFileName;
|
||||
string txt = GlobalPaths.BasePath + "\\" + GlobalPaths.ServerInfoFileName;
|
||||
File.WriteAllLines(txt, text);
|
||||
Util.ConsolePrint("Server Information sent to file " + txt, 4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ public class ModManager
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
installOutcome = "Error when installing mod: " + ex.Message;
|
||||
}
|
||||
}
|
||||
|
|
@ -155,7 +155,7 @@ public class ModManager
|
|||
|
||||
if (intPercent % 25 == 0 && pastPercentage != intPercent)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("ModManager - Extracting: "
|
||||
Util.ConsolePrint("ModManager - Extracting: "
|
||||
+ e.CurrentEntry.FileName + ". Progress: "
|
||||
+ e.BytesTransferred + "/" + e.TotalBytesToTransfer
|
||||
+ " (" + intPercent + "%)", 3, consoleBox, true);
|
||||
|
|
@ -165,7 +165,7 @@ public class ModManager
|
|||
}
|
||||
else if (e.EventType == ZipProgressEventType.Extracting_BeforeExtractEntry)
|
||||
{
|
||||
GlobalFuncs.ConsolePrint("ModManager - Extracting: " + e.CurrentEntry.FileName, 3, consoleBox);
|
||||
Util.ConsolePrint("ModManager - Extracting: " + e.CurrentEntry.FileName, 3, consoleBox);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ public class ModManager
|
|||
Directory.CreateDirectory(fileInfo.DirectoryName);
|
||||
}
|
||||
|
||||
GlobalFuncs.FixedFileMove(originalPath, destPath, true);
|
||||
Util.FixedFileMove(originalPath, destPath, true);
|
||||
|
||||
++filecount;
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ public class ModManager
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
installOutcome = "Error when creating mod: " + ex.Message;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ namespace NovetusLauncher
|
|||
#region Form Events
|
||||
private void CustomGraphicsOptions_Load(object sender, EventArgs e)
|
||||
{
|
||||
GlobalFuncs.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient, null);
|
||||
info = GlobalFuncs.GetClientInfoValues(GlobalVars.UserConfiguration.SelectedClient);
|
||||
ClientManagement.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient, null);
|
||||
info = ClientManagement.GetClientInfoValues(GlobalVars.UserConfiguration.SelectedClient);
|
||||
|
||||
string terms = "_" + GlobalVars.UserConfiguration.SelectedClient;
|
||||
bool hasFoundDir = false;
|
||||
|
|
@ -63,7 +63,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsMeshQuality.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsShadingQuality.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
try
|
||||
{
|
||||
MaterialQuality = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "TrussDetail", XMLTypes.Token));
|
||||
|
|
@ -106,7 +106,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex2);
|
||||
Util.LogExceptions(ex2);
|
||||
GraphicsMaterialQuality.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsAntiAliasing.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsAASamples.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsBevels.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsShadows2008.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
// try doing march 2007.
|
||||
try
|
||||
{
|
||||
|
|
@ -181,7 +181,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex2);
|
||||
Util.LogExceptions(ex2);
|
||||
GraphicsShadows2007.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
Style2007.Enabled = false;
|
||||
Style2007FolderFinder.Enabled = false;
|
||||
}
|
||||
|
|
@ -227,7 +227,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsLevel.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsFullscreenResolution.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsWindowResolution.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
GraphicsModernResolution.Enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -455,8 +455,8 @@ namespace NovetusLauncher
|
|||
|
||||
private void CustomGraphicsOptions_Close(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
GlobalFuncs.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient, null);
|
||||
GlobalFuncs.ApplyClientSettings_custom(info, GlobalVars.UserConfiguration.SelectedClient, MeshDetail, ShadingQuality, MaterialQuality,
|
||||
ClientManagement.ReadClientValues(GlobalVars.UserConfiguration.SelectedClient, null);
|
||||
ClientManagement.ApplyClientSettings_custom(info, GlobalVars.UserConfiguration.SelectedClient, MeshDetail, ShadingQuality, MaterialQuality,
|
||||
AA, AASamples, Bevels, Shadows_2008, Shadows_2007, Style_2007, QualityLevel,
|
||||
WindowResolution, FullscreenResolution, ModernResolution);
|
||||
}
|
||||
|
|
@ -494,7 +494,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ namespace NovetusLauncher
|
|||
|
||||
void Button8Click(object sender, EventArgs e)
|
||||
{
|
||||
GlobalFuncs.LaunchCharacterCustomization();
|
||||
NovetusFuncs.LaunchCharacterCustomization();
|
||||
}
|
||||
|
||||
void Button9Click(object sender, EventArgs e)
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace NovetusLauncher
|
|||
|
||||
void Button8Click(object sender, EventArgs e)
|
||||
{
|
||||
GlobalFuncs.LaunchCharacterCustomization();
|
||||
NovetusFuncs.LaunchCharacterCustomization();
|
||||
}
|
||||
|
||||
void Button9Click(object sender, EventArgs e)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -97,12 +97,12 @@ namespace NovetusLauncher
|
|||
|
||||
void splashLabel_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
GlobalFuncs.DrawBorderSimple(e.Graphics, splashLabel.DisplayRectangle, Color.White, ButtonBorderStyle.Solid, 1);
|
||||
Util.DrawBorderSimple(e.Graphics, splashLabel.DisplayRectangle, Color.White, ButtonBorderStyle.Solid, 1);
|
||||
}
|
||||
|
||||
public void ReadConfigValues(bool initial = false)
|
||||
{
|
||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||
|
||||
launcherFormStylishInterface1.minimizeOnLaunchBox.IsChecked = GlobalVars.UserConfiguration.CloseOnLaunch;
|
||||
launcherFormStylishInterface1.userIDBox.Text = GlobalVars.UserConfiguration.UserID.ToString();
|
||||
|
|
@ -144,7 +144,7 @@ namespace NovetusLauncher
|
|||
|
||||
public void WriteConfigValues(bool ShowBox = false)
|
||||
{
|
||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
ReadClientValues();
|
||||
if (ShowBox)
|
||||
{
|
||||
|
|
@ -166,7 +166,7 @@ namespace NovetusLauncher
|
|||
f.Close();
|
||||
}
|
||||
|
||||
GlobalFuncs.ResetConfigValues(Settings.Style.Stylish);
|
||||
FileManagement.ResetConfigValues(Settings.Style.Stylish);
|
||||
WriteConfigValues();
|
||||
ReadConfigValues();
|
||||
if (ShowBox)
|
||||
|
|
@ -193,7 +193,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
}
|
||||
|
||||
GlobalFuncs.ReadClientValues(null, initial);
|
||||
ClientManagement.ReadClientValues(null, initial);
|
||||
|
||||
launcherFormStylishInterface1.userNameBox.IsEnabled = GlobalVars.SelectedClientInfo.UsesPlayerName;
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace NovetusLauncher
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
|
|
@ -190,7 +190,7 @@ namespace NovetusLauncher
|
|||
GlobalVars.UserConfiguration.SelectedClient + " | MAP: " +
|
||||
GlobalVars.UserConfiguration.Map + "]";
|
||||
|
||||
GlobalFuncs.UpdateRichPresence(GlobalFuncs.GetStateForType(GlobalVars.GameOpened));
|
||||
ClientManagement.UpdateRichPresence(ClientManagement.GetStateForType(GlobalVars.GameOpened));
|
||||
|
||||
FormCollection fc = System.Windows.Forms.Application.OpenForms;
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ namespace NovetusLauncher
|
|||
if (!IsLoaded)
|
||||
return;
|
||||
|
||||
GlobalFuncs.LaunchCharacterCustomization();
|
||||
NovetusFuncs.LaunchCharacterCustomization();
|
||||
}
|
||||
|
||||
private void joinButton_Click(object sender, RoutedEventArgs e)
|
||||
|
|
@ -247,7 +247,7 @@ namespace NovetusLauncher
|
|||
|
||||
private void regenerateIDButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
GlobalFuncs.GeneratePlayerID();
|
||||
NovetusFuncs.GeneratePlayerID();
|
||||
userIDBox.Text = Convert.ToString(GlobalVars.UserConfiguration.UserID);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ namespace NovetusLauncher
|
|||
#region Form Events
|
||||
private void NovetusSettings_Load(object sender, EventArgs e)
|
||||
{
|
||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
ReadConfigValues();
|
||||
CenterToScreen();
|
||||
}
|
||||
|
||||
private void NovetusSettings_Close(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
|
||||
FormCollection fc = Application.OpenForms;
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ namespace NovetusLauncher
|
|||
{
|
||||
if (GlobalVars.UserConfiguration.QualityLevel == Settings.Level.Custom)
|
||||
{
|
||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
|
||||
CustomGraphicsOptions opt = new CustomGraphicsOptions();
|
||||
opt.Show();
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ namespace NovetusLauncher
|
|||
#region Functions
|
||||
void ReadConfigValues()
|
||||
{
|
||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||
checkBox5.Checked = GlobalVars.UserConfiguration.ReShade;
|
||||
checkBox6.Checked = GlobalVars.UserConfiguration.ReShadeFPSDisplay;
|
||||
checkBox7.Checked = GlobalVars.UserConfiguration.ReShadePerformanceMode;
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ public partial class AssetDownloader : Form
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
MessageBox.Show("Error: Unable to download the file. " + ex.Message, "Asset Downloader - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ public partial class AssetDownloader : Form
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
MessageBox.Show("Error: Unable to download the file. Try using a different file name or ID.", "Asset Downloader - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
|
@ -185,7 +185,7 @@ public partial class AssetDownloader : Form
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ public partial class AssetDownloader : Form
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
|
|
@ -282,12 +282,12 @@ public partial class AssetDownloader : Form
|
|||
|
||||
string extraText = (lines.Count() != lineCount) ? "\n" + (lines.Count() - lineCount) + " errors were detected during the download. Make sure your IDs and links are valid." : "";
|
||||
|
||||
MessageBox.Show("Batch download complete! " + lineCount + " items downloaded! " + GlobalFuncs.SizeSuffix(Convert.ToInt64(batchDownloadSize), 2) + " written (" + batchDownloadSize + " bytes)!" + extraText, "Asset Downloader - Download Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageBox.Show("Batch download complete! " + lineCount + " items downloaded! " + Util.SizeSuffix(Convert.ToInt64(batchDownloadSize), 2) + " written (" + batchDownloadSize + " bytes)!" + extraText, "Asset Downloader - Download Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
GlobalFuncs.LogExceptions(ex);
|
||||
Util.LogExceptions(ex);
|
||||
|
||||
MessageBox.Show("Unable to batch download files. Error:" + ex.Message + "\n Make sure your items are set up properly.", "Asset Downloader - Unable to batch download files.", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue