reorgainization

This commit is contained in:
Bitl 2020-07-07 12:38:04 -07:00
parent cd220e8523
commit 4d4f6f14e2
11 changed files with 166 additions and 154 deletions

View File

@ -20,15 +20,7 @@ public class GlobalPaths
public static readonly string MapsDirBase = "maps"; public static readonly string MapsDirBase = "maps";
public static readonly string BaseGameDir = "rbxasset://../../../"; public static readonly string BaseGameDir = "rbxasset://../../../";
public static readonly string SharedDataGameDir = BaseGameDir + "shareddata/"; 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 //customization
public static readonly string CustomPlayerDir = DataPath + "\\charcustom"; public static readonly string CustomPlayerDir = DataPath + "\\charcustom";
public static readonly string hatdir = CustomPlayerDir + "\\hats"; 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 shirtdir = CustomPlayerDir + "\\shirts";
public static readonly string pantsdir = CustomPlayerDir + "\\pants"; public static readonly string pantsdir = CustomPlayerDir + "\\pants";
public static readonly string extradir = CustomPlayerDir + "\\custom"; 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 CharCustomGameDir = SharedDataGameDir + "charcustom/";
public static readonly string hatGameDir = CharCustomGameDir + "hats/"; 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 shirtGameDir = CharCustomGameDir + "shirts/";
public static readonly string pantsGameDir = CharCustomGameDir + "pants/"; public static readonly string pantsGameDir = CharCustomGameDir + "pants/";
public static readonly string extraGameDir = CharCustomGameDir + "custom/"; 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 //webserver
public static string WebServer_CustomPlayerDir = GlobalVars.WebServerURI + "/charcustom/"; public static string WebServer_CustomPlayerDir = GlobalVars.WebServerURI + "/charcustom/";
public static string WebServer_HatDir = WebServer_CustomPlayerDir + "hats/"; public static string WebServer_HatDir = WebServer_CustomPlayerDir + "hats/";

View File

@ -46,7 +46,7 @@ public static class GlobalVars
public static bool AdminMode = false; public static bool AdminMode = false;
public static string important = ""; public static string important = "";
//discord //discord
public static IDiscordRPC.RichPresence presence; public static DiscordRPC.RichPresence presence;
public static string appid = "505955125727330324"; public static string appid = "505955125727330324";
public static string imagekey_large = "novetus_large"; public static string imagekey_large = "novetus_large";
public static string image_ingame = "ingame_small"; public static string image_ingame = "ingame_small";

View File

@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
#region Discord RPC #region Discord RPC
//code by discord obv. just renamed it to fit better. //code by discord obv. just renamed it to fit better.
public class IDiscordRPC public class DiscordRPC
{ {
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ReadyCallback(); public delegate void ReadyCallback();

View File

@ -775,7 +775,7 @@ public class LauncherFuncs
break; break;
} }
IDiscordRPC.UpdatePresence(ref GlobalVars.presence); DiscordRPC.UpdatePresence(ref GlobalVars.presence);
} }
} }

View File

@ -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;
}
}

View File

