From 1a3b59663f074f599055b0058d6ec8398a54fed6 Mon Sep 17 00:00:00 2001 From: Bitl Date: Sat, 11 Jul 2020 14:06:57 -0700 Subject: [PATCH] fixed uri/cmd events not triggering --- Novetus/NovetusCMD/NovetusCMD.cs | 4 ++-- .../StorageAndFunctions/ScriptFuncs.cs | 20 +++++++++++++------ Novetus/NovetusURI/Forms/LoaderForm.cs | 3 ++- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Novetus/NovetusCMD/NovetusCMD.cs b/Novetus/NovetusCMD/NovetusCMD.cs index 8fdb36d..47e54e0 100644 --- a/Novetus/NovetusCMD/NovetusCMD.cs +++ b/Novetus/NovetusCMD/NovetusCMD.cs @@ -317,10 +317,10 @@ namespace NovetusCMD } #endregion - #region Client Loading (TODO MAKE THIS METHOD GLOBAL) + #region Client Loading static void StartServer(bool no3d) { - GlobalFuncs.LaunchRBXClient(ScriptType.Server, no3d, false, ServerExited); + GlobalFuncs.LaunchRBXClient(ScriptType.Server, no3d, false, new EventHandler(ServerExited)); } static void ServerExited(object sender, EventArgs e) diff --git a/Novetus/NovetusCore/StorageAndFunctions/ScriptFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/ScriptFuncs.cs index c4a62c4..62974a5 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/ScriptFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/ScriptFuncs.cs @@ -36,9 +36,13 @@ public class ScriptFuncs rbxexe = GlobalPaths.ClientDir + @"\\" + GlobalVars.UserConfiguration.SelectedClient + @"\\RobloxApp_client.exe"; } - string md5dir = SecurityFuncs.GenerateMD5(Assembly.GetExecutingAssembly().Location); - string md5script = SecurityFuncs.GenerateMD5(GlobalPaths.ClientDir + @"\\" + GlobalVars.UserConfiguration.SelectedClient + @"\\content\\scripts\\" + GlobalPaths.ScriptName + ".lua"); - string md5exe = SecurityFuncs.GenerateMD5(rbxexe); +#if LAUNCHER + string md5dir = !GlobalVars.SelectedClientInfo.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(Assembly.GetExecutingAssembly().Location) : ""; +#else + string md5dir = !GlobalVars.SelectedClientInfo.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(GlobalPaths.RootPathLauncher + "\\Novetus.exe") : ""; +#endif + string md5script = !GlobalVars.SelectedClientInfo.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(GlobalPaths.ClientDir + @"\\" + GlobalVars.UserConfiguration.SelectedClient + @"\\content\\scripts\\" + GlobalPaths.ScriptName + ".lua") : ""; + string md5exe = !GlobalVars.SelectedClientInfo.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(rbxexe) : ""; string md5s = "'" + md5exe + "','" + md5dir + "','" + md5script + "'"; switch (type) @@ -104,9 +108,9 @@ public class ScriptFuncs File.WriteAllLines(GlobalPaths.ClientDir + @"\\" + GlobalVars.UserConfiguration.SelectedClient + @"\\content\\scripts\\" + GlobalPaths.ScriptGenName + ".lua", convertedList); } } - #endregion +#endregion - #region ClientScript Parser +#region ClientScript Parser public class ClientScript { public static string GetArgsFromTag(string code, string tag, string endtag) @@ -257,7 +261,11 @@ public class ScriptFuncs return ""; } +#if LAUNCHER string md5dir = !GlobalVars.SelectedClientInfo.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(Assembly.GetExecutingAssembly().Location) : ""; +#else + string md5dir = !GlobalVars.SelectedClientInfo.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(GlobalPaths.RootPathLauncher + "\\Novetus.exe") : ""; +#endif string md5script = !GlobalVars.SelectedClientInfo.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(GlobalPaths.ClientDir + @"\\" + GlobalVars.UserConfiguration.SelectedClient + @"\\content\\scripts\\" + GlobalPaths.ScriptName + ".lua") : ""; string md5exe = !GlobalVars.SelectedClientInfo.AlreadyHasSecurity ? SecurityFuncs.GenerateMD5(rbxexe) : ""; string md5s = "'" + md5exe + "','" + md5dir + "','" + md5script + "'"; @@ -319,6 +327,6 @@ public class ScriptFuncs return compiled; } } - #endregion +#endregion } #endregion \ No newline at end of file diff --git a/Novetus/NovetusURI/Forms/LoaderForm.cs b/Novetus/NovetusURI/Forms/LoaderForm.cs index bea6afc..817b841 100644 --- a/Novetus/NovetusURI/Forms/LoaderForm.cs +++ b/Novetus/NovetusURI/Forms/LoaderForm.cs @@ -75,7 +75,8 @@ namespace NovetusURI void StartGame() { - GlobalFuncs.LaunchRBXClient(ScriptType.Client, false, true, ClientExited, label1); + GlobalFuncs.LaunchRBXClient(ScriptType.Client, false, true, new EventHandler(ClientExited), label1); + Visible = false; } void ClientExited(object sender, EventArgs e)