diff --git a/Novetus/NovetusFuncs/GlobalPaths.cs b/Novetus/NovetusFuncs/GlobalPaths.cs index 76a31ed..3494e43 100644 --- a/Novetus/NovetusFuncs/GlobalPaths.cs +++ b/Novetus/NovetusFuncs/GlobalPaths.cs @@ -20,15 +20,7 @@ public class GlobalPaths public static readonly string MapsDirBase = "maps"; public static readonly string BaseGameDir = "rbxasset://../../../"; public static readonly string SharedDataGameDir = BaseGameDir + "shareddata/"; - public static readonly string DirFonts = "\\fonts"; - public static readonly string DirSounds = "\\sounds"; - public static readonly string DirTextures = "\\textures"; - public static readonly string DirScripts = "\\scripts"; - public static readonly string FontsGameDir = "fonts/"; - public static readonly string SoundsGameDir = "sounds/"; - public static readonly string TexturesGameDir = "textures/"; - public static readonly string ScriptsGameDir = "scripts/"; //customization public static readonly string CustomPlayerDir = DataPath + "\\charcustom"; public static readonly string hatdir = CustomPlayerDir + "\\hats"; @@ -38,6 +30,7 @@ public class GlobalPaths public static readonly string shirtdir = CustomPlayerDir + "\\shirts"; public static readonly string pantsdir = CustomPlayerDir + "\\pants"; public static readonly string extradir = CustomPlayerDir + "\\custom"; + public static readonly string extradirIcons = extradir + "\\icons"; public static readonly string CharCustomGameDir = SharedDataGameDir + "charcustom/"; public static readonly string hatGameDir = CharCustomGameDir + "hats/"; @@ -47,46 +40,7 @@ public class GlobalPaths public static readonly string shirtGameDir = CharCustomGameDir + "shirts/"; public static readonly string pantsGameDir = CharCustomGameDir + "pants/"; public static readonly string extraGameDir = CharCustomGameDir + "custom/"; - //item asset dirs - public static readonly string hatdirFonts = hatdir + DirFonts; - public static readonly string hatdirTextures = hatdir + DirTextures; - public static readonly string hatdirSounds = hatdir + DirSounds; - public static readonly string hatdirScripts = hatdir + DirScripts; - public static readonly string facedirTextures = facedir + DirTextures; - public static readonly string headdirFonts = headdir + DirFonts; - public static readonly string headdirTextures = headdir + DirTextures; - public static readonly string tshirtdirTextures = tshirtdir + DirTextures; - public static readonly string shirtdirTextures = shirtdir + DirTextures; - public static readonly string pantsdirTextures = pantsdir + DirTextures; - public static readonly string extradirIcons = extradir + "\\icons"; - public static readonly string hatGameDirFonts = hatGameDir + FontsGameDir; - public static readonly string hatGameDirTextures = hatGameDir + TexturesGameDir; - public static readonly string hatGameDirSounds = hatGameDir + SoundsGameDir; - public static readonly string hatGameDirScripts = hatGameDir + ScriptsGameDir; - public static readonly string faceGameDirTextures = faceGameDir + TexturesGameDir; - public static readonly string headGameDirFonts = headGameDir + FontsGameDir; - public static readonly string headGameDirTextures = headGameDir + TexturesGameDir; - public static readonly string tshirtGameDirTextures = tshirtGameDir + TexturesGameDir; - public static readonly string shirtGameDirTextures = shirtGameDir + TexturesGameDir; - public static readonly string pantsGameDirTextures = pantsGameDir + TexturesGameDir; - //asset cache - public static readonly string AssetCacheDir = DataPath + "\\assetcache"; - - public static readonly string AssetCacheDirSky = AssetCacheDir + "\\sky"; - public static readonly string AssetCacheDirFonts = AssetCacheDir + DirFonts; - public static readonly string AssetCacheDirSounds = AssetCacheDir + DirSounds; - public static readonly string AssetCacheDirTextures = AssetCacheDir + DirTextures; - public static readonly string AssetCacheDirTexturesGUI = AssetCacheDirTextures + "\\gui"; - public static readonly string AssetCacheDirScripts = AssetCacheDir + DirScripts; - - public static readonly string AssetCacheGameDir = SharedDataGameDir + "assetcache/"; - public static readonly string AssetCacheFontsGameDir = AssetCacheGameDir + FontsGameDir; - public static readonly string AssetCacheSkyGameDir = AssetCacheGameDir + "sky/"; - public static readonly string AssetCacheSoundsGameDir = AssetCacheGameDir + SoundsGameDir; - public static readonly string AssetCacheTexturesGameDir = AssetCacheGameDir + TexturesGameDir; - public static readonly string AssetCacheTexturesGUIGameDir = AssetCacheTexturesGameDir + "gui/"; - public static readonly string AssetCacheScriptsGameDir = AssetCacheGameDir + ScriptsGameDir; //webserver public static string WebServer_CustomPlayerDir = GlobalVars.WebServerURI + "/charcustom/"; public static string WebServer_HatDir = WebServer_CustomPlayerDir + "hats/"; diff --git a/Novetus/NovetusFuncs/GlobalVars.cs b/Novetus/NovetusFuncs/GlobalVars.cs index de86107..d425ebd 100644 --- a/Novetus/NovetusFuncs/GlobalVars.cs +++ b/Novetus/NovetusFuncs/GlobalVars.cs @@ -46,7 +46,7 @@ public static class GlobalVars public static bool AdminMode = false; public static string important = ""; //discord - public static IDiscordRPC.RichPresence presence; + public static DiscordRPC.RichPresence presence; public static string appid = "505955125727330324"; public static string imagekey_large = "novetus_large"; public static string image_ingame = "ingame_small"; diff --git a/Novetus/NovetusFuncs/IDiscordRPC.cs b/Novetus/NovetusFuncs/IDiscordRPC.cs index e07eaf2..0899dc9 100644 --- a/Novetus/NovetusFuncs/IDiscordRPC.cs +++ b/Novetus/NovetusFuncs/IDiscordRPC.cs @@ -4,7 +4,7 @@ using System.Runtime.InteropServices; #region Discord RPC //code by discord obv. just renamed it to fit better. -public class IDiscordRPC +public class DiscordRPC { [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void ReadyCallback(); diff --git a/Novetus/NovetusFuncs/LauncherFuncs.cs b/Novetus/NovetusFuncs/LauncherFuncs.cs index 5c9ce8f..90c7ad9 100644 --- a/Novetus/NovetusFuncs/LauncherFuncs.cs +++ b/Novetus/NovetusFuncs/LauncherFuncs.cs @@ -775,7 +775,7 @@ public class LauncherFuncs break; } - IDiscordRPC.UpdatePresence(ref GlobalVars.presence); + DiscordRPC.UpdatePresence(ref GlobalVars.presence); } } diff --git a/Novetus/NovetusLauncher/Classes/LocalPaths.cs b/Novetus/NovetusLauncher/Classes/LocalPaths.cs new file mode 100644 index 0000000..a54bf6f --- /dev/null +++ b/Novetus/NovetusLauncher/Classes/LocalPaths.cs @@ -0,0 +1,57 @@ + +namespace NovetusLauncher +{ + class LocalPaths + { + //plugins???? UNCOMMENT. + //public static readonly string BasePath = RootPath.Replace(@"\", @"\\"); + + //assetcache + public static readonly string DirFonts = "\\fonts"; + public static readonly string DirSounds = "\\sounds"; + public static readonly string DirTextures = "\\textures"; + public static readonly string DirScripts = "\\scripts"; + public static readonly string FontsGameDir = "fonts/"; + public static readonly string SoundsGameDir = "sounds/"; + public static readonly string TexturesGameDir = "textures/"; + public static readonly string ScriptsGameDir = "scripts/"; + //item asset dirs + public static readonly string hatdirFonts = GlobalPaths.hatdir + DirFonts; + public static readonly string hatdirTextures = GlobalPaths.hatdir + DirTextures; + public static readonly string hatdirSounds = GlobalPaths.hatdir + DirSounds; + public static readonly string hatdirScripts = GlobalPaths.hatdir + DirScripts; + public static readonly string facedirTextures = GlobalPaths.facedir + DirTextures; + public static readonly string headdirFonts = GlobalPaths.headdir + DirFonts; + public static readonly string headdirTextures = GlobalPaths.headdir + DirTextures; + public static readonly string tshirtdirTextures = GlobalPaths.tshirtdir + DirTextures; + public static readonly string shirtdirTextures = GlobalPaths.shirtdir + DirTextures; + public static readonly string pantsdirTextures = GlobalPaths.pantsdir + DirTextures; + + public static readonly string hatGameDirFonts = GlobalPaths.hatGameDir + FontsGameDir; + public static readonly string hatGameDirTextures = GlobalPaths.hatGameDir + TexturesGameDir; + public static readonly string hatGameDirSounds = GlobalPaths.hatGameDir + SoundsGameDir; + public static readonly string hatGameDirScripts = GlobalPaths.hatGameDir + ScriptsGameDir; + public static readonly string faceGameDirTextures = GlobalPaths.faceGameDir + TexturesGameDir; + public static readonly string headGameDirFonts = GlobalPaths.headGameDir + FontsGameDir; + public static readonly string headGameDirTextures = GlobalPaths.headGameDir + TexturesGameDir; + public static readonly string tshirtGameDirTextures = GlobalPaths.tshirtGameDir + TexturesGameDir; + public static readonly string shirtGameDirTextures = GlobalPaths.shirtGameDir + TexturesGameDir; + public static readonly string pantsGameDirTextures = GlobalPaths.pantsGameDir + TexturesGameDir; + + public static readonly string AssetCacheDir = GlobalPaths.DataPath + "\\assetcache"; + public static readonly string AssetCacheDirSky = AssetCacheDir + "\\sky"; + public static readonly string AssetCacheDirFonts = AssetCacheDir + DirFonts; + public static readonly string AssetCacheDirSounds = AssetCacheDir + DirSounds; + public static readonly string AssetCacheDirTextures = AssetCacheDir + DirTextures; + public static readonly string AssetCacheDirTexturesGUI = AssetCacheDirTextures + "\\gui"; + public static readonly string AssetCacheDirScripts = AssetCacheDir + DirScripts; + + public static readonly string AssetCacheGameDir = GlobalPaths.SharedDataGameDir + "assetcache/"; + public static readonly string AssetCacheFontsGameDir = AssetCacheGameDir + FontsGameDir; + public static readonly string AssetCacheSkyGameDir = AssetCacheGameDir + "sky/"; + public static readonly string AssetCacheSoundsGameDir = AssetCacheGameDir + SoundsGameDir; + public static readonly string AssetCacheTexturesGameDir = AssetCacheGameDir + TexturesGameDir; + public static readonly string AssetCacheTexturesGUIGameDir = AssetCacheTexturesGameDir + "gui/"; + public static readonly string AssetCacheScriptsGameDir = AssetCacheGameDir + ScriptsGameDir; + } +} diff --git a/Novetus/NovetusLauncher/Classes/SDK/RobloxXMLLocalizer.cs b/Novetus/NovetusLauncher/Classes/SDK/RobloxXMLLocalizer.cs index 024ba79..249c503 100644 --- a/Novetus/NovetusLauncher/Classes/SDK/RobloxXMLLocalizer.cs +++ b/Novetus/NovetusLauncher/Classes/SDK/RobloxXMLLocalizer.cs @@ -35,8 +35,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, - new string[] { GlobalPaths.AssetCacheDirFonts, GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheFontsGameDir, GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirFonts, LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheFontsGameDir, LocalPaths.AssetCacheTexturesGameDir }); } } @@ -47,8 +47,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Sky", new string[] { "SkyboxBk", "SkyboxDn", "SkyboxFt", "SkyboxLf", "SkyboxRt", "SkyboxUp" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirSky }, - new string[] { GlobalPaths.AssetCacheSkyGameDir }); + new string[] { LocalPaths.AssetCacheDirSky }, + new string[] { LocalPaths.AssetCacheSkyGameDir }); } } @@ -59,8 +59,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Decal", new string[] { "Texture" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheTexturesGameDir }); } } @@ -71,8 +71,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Texture", new string[] { "Texture" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheTexturesGameDir }); } } @@ -83,8 +83,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("HopperBin", new string[] { "TextureId" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheTexturesGameDir }); } } @@ -95,8 +95,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Tool", new string[] { "TextureId" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheTexturesGameDir }); } } @@ -107,8 +107,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Sound", new string[] { "SoundId" }, new string[] { ".wav" }, - new string[] { GlobalPaths.AssetCacheDirSounds }, - new string[] { GlobalPaths.AssetCacheSoundsGameDir }); + new string[] { LocalPaths.AssetCacheDirSounds }, + new string[] { LocalPaths.AssetCacheSoundsGameDir }); } } @@ -119,8 +119,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("ImageLabel", new string[] { "Image" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheTexturesGameDir }); } } @@ -131,8 +131,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Shirt", new string[] { "ShirtTemplate" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheTexturesGameDir }); } } @@ -143,8 +143,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("ShirtGraphic", new string[] { "Graphic" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheTexturesGameDir }); } } @@ -155,8 +155,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Pants", new string[] { "PantsTemplate" }, new string[] { ".png" }, - new string[] { GlobalPaths.AssetCacheDirTextures }, - new string[] { GlobalPaths.AssetCacheTexturesGameDir }); + new string[] { LocalPaths.AssetCacheDirTextures }, + new string[] { LocalPaths.AssetCacheTexturesGameDir }); } } @@ -167,8 +167,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Script", new string[] { "LinkedSource" }, new string[] { ".lua" }, - new string[] { GlobalPaths.AssetCacheDirScripts }, - new string[] { GlobalPaths.AssetCacheScriptsGameDir }); + new string[] { LocalPaths.AssetCacheDirScripts }, + new string[] { LocalPaths.AssetCacheScriptsGameDir }); } } @@ -179,8 +179,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("LocalScript", new string[] { "LinkedSource" }, new string[] { ".lua" }, - new string[] { GlobalPaths.AssetCacheDirScripts }, - new string[] { GlobalPaths.AssetCacheScriptsGameDir }); + new string[] { LocalPaths.AssetCacheDirScripts }, + new string[] { LocalPaths.AssetCacheScriptsGameDir }); } } @@ -192,8 +192,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, - new string[] { GlobalPaths.hatdirFonts, GlobalPaths.hatdirTextures }, - new string[] { GlobalPaths.hatGameDirFonts, GlobalPaths.hatGameDirTextures }); + new string[] { LocalPaths.hatdirFonts, LocalPaths.hatdirTextures }, + new string[] { LocalPaths.hatGameDirFonts, LocalPaths.hatGameDirTextures }); } } @@ -204,8 +204,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Sound", new string[] { "SoundId" }, new string[] { ".wav" }, - new string[] { GlobalPaths.hatdirSounds }, - new string[] { GlobalPaths.hatGameDirSounds }); + new string[] { LocalPaths.hatdirSounds }, + new string[] { LocalPaths.hatGameDirSounds }); } } @@ -216,8 +216,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Script", new string[] { "LinkedSource" }, new string[] { ".lua" }, - new string[] { GlobalPaths.hatdirScripts }, - new string[] { GlobalPaths.hatGameDirScripts }); + new string[] { LocalPaths.hatdirScripts }, + new string[] { LocalPaths.hatGameDirScripts }); } } @@ -228,8 +228,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("LocalScript", new string[] { "LinkedSource" }, new string[] { ".lua" }, - new string[] { GlobalPaths.hatdirScripts }, - new string[] { GlobalPaths.hatGameDirScripts }); + new string[] { LocalPaths.hatdirScripts }, + new string[] { LocalPaths.hatGameDirScripts }); } } @@ -240,8 +240,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("SpecialMesh", new string[] { "MeshId", "TextureId" }, new string[] { ".mesh", ".png" }, - new string[] { GlobalPaths.headdirFonts, GlobalPaths.headdirTextures }, - new string[] { GlobalPaths.headGameDirFonts, GlobalPaths.headGameDirTextures }); + new string[] { LocalPaths.headdirFonts, LocalPaths.headdirTextures }, + new string[] { LocalPaths.headGameDirFonts, LocalPaths.headGameDirTextures }); } } @@ -252,8 +252,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Decal", new string[] { "Texture" }, new string[] { ".png" }, - new string[] { GlobalPaths.facedirTextures }, - new string[] { GlobalPaths.faceGameDirTextures }); + new string[] { LocalPaths.facedirTextures }, + new string[] { LocalPaths.faceGameDirTextures }); } } @@ -264,8 +264,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Shirt", new string[] { "ShirtTemplate" }, new string[] { ".png" }, - new string[] { GlobalPaths.shirtdirTextures }, - new string[] { GlobalPaths.shirtGameDirTextures }); + new string[] { LocalPaths.shirtdirTextures }, + new string[] { LocalPaths.shirtGameDirTextures }); } } @@ -276,8 +276,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("ShirtGraphic", new string[] { "Graphic" }, new string[] { ".png" }, - new string[] { GlobalPaths.tshirtdirTextures }, - new string[] { GlobalPaths.tshirtGameDirTextures }); + new string[] { LocalPaths.tshirtdirTextures }, + new string[] { LocalPaths.tshirtGameDirTextures }); } } @@ -288,8 +288,8 @@ public struct RobloxDefs return new VarStorage.AssetCacheDef("Pants", new string[] { "PantsTemplate" }, new string[] { ".png" }, - new string[] { GlobalPaths.pantsdirTextures }, - new string[] { GlobalPaths.pantsGameDirTextures }); + new string[] { LocalPaths.pantsdirTextures }, + new string[] { LocalPaths.pantsGameDirTextures }); } } } diff --git a/Novetus/NovetusLauncher/LauncherForm/Compact/LauncherFormCompact.cs b/Novetus/NovetusLauncher/LauncherForm/Compact/LauncherFormCompact.cs index 7bea22e..13305d0 100644 --- a/Novetus/NovetusLauncher/LauncherForm/Compact/LauncherFormCompact.cs +++ b/Novetus/NovetusLauncher/LauncherForm/Compact/LauncherFormCompact.cs @@ -24,7 +24,7 @@ namespace NovetusLauncher /// public partial class LauncherFormCompact : Form { - IDiscordRPC.EventHandlers handlers; + DiscordRPC.EventHandlers handlers; public LauncherFormCompact() { @@ -148,7 +148,7 @@ namespace NovetusLauncher { } - public void RequestCallback(IDiscordRPC.JoinRequest request) + public void RequestCallback(DiscordRPC.JoinRequest request) { } @@ -156,14 +156,14 @@ namespace NovetusLauncher { if (GlobalVars.UserConfiguration.DiscordPresence) { - handlers = new IDiscordRPC.EventHandlers(); + handlers = new DiscordRPC.EventHandlers(); handlers.readyCallback = ReadyCallback; handlers.disconnectedCallback += DisconnectedCallback; handlers.errorCallback += ErrorCallback; handlers.joinCallback += JoinCallback; handlers.spectateCallback += SpectateCallback; handlers.requestCallback += RequestCallback; - IDiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); + DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); LauncherFuncs.UpdateRichPresence(LauncherState.InLauncher, "", true); } @@ -445,29 +445,29 @@ namespace NovetusLauncher File.Create(GlobalPaths.ConfigDir + "\\ports.txt").Dispose(); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirFonts)) + if (!Directory.Exists(LocalPaths.AssetCacheDirFonts)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirFonts); + Directory.CreateDirectory(LocalPaths.AssetCacheDirFonts); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirSky)) + if (!Directory.Exists(LocalPaths.AssetCacheDirSky)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirSky); + Directory.CreateDirectory(LocalPaths.AssetCacheDirSky); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirSounds)) + if (!Directory.Exists(LocalPaths.AssetCacheDirSounds)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirSounds); + Directory.CreateDirectory(LocalPaths.AssetCacheDirSounds); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirTexturesGUI)) + if (!Directory.Exists(LocalPaths.AssetCacheDirTexturesGUI)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirTexturesGUI); + Directory.CreateDirectory(LocalPaths.AssetCacheDirTexturesGUI); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirScripts)) + if (!Directory.Exists(LocalPaths.AssetCacheDirScripts)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirScripts); + Directory.CreateDirectory(LocalPaths.AssetCacheDirScripts); } label8.Text = Application.ProductVersion; @@ -491,7 +491,7 @@ namespace NovetusLauncher } if (GlobalVars.UserConfiguration.DiscordPresence) { - IDiscordRPC.Shutdown(); + DiscordRPC.Shutdown(); } if (GlobalVars.IsWebServerOn) { @@ -1398,9 +1398,9 @@ namespace NovetusLauncher private void button26_Click(object sender, EventArgs e) { - if (Directory.Exists(GlobalPaths.AssetCacheDir)) + if (Directory.Exists(LocalPaths.AssetCacheDir)) { - Directory.Delete(GlobalPaths.AssetCacheDir, true); + Directory.Delete(LocalPaths.AssetCacheDir, true); ConsolePrint("Asset cache cleared!", 3); MessageBox.Show("Asset cache cleared!"); } diff --git a/Novetus/NovetusLauncher/LauncherForm/Extended/LauncherFormExtended.cs b/Novetus/NovetusLauncher/LauncherForm/Extended/LauncherFormExtended.cs index db76aa8..dee848f 100644 --- a/Novetus/NovetusLauncher/LauncherForm/Extended/LauncherFormExtended.cs +++ b/Novetus/NovetusLauncher/LauncherForm/Extended/LauncherFormExtended.cs @@ -24,7 +24,7 @@ namespace NovetusLauncher /// public partial class LauncherFormExtended : Form { - IDiscordRPC.EventHandlers handlers; + DiscordRPC.EventHandlers handlers; public LauncherFormExtended() { @@ -150,7 +150,7 @@ namespace NovetusLauncher { } - public void RequestCallback(IDiscordRPC.JoinRequest request) + public void RequestCallback(DiscordRPC.JoinRequest request) { } @@ -158,14 +158,14 @@ namespace NovetusLauncher { if (GlobalVars.UserConfiguration.DiscordPresence) { - handlers = new IDiscordRPC.EventHandlers(); + handlers = new DiscordRPC.EventHandlers(); handlers.readyCallback = ReadyCallback; handlers.disconnectedCallback += DisconnectedCallback; handlers.errorCallback += ErrorCallback; handlers.joinCallback += JoinCallback; handlers.spectateCallback += SpectateCallback; handlers.requestCallback += RequestCallback; - IDiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); + DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); LauncherFuncs.UpdateRichPresence(LauncherState.InLauncher, "", true); } @@ -447,30 +447,30 @@ namespace NovetusLauncher File.Create(GlobalPaths.ConfigDir + "\\ports.txt").Dispose(); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirFonts)) - { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirFonts); - } + if (!Directory.Exists(LocalPaths.AssetCacheDirFonts)) + { + Directory.CreateDirectory(LocalPaths.AssetCacheDirFonts); + } - if (!Directory.Exists(GlobalPaths.AssetCacheDirSky)) - { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirSky); - } + if (!Directory.Exists(LocalPaths.AssetCacheDirSky)) + { + Directory.CreateDirectory(LocalPaths.AssetCacheDirSky); + } - if (!Directory.Exists(GlobalPaths.AssetCacheDirSounds)) - { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirSounds); - } + if (!Directory.Exists(LocalPaths.AssetCacheDirSounds)) + { + Directory.CreateDirectory(LocalPaths.AssetCacheDirSounds); + } - if (!Directory.Exists(GlobalPaths.AssetCacheDirTexturesGUI)) - { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirTexturesGUI); - } + if (!Directory.Exists(LocalPaths.AssetCacheDirTexturesGUI)) + { + Directory.CreateDirectory(LocalPaths.AssetCacheDirTexturesGUI); + } - if (!Directory.Exists(GlobalPaths.AssetCacheDirScripts)) - { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirScripts); - } + if (!Directory.Exists(LocalPaths.AssetCacheDirScripts)) + { + Directory.CreateDirectory(LocalPaths.AssetCacheDirScripts); + } label8.Text = Application.ProductVersion; GlobalVars.important = SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location); @@ -493,7 +493,7 @@ namespace NovetusLauncher } if (GlobalVars.UserConfiguration.DiscordPresence) { - IDiscordRPC.Shutdown(); + DiscordRPC.Shutdown(); } if (GlobalVars.IsWebServerOn) { @@ -1434,9 +1434,9 @@ namespace NovetusLauncher private void button26_Click(object sender, EventArgs e) { - if (Directory.Exists(GlobalPaths.AssetCacheDir)) + if (Directory.Exists(LocalPaths.AssetCacheDir)) { - Directory.Delete(GlobalPaths.AssetCacheDir, true); + Directory.Delete(LocalPaths.AssetCacheDir, true); ConsolePrint("Asset cache cleared!", 3); MessageBox.Show("Asset cache cleared!"); } diff --git a/Novetus/NovetusLauncher/Novetus.Launcher.csproj b/Novetus/NovetusLauncher/Novetus.Launcher.csproj index 1abca8e..c83f405 100644 --- a/Novetus/NovetusLauncher/Novetus.Launcher.csproj +++ b/Novetus/NovetusLauncher/Novetus.Launcher.csproj @@ -136,6 +136,7 @@ + diff --git a/Novetus/NovetusLauncher/SDK/AssetLocalizer.cs b/Novetus/NovetusLauncher/SDK/AssetLocalizer.cs index 742bc57..7d29fa6 100644 --- a/Novetus/NovetusLauncher/SDK/AssetLocalizer.cs +++ b/Novetus/NovetusLauncher/SDK/AssetLocalizer.cs @@ -70,9 +70,9 @@ namespace NovetusLauncher comboBox1.SelectedItem = "RBXL"; comboBox2.SelectedItem = "None"; - if (Directory.Exists(GlobalPaths.hatdirFonts)) + if (Directory.Exists(LocalPaths.hatdirFonts)) { - DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdirFonts); + DirectoryInfo dinfo = new DirectoryInfo(LocalPaths.hatdirFonts); FileInfo[] Files = dinfo.GetFiles("*.mesh"); foreach (FileInfo file in Files) { @@ -85,29 +85,29 @@ namespace NovetusLauncher } } - if (!Directory.Exists(GlobalPaths.AssetCacheDirFonts)) + if (!Directory.Exists(LocalPaths.AssetCacheDirFonts)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirFonts); + Directory.CreateDirectory(LocalPaths.AssetCacheDirFonts); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirSky)) + if (!Directory.Exists(LocalPaths.AssetCacheDirSky)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirSky); + Directory.CreateDirectory(LocalPaths.AssetCacheDirSky); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirSounds)) + if (!Directory.Exists(LocalPaths.AssetCacheDirSounds)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirSounds); + Directory.CreateDirectory(LocalPaths.AssetCacheDirSounds); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirTexturesGUI)) + if (!Directory.Exists(LocalPaths.AssetCacheDirTexturesGUI)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirTexturesGUI); + Directory.CreateDirectory(LocalPaths.AssetCacheDirTexturesGUI); } - if (!Directory.Exists(GlobalPaths.AssetCacheDirScripts)) + if (!Directory.Exists(LocalPaths.AssetCacheDirScripts)) { - Directory.CreateDirectory(GlobalPaths.AssetCacheDirScripts); + Directory.CreateDirectory(LocalPaths.AssetCacheDirScripts); } } diff --git a/Novetus/NovetusURI/LoaderForm.cs b/Novetus/NovetusURI/LoaderForm.cs index edb44a9..3dab717 100644 --- a/Novetus/NovetusURI/LoaderForm.cs +++ b/Novetus/NovetusURI/LoaderForm.cs @@ -20,7 +20,7 @@ namespace NovetusURI /// public partial class LoaderForm : Form { - IDiscordRPC.EventHandlers handlers; + DiscordRPC.EventHandlers handlers; public LoaderForm() { @@ -54,7 +54,7 @@ namespace NovetusURI { } - public void RequestCallback(IDiscordRPC.JoinRequest request) + public void RequestCallback(DiscordRPC.JoinRequest request) { } @@ -69,14 +69,14 @@ namespace NovetusURI { if (GlobalVars.UserConfiguration.DiscordPresence) { - handlers = new IDiscordRPC.EventHandlers(); + handlers = new DiscordRPC.EventHandlers(); handlers.readyCallback = ReadyCallback; handlers.disconnectedCallback += DisconnectedCallback; handlers.errorCallback += ErrorCallback; handlers.joinCallback += JoinCallback; handlers.spectateCallback += SpectateCallback; handlers.requestCallback += RequestCallback; - IDiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); + DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); LauncherFuncs.UpdateRichPresence(LauncherState.LoadingURI, "", true); }