@ -35,8 +35,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("SpecialMesh", return new VarStorage.AssetCacheDef("SpecialMesh",
new string[] { "MeshId", "TextureId" }, new string[] { "MeshId", "TextureId" },
new string[] { ".mesh", ".png" }, new string[] { ".mesh", ".png" },
new string[] { GlobalPaths.AssetCacheDirFonts, GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirFonts, LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheFontsGameDir, GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheFontsGameDir, LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -47,8 +47,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Sky", return new VarStorage.AssetCacheDef("Sky",
new string[] { "SkyboxBk", "SkyboxDn", "SkyboxFt", "SkyboxLf", "SkyboxRt", "SkyboxUp" }, new string[] { "SkyboxBk", "SkyboxDn", "SkyboxFt", "SkyboxLf", "SkyboxRt", "SkyboxUp" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirSky }, new string[] { LocalPaths.AssetCacheDirSky },
new string[] { GlobalPaths.AssetCacheSkyGameDir }); new string[] { LocalPaths.AssetCacheSkyGameDir });
} }
} }
@ -59,8 +59,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Decal", return new VarStorage.AssetCacheDef("Decal",
new string[] { "Texture" }, new string[] { "Texture" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -71,8 +71,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Texture", return new VarStorage.AssetCacheDef("Texture",
new string[] { "Texture" }, new string[] { "Texture" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -83,8 +83,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("HopperBin", return new VarStorage.AssetCacheDef("HopperBin",
new string[] { "TextureId" }, new string[] { "TextureId" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -95,8 +95,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Tool", return new VarStorage.AssetCacheDef("Tool",
new string[] { "TextureId" }, new string[] { "TextureId" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -107,8 +107,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Sound", return new VarStorage.AssetCacheDef("Sound",
new string[] { "SoundId" }, new string[] { "SoundId" },
new string[] { ".wav" }, new string[] { ".wav" },
new string[] { GlobalPaths.AssetCacheDirSounds }, new string[] { LocalPaths.AssetCacheDirSounds },
new string[] { GlobalPaths.AssetCacheSoundsGameDir }); new string[] { LocalPaths.AssetCacheSoundsGameDir });
} }
} }
@ -119,8 +119,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("ImageLabel", return new VarStorage.AssetCacheDef("ImageLabel",
new string[] { "Image" }, new string[] { "Image" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -131,8 +131,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Shirt", return new VarStorage.AssetCacheDef("Shirt",
new string[] { "ShirtTemplate" }, new string[] { "ShirtTemplate" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -143,8 +143,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("ShirtGraphic", return new VarStorage.AssetCacheDef("ShirtGraphic",
new string[] { "Graphic" }, new string[] { "Graphic" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -155,8 +155,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Pants", return new VarStorage.AssetCacheDef("Pants",
new string[] { "PantsTemplate" }, new string[] { "PantsTemplate" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.AssetCacheDirTextures }, new string[] { LocalPaths.AssetCacheDirTextures },
new string[] { GlobalPaths.AssetCacheTexturesGameDir }); new string[] { LocalPaths.AssetCacheTexturesGameDir });
} }
} }
@ -167,8 +167,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Script", return new VarStorage.AssetCacheDef("Script",
new string[] { "LinkedSource" }, new string[] { "LinkedSource" },
new string[] { ".lua" }, new string[] { ".lua" },
new string[] { GlobalPaths.AssetCacheDirScripts }, new string[] { LocalPaths.AssetCacheDirScripts },
new string[] { GlobalPaths.AssetCacheScriptsGameDir }); new string[] { LocalPaths.AssetCacheScriptsGameDir });
} }
} }
@ -179,8 +179,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("LocalScript", return new VarStorage.AssetCacheDef("LocalScript",
new string[] { "LinkedSource" }, new string[] { "LinkedSource" },
new string[] { ".lua" }, new string[] { ".lua" },
new string[] { GlobalPaths.AssetCacheDirScripts }, new string[] { LocalPaths.AssetCacheDirScripts },
new string[] { GlobalPaths.AssetCacheScriptsGameDir }); new string[] { LocalPaths.AssetCacheScriptsGameDir });
} }
} }
@ -192,8 +192,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("SpecialMesh", return new VarStorage.AssetCacheDef("SpecialMesh",
new string[] { "MeshId", "TextureId" }, new string[] { "MeshId", "TextureId" },
new string[] { ".mesh", ".png" }, new string[] { ".mesh", ".png" },
new string[] { GlobalPaths.hatdirFonts, GlobalPaths.hatdirTextures }, new string[] { LocalPaths.hatdirFonts, LocalPaths.hatdirTextures },
new string[] { GlobalPaths.hatGameDirFonts, GlobalPaths.hatGameDirTextures }); new string[] { LocalPaths.hatGameDirFonts, LocalPaths.hatGameDirTextures });
} }
} }
@ -204,8 +204,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Sound", return new VarStorage.AssetCacheDef("Sound",
new string[] { "SoundId" }, new string[] { "SoundId" },
new string[] { ".wav" }, new string[] { ".wav" },
new string[] { GlobalPaths.hatdirSounds }, new string[] { LocalPaths.hatdirSounds },
new string[] { GlobalPaths.hatGameDirSounds }); new string[] { LocalPaths.hatGameDirSounds });
} }
} }
@ -216,8 +216,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Script", return new VarStorage.AssetCacheDef("Script",
new string[] { "LinkedSource" }, new string[] { "LinkedSource" },
new string[] { ".lua" }, new string[] { ".lua" },
new string[] { GlobalPaths.hatdirScripts }, new string[] { LocalPaths.hatdirScripts },
new string[] { GlobalPaths.hatGameDirScripts }); new string[] { LocalPaths.hatGameDirScripts });
} }
} }
@ -228,8 +228,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("LocalScript", return new VarStorage.AssetCacheDef("LocalScript",
new string[] { "LinkedSource" }, new string[] { "LinkedSource" },
new string[] { ".lua" }, new string[] { ".lua" },
new string[] { GlobalPaths.hatdirScripts }, new string[] { LocalPaths.hatdirScripts },
new string[] { GlobalPaths.hatGameDirScripts }); new string[] { LocalPaths.hatGameDirScripts });
} }
} }
@ -240,8 +240,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("SpecialMesh", return new VarStorage.AssetCacheDef("SpecialMesh",
new string[] { "MeshId", "TextureId" }, new string[] { "MeshId", "TextureId" },
new string[] { ".mesh", ".png" }, new string[] { ".mesh", ".png" },
new string[] { GlobalPaths.headdirFonts, GlobalPaths.headdirTextures }, new string[] { LocalPaths.headdirFonts, LocalPaths.headdirTextures },
new string[] { GlobalPaths.headGameDirFonts, GlobalPaths.headGameDirTextures }); new string[] { LocalPaths.headGameDirFonts, LocalPaths.headGameDirTextures });
} }
} }
@ -252,8 +252,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Decal", return new VarStorage.AssetCacheDef("Decal",
new string[] { "Texture" }, new string[] { "Texture" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.facedirTextures }, new string[] { LocalPaths.facedirTextures },
new string[] { GlobalPaths.faceGameDirTextures }); new string[] { LocalPaths.faceGameDirTextures });
} }
} }
@ -264,8 +264,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Shirt", return new VarStorage.AssetCacheDef("Shirt",
new string[] { "ShirtTemplate" }, new string[] { "ShirtTemplate" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.shirtdirTextures }, new string[] { LocalPaths.shirtdirTextures },
new string[] { GlobalPaths.shirtGameDirTextures }); new string[] { LocalPaths.shirtGameDirTextures });
} }
} }
@ -276,8 +276,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("ShirtGraphic", return new VarStorage.AssetCacheDef("ShirtGraphic",
new string[] { "Graphic" }, new string[] { "Graphic" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.tshirtdirTextures }, new string[] { LocalPaths.tshirtdirTextures },
new string[] { GlobalPaths.tshirtGameDirTextures }); new string[] { LocalPaths.tshirtGameDirTextures });
} }
} }
@ -288,8 +288,8 @@ public struct RobloxDefs
return new VarStorage.AssetCacheDef("Pants", return new VarStorage.AssetCacheDef("Pants",
new string[] { "PantsTemplate" }, new string[] { "PantsTemplate" },
new string[] { ".png" }, new string[] { ".png" },
new string[] { GlobalPaths.pantsdirTextures }, new string[] { LocalPaths.pantsdirTextures },
new string[] { GlobalPaths.pantsGameDirTextures }); new string[] { LocalPaths.pantsGameDirTextures });
} }
} }
} }

