diff --git a/NovetusLauncher/NovetusCMD/Program.cs b/NovetusLauncher/NovetusCMD/Program.cs
index 15380c4..2f7623b 100644
--- a/NovetusLauncher/NovetusCMD/Program.cs
+++ b/NovetusLauncher/NovetusCMD/Program.cs
@@ -340,7 +340,7 @@ namespace NovetusCMD
static void StartServer(bool no3d)
{
string luafile = "";
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
luafile = "rbxasset://scripts\\\\" + GlobalVars.ScriptName + ".lua";
}
@@ -350,7 +350,7 @@ namespace NovetusCMD
}
string mapfile = GlobalVars.MapPath;
string rbxexe = "";
- if (GlobalVars.LegacyMode == true)
+ if (GlobalVars.SelectedClientInfo.LegacyMode == true)
{
rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp.exe";
}
@@ -360,9 +360,9 @@ namespace NovetusCMD
}
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server) + "; " + (!string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? "dofile('" + GlobalVars.AddonScriptPath + "');" : "") + quote + (no3d ? " -no3d" : "");
}
@@ -376,11 +376,11 @@ namespace NovetusCMD
{
if (!no3d)
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
}
try
diff --git a/NovetusLauncher/NovetusFuncs/ClientScript.cs b/NovetusLauncher/NovetusFuncs/ClientScript.cs
index 813223c..c88cf80 100644
--- a/NovetusLauncher/NovetusFuncs/ClientScript.cs
+++ b/NovetusLauncher/NovetusFuncs/ClientScript.cs
@@ -48,13 +48,13 @@ public class ClientScript
public static string GetRawArgsForType(ScriptGenerator.ScriptType type, string md5s, string luafile)
{
if (type == ScriptGenerator.ScriptType.Client) {
- if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == true) {
+ if (GlobalVars.SelectedClientInfo.UsesPlayerName == true && GlobalVars.SelectedClientInfo.UsesID == true) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
- } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == true) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false && GlobalVars.SelectedClientInfo.UsesID == true) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'Player'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
- } else if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == false) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == true && GlobalVars.SelectedClientInfo.UsesID == false) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSConnect(0,'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
- } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == false) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false && GlobalVars.SelectedClientInfo.UsesID == false) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSConnect(0,'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'Player'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
} else {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
@@ -62,13 +62,13 @@ public class ClientScript
} else if (type == ScriptGenerator.ScriptType.Server) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + "); " + (!string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? LauncherFuncs.ChangeGameSettings() + " dofile('" + GlobalVars.AddonScriptPath + "');" : "");
} else if (type == ScriptGenerator.ScriptType.Solo) {
- if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == true) {
+ if (GlobalVars.SelectedClientInfo.UsesPlayerName == true && GlobalVars.SelectedClientInfo.UsesID == true) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSSolo(" + GlobalVars.UserID + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.sololoadtext + ")";
- } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == true) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false && GlobalVars.SelectedClientInfo.UsesID == true) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSSolo(" + GlobalVars.UserID + ",'Player'," + GlobalVars.sololoadtext + ")";
- } else if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == false) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == true && GlobalVars.SelectedClientInfo.UsesID == false) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSSolo(0,'" + GlobalVars.PlayerName + "'," + GlobalVars.sololoadtext + ")";
- } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == false) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false && GlobalVars.SelectedClientInfo.UsesID == false) {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSSolo(0,'Player'," + GlobalVars.sololoadtext + ")";
} else {
return LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); _G.CSSolo(" + GlobalVars.UserID + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.sololoadtext + ")";
@@ -122,7 +122,7 @@ public class ClientScript
public static string CompileScript(string code, string tag, string endtag, string mapfile, string luafile, string rbxexe)
{
- if (GlobalVars.FixScriptMapMode) {
+ if (GlobalVars.SelectedClientInfo.Fix2007) {
ScriptGenerator.GenerateScriptForClient(GetTypeFromTag(tag, endtag));
}
@@ -133,9 +133,9 @@ public class ClientScript
return "";
}
- string md5dir = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location) : "";
- string md5script = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptName + ".lua") : "";
- string md5exe = GlobalVars.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(rbxexe) : "";
+ string md5dir = GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location) : "";
+ string md5script = GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptName + ".lua") : "";
+ string md5exe = GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true ? SecurityFuncs.CalculateMD5(rbxexe) : "";
string md5s = "'" + md5exe + "','" + md5dir + "','" + md5script + "'";
string compiled = extractedCode.Replace("%mapfile%", mapfile)
.Replace("%luafile%", luafile)
@@ -168,10 +168,9 @@ public class ClientScript
.Replace("%llegcolor%", GlobalVars.LeftLegColorID.ToString())
.Replace("%rarmcolor%", GlobalVars.RightArmColorID.ToString())
.Replace("%rlegcolor%", GlobalVars.RightLegColorID.ToString())
- .Replace("%rlegcolor%", GlobalVars.SelectedClientMD5)
.Replace("%md5launcher%", md5dir)
- .Replace("%md5script%", GlobalVars.SelectedClientMD5)
- .Replace("%md5exe%", GlobalVars.SelectedClientScriptMD5)
+ .Replace("%md5script%", GlobalVars.SelectedClientInfo.ClientMD5)
+ .Replace("%md5exe%", GlobalVars.SelectedClientInfo.ScriptMD5)
.Replace("%md5scriptd%", md5script)
.Replace("%md5exed%", md5exe)
.Replace("%limit%", GlobalVars.PlayerLimit.ToString())
diff --git a/NovetusLauncher/NovetusFuncs/GlobalVars.cs b/NovetusLauncher/NovetusFuncs/GlobalVars.cs
index b575f1d..1825ffb 100644
--- a/NovetusLauncher/NovetusFuncs/GlobalVars.cs
+++ b/NovetusLauncher/NovetusFuncs/GlobalVars.cs
@@ -171,17 +171,7 @@ public static class GlobalVars
public static bool OldLayout = false;
//client shit
public static string SelectedClient = "";
- public static bool UsesPlayerName = false;
- public static bool UsesID = true;
- public static string SelectedClientDesc = "";
- public static string Warning = "";
- public static bool LegacyMode = false;
- public static string SelectedClientMD5 = "";
- public static string SelectedClientScriptMD5 = "";
- public static bool FixScriptMapMode = false;
- public static bool AlreadyHasSecurity = false;
- public static bool NoGraphicsModeOptions = false;
- public static string CustomArgs = "";
+ public static ClientInfo SelectedClientInfo = new ClientInfo();
public static string AddonScriptPath = "";
//info shit
public static string DefaultClient = "";
diff --git a/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs b/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs
index dfdae7a..4b00c67 100644
--- a/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs
+++ b/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs
@@ -603,32 +603,30 @@ public class LauncherFuncs
}
bool bline1 = Convert.ToBoolean(Decryptline1);
- GlobalVars.UsesPlayerName = bline1;
+ GlobalVars.SelectedClientInfo.UsesPlayerName = bline1;
bool bline2 = Convert.ToBoolean(Decryptline2);
- GlobalVars.UsesID = bline2;
-
- GlobalVars.Warning = Decryptline3;
+ GlobalVars.SelectedClientInfo.UsesID = bline2;
+
+ GlobalVars.SelectedClientInfo.Warning = Decryptline3;
bool bline4 = Convert.ToBoolean(Decryptline4);
- GlobalVars.LegacyMode = bline4;
-
- GlobalVars.SelectedClientMD5 = Decryptline5;
-
- GlobalVars.SelectedClientScriptMD5 = Decryptline6;
-
- GlobalVars.SelectedClientDesc = Decryptline7;
+ GlobalVars.SelectedClientInfo.LegacyMode = bline4;
+
+ GlobalVars.SelectedClientInfo.ClientMD5 = Decryptline5;
+ GlobalVars.SelectedClientInfo.ScriptMD5 = Decryptline6;
+ GlobalVars.SelectedClientInfo.Description = Decryptline7;
bool bline9 = Convert.ToBoolean(Decryptline9);
- GlobalVars.FixScriptMapMode = bline9;
+ GlobalVars.SelectedClientInfo.Fix2007 = bline9;
bool bline10 = Convert.ToBoolean(Decryptline10);
- GlobalVars.AlreadyHasSecurity = bline10;
+ GlobalVars.SelectedClientInfo.AlreadyHasSecurity = bline10;
bool bline11 = Convert.ToBoolean(Decryptline11);
- GlobalVars.NoGraphicsModeOptions = bline11;
+ GlobalVars.SelectedClientInfo.NoGraphicsOptions = bline11;
- GlobalVars.CustomArgs = Decryptline12;
+ GlobalVars.SelectedClientInfo.CommandLineArgs = Decryptline12;
}
public static void GeneratePlayerID()
@@ -762,7 +760,7 @@ public class LauncherFuncs
{
string result = "";
- if (!GlobalVars.NoGraphicsModeOptions)
+ if (!GlobalVars.SelectedClientInfo.NoGraphicsOptions)
{
if (GlobalVars.GraphicsMode == 1)
{
@@ -854,7 +852,7 @@ public class LauncherFuncs
{
string luafile = "";
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
luafile = "rbxasset://scripts\\\\" + GlobalVars.ScriptName + ".lua";
}
@@ -869,7 +867,7 @@ public class LauncherFuncs
public static string GetClientEXEDir(ScriptGenerator.ScriptType type)
{
string rbxexe = "";
- if (GlobalVars.LegacyMode == true)
+ if (GlobalVars.SelectedClientInfo.LegacyMode)
{
rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp.exe";
}
diff --git a/NovetusLauncher/NovetusFuncs/NovetusSpecialClasses.cs b/NovetusLauncher/NovetusFuncs/NovetusSpecialClasses.cs
index 825764d..9c567c2 100644
--- a/NovetusLauncher/NovetusFuncs/NovetusSpecialClasses.cs
+++ b/NovetusLauncher/NovetusFuncs/NovetusSpecialClasses.cs
@@ -17,24 +17,31 @@
public string[] GameDir { get; set; }
}
-//maybe...
-public class Client
+/*
+ * add classes for:
+ *
+ * config
+ * customization
+ * info
+ * reshade
+ *
+ * also change field names for all forms and config read/writes
+ */
+public class ClientInfo
{
- public Client(bool playername, bool playerid, string description,
- string warning, bool legacymode, string clientmd5, string scriptmd5,
- bool fix2007, bool hassecurity, bool nographicsoptions, string commandlineargs)
+ public ClientInfo()
{
- UsesPlayerName = playername;
- UsesID = playerid;
- Description = description;
- Warning = warning;
- LegacyMode = legacymode;
- ClientMD5 = clientmd5;
- ScriptMD5 = scriptmd5;
- Fix2007 = fix2007;
- HasSecurity = hassecurity;
- NoGraphicsOptions = nographicsoptions;
- CommandLineArgs = commandlineargs;
+ UsesPlayerName = false;
+ UsesID = true;
+ Description = "";
+ Warning = "";
+ LegacyMode = false;
+ ClientMD5 = "";
+ ScriptMD5 = "";
+ Fix2007 = false;
+ AlreadyHasSecurity = false;
+ NoGraphicsOptions = false;
+ CommandLineArgs = "";
}
public bool UsesPlayerName { get; set; }
@@ -45,7 +52,7 @@ public class Client
public string ClientMD5 { get; set; }
public string ScriptMD5 { get; set; }
public bool Fix2007 { get; set; }
- public bool HasSecurity { get; set; }
+ public bool AlreadyHasSecurity { get; set; }
public bool NoGraphicsOptions { get; set; }
public string CommandLineArgs { get; set; }
}
\ No newline at end of file
diff --git a/NovetusLauncher/NovetusFuncs/ScriptGenerator.cs b/NovetusLauncher/NovetusFuncs/ScriptGenerator.cs
index 9da5872..f67f491 100644
--- a/NovetusLauncher/NovetusFuncs/ScriptGenerator.cs
+++ b/NovetusLauncher/NovetusFuncs/ScriptGenerator.cs
@@ -39,7 +39,7 @@ public class ScriptGenerator
public static string GetScriptFuncForType(ScriptType type)
{
string rbxexe = "";
- if (GlobalVars.LegacyMode == true) {
+ if (GlobalVars.SelectedClientInfo.LegacyMode == true) {
rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp.exe";
} else {
rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp_client.exe";
@@ -50,13 +50,13 @@ public class ScriptGenerator
string md5exe = SecurityFuncs.CalculateMD5(rbxexe);
string md5s = "'" + md5exe + "','" + md5dir + "','" + md5script + "'";
if (type == ScriptType.Client) {
- if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == true) {
+ if (GlobalVars.SelectedClientInfo.UsesPlayerName == true && GlobalVars.SelectedClientInfo.UsesID == true) {
return "_G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
- } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == true) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false && GlobalVars.SelectedClientInfo.UsesID == true) {
return "_G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'Player'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
- } else if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == false) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == true && GlobalVars.SelectedClientInfo.UsesID == false) {
return "_G.CSConnect(0,'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
- } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == false) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false && GlobalVars.SelectedClientInfo.UsesID == false) {
return "_G.CSConnect(0,'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'Player'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
} else {
return "_G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.loadtext + "," + md5s + ",'" + GlobalVars.PlayerTripcode + "')";
@@ -64,13 +64,13 @@ public class ScriptGenerator
} else if (type == ScriptType.Server) {
return "_G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + ")";
} else if (type == ScriptType.Solo || type == ScriptType.EasterEgg) {
- if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == true) {
+ if (GlobalVars.SelectedClientInfo.UsesPlayerName == true && GlobalVars.SelectedClientInfo.UsesID == true) {
return "_G.CSSolo(" + GlobalVars.UserID + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.sololoadtext + ")";
- } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == true) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false && GlobalVars.SelectedClientInfo.UsesID == true) {
return "_G.CSSolo(" + GlobalVars.UserID + ",'Player'," + GlobalVars.sololoadtext + ")";
- } else if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == false) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == true && GlobalVars.SelectedClientInfo.UsesID == false) {
return "_G.CSSolo(0,'" + GlobalVars.PlayerName + "'," + GlobalVars.sololoadtext + ")";
- } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == false) {
+ } else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false && GlobalVars.SelectedClientInfo.UsesID == false) {
return "_G.CSSolo(0,'Player'," + GlobalVars.sololoadtext + ")";
} else {
return "_G.CSSolo(" + GlobalVars.UserID + ",'" + GlobalVars.PlayerName + "'," + GlobalVars.sololoadtext + ")";
diff --git a/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs b/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs
index 44e6f0b..faadc92 100644
--- a/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs
+++ b/NovetusLauncher/NovetusFuncs/SecurityFuncs.cs
@@ -97,9 +97,9 @@ public class SecurityFuncs
public static bool checkClientMD5(string client)
{
if (GlobalVars.AdminMode != true) {
- if (GlobalVars.AlreadyHasSecurity != true) {
+ if (GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true) {
string rbxexe = "";
- if (GlobalVars.LegacyMode == true) {
+ if (GlobalVars.SelectedClientInfo.LegacyMode == true) {
rbxexe = GlobalVars.BasePath + "\\clients\\" + client + "\\RobloxApp.exe";
} else {
rbxexe = GlobalVars.BasePath + "\\clients\\" + client + "\\RobloxApp_client.exe";
@@ -108,7 +108,7 @@ public class SecurityFuncs
using (var stream = File.OpenRead(rbxexe)) {
byte[] hash = md5.ComputeHash(stream);
string clientMD5 = BitConverter.ToString(hash).Replace("-", "");
- if (clientMD5.Equals(GlobalVars.SelectedClientMD5)) {
+ if (clientMD5.Equals(GlobalVars.SelectedClientInfo.ClientMD5)) {
return true;
} else {
return false;
@@ -126,13 +126,13 @@ public class SecurityFuncs
public static bool checkScriptMD5(string client)
{
if (GlobalVars.AdminMode != true) {
- if (GlobalVars.AlreadyHasSecurity != true) {
+ if (GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true) {
string rbxscript = GlobalVars.BasePath + "\\clients\\" + client + "\\content\\scripts\\" + GlobalVars.ScriptName + ".lua";
using (var md5 = MD5.Create()) {
using (var stream = File.OpenRead(rbxscript)) {
byte[] hash = md5.ComputeHash(stream);
string clientMD5 = BitConverter.ToString(hash).Replace("-", "");
- if (clientMD5.Equals(GlobalVars.SelectedClientScriptMD5)) {
+ if (clientMD5.Equals(GlobalVars.SelectedClientInfo.ScriptMD5)) {
return true;
} else {
return false;
@@ -170,7 +170,7 @@ public class SecurityFuncs
public static void RenameWindow(Process exe, ScriptGenerator.ScriptType type, string mapname)
{
- if (GlobalVars.AlreadyHasSecurity != true) {
+ if (GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true) {
int time = 500;
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork += (obj, e) => WorkerDoWork(exe, type, time, worker, GlobalVars.SelectedClient, mapname);
diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs b/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs
index c52610a..c54eb26 100644
--- a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs
+++ b/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization.cs
@@ -1902,7 +1902,10 @@ namespace NovetusLauncher
break;
}
- GlobalVars.Custom_Shirt_Offline = Custom_Shirt_URL + textBox11.Text;
+ if (!string.IsNullOrWhiteSpace(textBox11.Text))
+ {
+ GlobalVars.Custom_Shirt_Offline = Custom_Shirt_URL + textBox11.Text;
+ }
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
@@ -1917,7 +1920,10 @@ namespace NovetusLauncher
break;
}
- GlobalVars.Custom_Pants_Offline = Custom_Pants_URL + textBox13.Text;
+ if (!string.IsNullOrWhiteSpace(textBox13.Text))
+ {
+ GlobalVars.Custom_Pants_Offline = Custom_Pants_URL + textBox13.Text;
+ }
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
@@ -1932,7 +1938,10 @@ namespace NovetusLauncher
break;
}
- GlobalVars.Custom_T_Shirt_Offline = Custom_T_Shirt_URL + textBox12.Text;
+ if (!string.IsNullOrWhiteSpace(textBox12.Text))
+ {
+ GlobalVars.Custom_T_Shirt_Offline = Custom_T_Shirt_URL + textBox12.Text;
+ }
}
}
}
diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs b/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs
index 487e535..97c3345 100644
--- a/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs
+++ b/NovetusLauncher/NovetusLauncher/CharacterCustomization/CharacterCustomization_legacy.cs
@@ -1894,7 +1894,10 @@ namespace NovetusLauncher
break;
}
- GlobalVars.Custom_T_Shirt_Offline = Custom_T_Shirt_URL + textBox11.Text;
+ if (!string.IsNullOrWhiteSpace(textBox11.Text))
+ {
+ GlobalVars.Custom_T_Shirt_Offline = Custom_T_Shirt_URL + textBox11.Text;
+ }
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
@@ -1909,7 +1912,10 @@ namespace NovetusLauncher
break;
}
- GlobalVars.Custom_Shirt_Offline = Custom_Shirt_URL + textBox12.Text;
+ if (!string.IsNullOrWhiteSpace(textBox12.Text))
+ {
+ GlobalVars.Custom_Shirt_Offline = Custom_Shirt_URL + textBox12.Text;
+ }
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
@@ -1924,7 +1930,10 @@ namespace NovetusLauncher
break;
}
- GlobalVars.Custom_Pants_Offline = Custom_Pants_URL + textBox13.Text;
+ if (!string.IsNullOrWhiteSpace(textBox13.Text))
+ {
+ GlobalVars.Custom_Pants_Offline = Custom_Pants_URL + textBox13.Text;
+ }
}
}
}
diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs b/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs
index 9ff2c45..832e9a8 100644
--- a/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs
+++ b/NovetusLauncher/NovetusLauncher/MainForm/MainForm.cs
@@ -596,16 +596,16 @@ namespace NovetusLauncher
{
LauncherFuncs.ReadClientValues(clientpath);
- if (GlobalVars.UsesPlayerName == true)
+ if (GlobalVars.SelectedClientInfo.UsesPlayerName == true)
{
textBox2.Enabled = true;
}
- else if (GlobalVars.UsesPlayerName == false)
+ else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false)
{
textBox2.Enabled = false;
}
- if (GlobalVars.UsesID == true)
+ if (GlobalVars.SelectedClientInfo.UsesID == true)
{
textBox5.Enabled = true;
button4.Enabled = true;
@@ -614,7 +614,7 @@ namespace NovetusLauncher
checkBox3.Enabled = true;
}
}
- else if (GlobalVars.UsesID == false)
+ else if (GlobalVars.SelectedClientInfo.UsesID == false)
{
textBox5.Enabled = false;
button4.Enabled = false;
@@ -622,9 +622,9 @@ namespace NovetusLauncher
GlobalVars.LocalPlayMode = false;
}
- if (!string.IsNullOrWhiteSpace(GlobalVars.Warning))
+ if (!string.IsNullOrWhiteSpace(GlobalVars.SelectedClientInfo.Warning))
{
- label30.Text = GlobalVars.Warning;
+ label30.Text = GlobalVars.SelectedClientInfo.Warning;
label30.Visible = true;
}
else
@@ -632,7 +632,7 @@ namespace NovetusLauncher
label30.Visible = false;
}
- textBox6.Text = GlobalVars.SelectedClientDesc;
+ textBox6.Text = GlobalVars.SelectedClientInfo.Description;
label26.Text = GlobalVars.SelectedClient;
ConsolePrint("Client '" + GlobalVars.SelectedClient + "' successfully loaded.", 3);
}
@@ -896,9 +896,9 @@ namespace NovetusLauncher
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = "-script " + quote + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client) + quote;
}
@@ -910,14 +910,14 @@ namespace NovetusLauncher
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", "", luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", "", luafile, rbxexe);
}
try
{
ConsolePrint("Client Loaded.", 4);
if (GlobalVars.AdminMode != true)
{
- if (GlobalVars.AlreadyHasSecurity != true)
+ if (GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true)
{
if (SecurityFuncs.checkClientMD5(GlobalVars.SelectedClient) == true)
{
@@ -1002,9 +1002,9 @@ namespace NovetusLauncher
string mapfile = GlobalVars.MapPath;
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Solo) + quote;
}
@@ -1016,7 +1016,7 @@ namespace NovetusLauncher
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
try
{
@@ -1046,9 +1046,9 @@ namespace NovetusLauncher
string mapfile = GlobalVars.MapPath;
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server) + "; " + (!string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? LauncherFuncs.ChangeGameSettings() + " dofile('" + GlobalVars.AddonScriptPath + "');" : "") + quote + (no3d ? " -no3d" : "");
}
@@ -1062,11 +1062,11 @@ namespace NovetusLauncher
{
if (!no3d)
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
}
try
@@ -1098,9 +1098,9 @@ namespace NovetusLauncher
string mapname = (nomap ? "" : GlobalVars.Map);
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Studio) + quote;
}
@@ -1112,7 +1112,7 @@ namespace NovetusLauncher
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
try
{
@@ -1143,9 +1143,9 @@ namespace NovetusLauncher
string mapfile = GlobalVars.ConfigDirData + "\\Appreciation.rbxl";
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.EasterEgg) + quote;
}
@@ -1157,7 +1157,7 @@ namespace NovetusLauncher
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
try
{
diff --git a/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs b/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs
index ea8e2ec..57a305d 100644
--- a/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs
+++ b/NovetusLauncher/NovetusLauncher/MainForm/MainForm_legacy.cs
@@ -563,16 +563,16 @@ namespace NovetusLauncher
{
LauncherFuncs.ReadClientValues(clientpath);
- if (GlobalVars.UsesPlayerName == true)
+ if (GlobalVars.SelectedClientInfo.UsesPlayerName == true)
{
textBox2.Enabled = true;
}
- else if (GlobalVars.UsesPlayerName == false)
+ else if (GlobalVars.SelectedClientInfo.UsesPlayerName == false)
{
textBox2.Enabled = false;
}
- if (GlobalVars.UsesID == true)
+ if (GlobalVars.SelectedClientInfo.UsesID == true)
{
textBox5.Enabled = true;
button4.Enabled = true;
@@ -581,7 +581,7 @@ namespace NovetusLauncher
checkBox3.Enabled = true;
}
}
- else if (GlobalVars.UsesID == false)
+ else if (GlobalVars.SelectedClientInfo.UsesID == false)
{
textBox5.Enabled = false;
button4.Enabled = false;
@@ -589,9 +589,9 @@ namespace NovetusLauncher
GlobalVars.LocalPlayMode = false;
}
- if (!string.IsNullOrWhiteSpace(GlobalVars.Warning))
+ if (!string.IsNullOrWhiteSpace(GlobalVars.SelectedClientInfo.Warning))
{
- label30.Text = GlobalVars.Warning;
+ label30.Text = GlobalVars.SelectedClientInfo.Warning;
label30.Visible = true;
}
else
@@ -599,7 +599,7 @@ namespace NovetusLauncher
label30.Visible = false;
}
- textBox6.Text = GlobalVars.SelectedClientDesc;
+ textBox6.Text = GlobalVars.SelectedClientInfo.Description;
label26.Text = GlobalVars.SelectedClient;
ConsolePrint("Client '" + GlobalVars.SelectedClient + "' successfully loaded.", 3);
}
@@ -860,12 +860,12 @@ namespace NovetusLauncher
{
string luafile = LauncherFuncs.GetLuaFileName();
string rbxexe = LauncherFuncs.GetClientEXEDir(ScriptGenerator.ScriptType.Client);
-
+
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = "-script " + quote + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client) + quote;
}
@@ -877,14 +877,14 @@ namespace NovetusLauncher
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", "", luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", "", luafile, rbxexe);
}
try
{
ConsolePrint("Client Loaded.", 4);
if (GlobalVars.AdminMode != true)
{
- if (GlobalVars.AlreadyHasSecurity != true)
+ if (GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true)
{
if (SecurityFuncs.checkClientMD5(GlobalVars.SelectedClient) == true)
{
@@ -969,9 +969,9 @@ namespace NovetusLauncher
string mapfile = GlobalVars.MapPath;
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Solo) + quote;
}
@@ -983,7 +983,7 @@ namespace NovetusLauncher
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
try
{
@@ -1013,9 +1013,9 @@ namespace NovetusLauncher
string mapfile = GlobalVars.MapPath;
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server) + "; " + (!string.IsNullOrWhiteSpace(GlobalVars.AddonScriptPath) ? LauncherFuncs.ChangeGameSettings() + " dofile('" + GlobalVars.AddonScriptPath + "');" : "") + quote + (no3d ? " -no3d" : "");
}
@@ -1029,11 +1029,11 @@ namespace NovetusLauncher
{
if (!no3d)
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
}
try
@@ -1065,9 +1065,9 @@ namespace NovetusLauncher
string mapname = (nomap ? "" : GlobalVars.Map);
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Studio) + quote;
}
@@ -1079,7 +1079,7 @@ namespace NovetusLauncher
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
try
{
@@ -1110,9 +1110,9 @@ namespace NovetusLauncher
string mapfile = GlobalVars.ConfigDirData + "\\Appreciation.rbxl";
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = quote + mapfile + "\" -script \"" + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.EasterEgg) + quote;
}
@@ -1124,7 +1124,7 @@ namespace NovetusLauncher
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", mapfile, luafile, rbxexe);
}
try
{
diff --git a/NovetusLauncher/NovetusURI/URI/LoaderForm.cs b/NovetusLauncher/NovetusURI/URI/LoaderForm.cs
index cf1e5f1..af36a80 100644
--- a/NovetusLauncher/NovetusURI/URI/LoaderForm.cs
+++ b/NovetusLauncher/NovetusURI/URI/LoaderForm.cs
@@ -95,7 +95,7 @@ namespace NovetusURI
GlobalVars.RobloxPort = Convert.ToInt32(port);
ReadClientValues(GlobalVars.SelectedClient);
string luafile = "";
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
luafile = "rbxasset://scripts\\\\" + GlobalVars.ScriptName + ".lua";
}
@@ -104,7 +104,7 @@ namespace NovetusURI
luafile = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptGenName + ".lua";
}
string rbxexe = "";
- if (GlobalVars.LegacyMode == true)
+ if (GlobalVars.SelectedClientInfo.LegacyMode == true)
{
rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp.exe";
}
@@ -114,9 +114,9 @@ namespace NovetusURI
}
string quote = "\"";
string args = "";
- if (GlobalVars.CustomArgs.Equals("%args%"))
+ if (GlobalVars.SelectedClientInfo.CommandLineArgs.Equals("%args%"))
{
- if (!GlobalVars.FixScriptMapMode)
+ if (!GlobalVars.SelectedClientInfo.Fix2007)
{
args = "-script " + quote + LauncherFuncs.ChangeGameSettings() + " dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Client) + quote;
}
@@ -128,13 +128,13 @@ namespace NovetusURI
}
else
{
- args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", "", luafile, rbxexe);
+ args = ClientScript.CompileScript(GlobalVars.SelectedClientInfo.CommandLineArgs, "", "", "", luafile, rbxexe);
}
try
{
if (GlobalVars.AdminMode != true)
{
- if (GlobalVars.AlreadyHasSecurity != true)
+ if (GlobalVars.SelectedClientInfo.AlreadyHasSecurity != true)
{
if (SecurityFuncs.checkClientMD5(GlobalVars.SelectedClient) == true)
{