View File

@ -24,7 +24,7 @@ namespace NovetusLauncher
/// </summary> /// </summary>
public partial class LauncherFormCompact : Form public partial class LauncherFormCompact : Form
{ {
IDiscordRPC.EventHandlers handlers; DiscordRPC.EventHandlers handlers;
public LauncherFormCompact() 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) if (GlobalVars.UserConfiguration.DiscordPresence)
{ {
handlers = new IDiscordRPC.EventHandlers(); handlers = new DiscordRPC.EventHandlers();
handlers.readyCallback = ReadyCallback; handlers.readyCallback = ReadyCallback;
handlers.disconnectedCallback += DisconnectedCallback; handlers.disconnectedCallback += DisconnectedCallback;
handlers.errorCallback += ErrorCallback; handlers.errorCallback += ErrorCallback;
handlers.joinCallback += JoinCallback; handlers.joinCallback += JoinCallback;
handlers.spectateCallback += SpectateCallback; handlers.spectateCallback += SpectateCallback;
handlers.requestCallback += RequestCallback; handlers.requestCallback += RequestCallback;
IDiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, "");
LauncherFuncs.UpdateRichPresence(LauncherState.InLauncher, "", true); LauncherFuncs.UpdateRichPresence(LauncherState.InLauncher, "", true);
} }
@ -445,29 +445,29 @@ namespace NovetusLauncher
File.Create(GlobalPaths.ConfigDir + "\\ports.txt").Dispose(); 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; label8.Text = Application.ProductVersion;
@ -491,7 +491,7 @@ namespace NovetusLauncher
} }
if (GlobalVars.UserConfiguration.DiscordPresence) if (GlobalVars.UserConfiguration.DiscordPresence)
{ {
IDiscordRPC.Shutdown(); DiscordRPC.Shutdown();
} }
if (GlobalVars.IsWebServerOn) if (GlobalVars.IsWebServerOn)
{ {
@ -1398,9 +1398,9 @@ namespace NovetusLauncher
private void button26_Click(object sender, EventArgs e) 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); ConsolePrint("Asset cache cleared!", 3);
MessageBox.Show("Asset cache cleared!"); MessageBox.Show("Asset cache cleared!");
} }

View File

@ -24,7 +24,7 @@ namespace NovetusLauncher
/// </summary> /// </summary>
public partial class LauncherFormExtended : Form public partial class LauncherFormExtended : Form
{ {
IDiscordRPC.EventHandlers handlers; DiscordRPC.EventHandlers handlers;
public LauncherFormExtended() 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) if (GlobalVars.UserConfiguration.DiscordPresence)
{ {
handlers = new IDiscordRPC.EventHandlers(); handlers = new DiscordRPC.EventHandlers();
handlers.readyCallback = ReadyCallback; handlers.readyCallback = ReadyCallback;
handlers.disconnectedCallback += DisconnectedCallback; handlers.disconnectedCallback += DisconnectedCallback;
handlers.errorCallback += ErrorCallback; handlers.errorCallback += ErrorCallback;
handlers.joinCallback += JoinCallback; handlers.joinCallback += JoinCallback;
handlers.spectateCallback += SpectateCallback; handlers.spectateCallback += SpectateCallback;
handlers.requestCallback += RequestCallback; handlers.requestCallback += RequestCallback;
IDiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, "");
LauncherFuncs.UpdateRichPresence(LauncherState.InLauncher, "", true); LauncherFuncs.UpdateRichPresence(LauncherState.InLauncher, "", true);
} }
@ -447,30 +447,30 @@ namespace NovetusLauncher
File.Create(GlobalPaths.ConfigDir + "\\ports.txt").Dispose(); 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; label8.Text = Application.ProductVersion;
GlobalVars.important = SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location); GlobalVars.important = SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location);
@ -493,7 +493,7 @@ namespace NovetusLauncher
} }
if (GlobalVars.UserConfiguration.DiscordPresence) if (GlobalVars.UserConfiguration.DiscordPresence)
{ {
IDiscordRPC.Shutdown(); DiscordRPC.Shutdown();
} }
if (GlobalVars.IsWebServerOn) if (GlobalVars.IsWebServerOn)
{ {
@ -1434,9 +1434,9 @@ namespace NovetusLauncher
private void button26_Click(object sender, EventArgs e) 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); ConsolePrint("Asset cache cleared!", 3);
MessageBox.Show("Asset cache cleared!"); MessageBox.Show("Asset cache cleared!");
} }

View File

@ -136,6 +136,7 @@
</Compile> </Compile>
<Compile Include="Classes\AddonLoader.cs" /> <Compile Include="Classes\AddonLoader.cs" />
<Compile Include="Classes\CharCustom\IconLoader.cs" /> <Compile Include="Classes\CharCustom\IconLoader.cs" />
<Compile Include="Classes\LocalPaths.cs" />
<Compile Include="Classes\SDK\Downloader.cs" /> <Compile Include="Classes\SDK\Downloader.cs" />
<Compile Include="Classes\SDK\RobloxXMLLocalizer.cs" /> <Compile Include="Classes\SDK\RobloxXMLLocalizer.cs" />
<Compile Include="Classes\SplashLoader.cs" /> <Compile Include="Classes\SplashLoader.cs" />

View File

@ -70,9 +70,9 @@ namespace NovetusLauncher
comboBox1.SelectedItem = "RBXL"; comboBox1.SelectedItem = "RBXL";
comboBox2.SelectedItem = "None"; 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"); FileInfo[] Files = dinfo.GetFiles("*.mesh");
foreach (FileInfo file in Files) 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);
} }
} }

View File

@ -20,7 +20,7 @@ namespace NovetusURI
/// </summary> /// </summary>
public partial class LoaderForm : Form public partial class LoaderForm : Form
{ {
IDiscordRPC.EventHandlers handlers; DiscordRPC.EventHandlers handlers;
public LoaderForm() 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) if (GlobalVars.UserConfiguration.DiscordPresence)
{ {
handlers = new IDiscordRPC.EventHandlers(); handlers = new DiscordRPC.EventHandlers();
handlers.readyCallback = ReadyCallback; handlers.readyCallback = ReadyCallback;
handlers.disconnectedCallback += DisconnectedCallback; handlers.disconnectedCallback += DisconnectedCallback;
handlers.errorCallback += ErrorCallback; handlers.errorCallback += ErrorCallback;
handlers.joinCallback += JoinCallback; handlers.joinCallback += JoinCallback;
handlers.spectateCallback += SpectateCallback; handlers.spectateCallback += SpectateCallback;
handlers.requestCallback += RequestCallback; handlers.requestCallback += RequestCallback;
IDiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, "");
LauncherFuncs.UpdateRichPresence(LauncherState.LoadingURI, "", true); LauncherFuncs.UpdateRichPresence(LauncherState.LoadingURI, "", true);
} }