Revert "moved local launcher classes to core for exposing to plugins"

This reverts commit c28423abac.
This commit is contained in:
Bitl 2020-07-07 18:28:39 -07:00
parent c28423abac
commit 2f8baf0f8f
31 changed files with 229 additions and 223 deletions

View File

@ -0,0 +1,54 @@
#region Usings
using System.IO;
using System.Reflection;
#endregion
#region Global Paths
public class GlobalPaths
{
public static readonly string RootPathLauncher = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public static readonly string BasePathLauncher = RootPathLauncher.Replace(@"\", @"\\");
public static readonly string RootPath = Directory.GetParent(RootPathLauncher).ToString();
public static readonly string BasePath = RootPath.Replace(@"\", @"\\");
public static readonly string DataPath = BasePath + @"\\shareddata";
public static readonly string ServerDir = DataPath + "\\server";
public static readonly string ConfigDir = BasePath + @"\\config";
public static readonly string ConfigDirData = BasePathLauncher + @"\\data";
public static readonly string ClientDir = BasePath + @"\\clients";
public static readonly string MapsDir = BasePath + @"\\maps";
public static readonly string MapsDirBase = "maps";
public static readonly string BaseGameDir = "rbxasset://../../../";
public static readonly string SharedDataGameDir = BaseGameDir + "shareddata/";
//customization
public static readonly string CustomPlayerDir = DataPath + "\\charcustom";
public static readonly string hatdir = CustomPlayerDir + "\\hats";
public static readonly string facedir = CustomPlayerDir + "\\faces";
public static readonly string headdir = CustomPlayerDir + "\\heads";
public static readonly string tshirtdir = CustomPlayerDir + "\\tshirts";
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/";
public static readonly string faceGameDir = CharCustomGameDir + "faces/";
public static readonly string headGameDir = CharCustomGameDir + "heads/";
public static readonly string tshirtGameDir = CharCustomGameDir + "tshirts/";
public static readonly string shirtGameDir = CharCustomGameDir + "shirts/";
public static readonly string pantsGameDir = CharCustomGameDir + "pants/";
public static readonly string extraGameDir = CharCustomGameDir + "custom/";
//webserver
public static string WebServer_CustomPlayerDir = GlobalVars.WebServerURI + "/charcustom/";
public static string WebServer_HatDir = WebServer_CustomPlayerDir + "hats/";
public static string WebServer_FaceDir = WebServer_CustomPlayerDir + "faces/";
public static string WebServer_HeadDir = WebServer_CustomPlayerDir + "heads/";
public static string WebServer_TShirtDir = WebServer_CustomPlayerDir + "tshirts/";
public static string WebServer_ShirtDir = WebServer_CustomPlayerDir + "shirts/";
public static string WebServer_PantsDir = WebServer_CustomPlayerDir + "pants/";
public static string WebServer_ExtraDir = WebServer_CustomPlayerDir + "custom/";
}
#endregion

View File

@ -27,9 +27,6 @@ public static class GlobalVars
public static bool IsSnapshot = false; public static bool IsSnapshot = false;
//misc vars //misc vars
public static string FullMapPath = ""; public static string FullMapPath = "";
//these are from the launcher. we are putting these values here so we can expose them to plugins.
public static int DefaultRobloxPort = 53640;
public static bool LocalPlayMode = false;
//weebserver //weebserver
public static int WebServerPort = 40735; public static int WebServerPort = 40735;
public static string LocalWebServerURI = "http://localhost:" + (WebServerPort).ToString(); public static string LocalWebServerURI = "http://localhost:" + (WebServerPort).ToString();

View File

@ -1,105 +0,0 @@
#region Usings
using System.IO;
using System.Reflection;
#endregion
#region Global Paths
public class GlobalPaths
{
public static readonly string RootPathLauncher = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public static readonly string BasePathLauncher = RootPathLauncher.Replace(@"\", @"\\");
public static readonly string RootPath = Directory.GetParent(RootPathLauncher).ToString();
public static readonly string BasePath = RootPath.Replace(@"\", @"\\");
public static readonly string DataPath = BasePath + @"\\shareddata";
public static readonly string ServerDir = DataPath + "\\server";
public static readonly string ConfigDir = BasePath + @"\\config";
public static readonly string ConfigDirData = BasePathLauncher + @"\\data";
public static readonly string ClientDir = BasePath + @"\\clients";
public static readonly string MapsDir = BasePath + @"\\maps";
public static readonly string MapsDirBase = "maps";
public static readonly string BaseGameDir = "rbxasset://../../../";
public static readonly string SharedDataGameDir = BaseGameDir + "shareddata/";
//customization
public static readonly string CustomPlayerDir = DataPath + "\\charcustom";
public static readonly string hatdir = CustomPlayerDir + "\\hats";
public static readonly string facedir = CustomPlayerDir + "\\faces";
public static readonly string headdir = CustomPlayerDir + "\\heads";
public static readonly string tshirtdir = CustomPlayerDir + "\\tshirts";
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/";
public static readonly string faceGameDir = CharCustomGameDir + "faces/";
public static readonly string headGameDir = CharCustomGameDir + "heads/";
public static readonly string tshirtGameDir = CharCustomGameDir + "tshirts/";
public static readonly string shirtGameDir = CharCustomGameDir + "shirts/";
public static readonly string pantsGameDir = CharCustomGameDir + "pants/";
public static readonly string extraGameDir = CharCustomGameDir + "custom/";
//webserver
public static string WebServer_CustomPlayerDir = GlobalVars.WebServerURI + "/charcustom/";
public static string WebServer_HatDir = WebServer_CustomPlayerDir + "hats/";
public static string WebServer_FaceDir = WebServer_CustomPlayerDir + "faces/";
public static string WebServer_HeadDir = WebServer_CustomPlayerDir + "heads/";
public static string WebServer_TShirtDir = WebServer_CustomPlayerDir + "tshirts/";
public static string WebServer_ShirtDir = WebServer_CustomPlayerDir + "shirts/";
public static string WebServer_PantsDir = WebServer_CustomPlayerDir + "pants/";
public static string WebServer_ExtraDir = WebServer_CustomPlayerDir + "custom/";
//public static readonly string PluginPath = GlobalPaths.BasePath + "\\plugins";
//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 = 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 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;
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;
}
#endregion

View File

@ -9,30 +9,20 @@
<Import_RootNamespace>NovetusFuncs</Import_RootNamespace> <Import_RootNamespace>NovetusFuncs</Import_RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)AddonLoader.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CryptoRandom.cs" /> <Compile Include="$(MSBuildThisFileDirectory)CryptoRandom.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Downloader.cs" />
<Compile Include="$(MSBuildThisFileDirectory)FileFormat.cs" /> <Compile Include="$(MSBuildThisFileDirectory)FileFormat.cs" />
<Compile Include="$(MSBuildThisFileDirectory)FormExt.cs" />
<Compile Include="$(MSBuildThisFileDirectory)GlobalPaths.cs" /> <Compile Include="$(MSBuildThisFileDirectory)GlobalPaths.cs" />
<Compile Include="$(MSBuildThisFileDirectory)GlobalVars.cs" /> <Compile Include="$(MSBuildThisFileDirectory)GlobalVars.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IconLoader.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IDiscordRPC.cs" /> <Compile Include="$(MSBuildThisFileDirectory)IDiscordRPC.cs" />
<Compile Include="$(MSBuildThisFileDirectory)INIFile.cs" /> <Compile Include="$(MSBuildThisFileDirectory)INIFile.cs" />
<Compile Include="$(MSBuildThisFileDirectory)NETExt.cs" /> <Compile Include="$(MSBuildThisFileDirectory)NETExt.cs" />
<Compile Include="$(MSBuildThisFileDirectory)NetFuncs.cs" /> <Compile Include="$(MSBuildThisFileDirectory)NetFuncs.cs" />
<Compile Include="$(MSBuildThisFileDirectory)RobloxXMLLocalizer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SimpleHTTPServer.cs" /> <Compile Include="$(MSBuildThisFileDirectory)SimpleHTTPServer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ScriptFuncs.cs" /> <Compile Include="$(MSBuildThisFileDirectory)ScriptFuncs.cs" />
<Compile Include="$(MSBuildThisFileDirectory)LauncherFuncs.cs" /> <Compile Include="$(MSBuildThisFileDirectory)LauncherFuncs.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SecurityFuncs.cs" /> <Compile Include="$(MSBuildThisFileDirectory)SecurityFuncs.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Settings.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Settings.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SplashLoader.cs" />
<Compile Include="$(MSBuildThisFileDirectory)TabControlWithoutHeader.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)TextLineRemover.cs" /> <Compile Include="$(MSBuildThisFileDirectory)TextLineRemover.cs" />
<Compile Include="$(MSBuildThisFileDirectory)TreeNodeHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)VarStorage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)VarStorage.cs" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -6,6 +6,8 @@ namespace NovetusLauncher
{ {
public static int Clicks = 0; public static int Clicks = 0;
public static string prevsplash = ""; public static string prevsplash = "";
public static int DefaultRobloxPort = 53640;
public static bool LocalPlayMode = false;
} }
#endregion #endregion
} }

View File

@ -0,0 +1,56 @@

namespace NovetusLauncher
{
class LocalPaths
{
//public static readonly string PluginPath = GlobalPaths.BasePath + "\\plugins";
//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

@ -1,4 +1,5 @@
#region Usings #region Usings
using NovetusLauncher;
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
@ -34,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 });
} }
} }
@ -46,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 });
} }
} }
@ -58,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 });
} }
} }
@ -70,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 });
} }
} }
@ -82,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 });
} }
} }
@ -94,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 });
} }
} }
@ -106,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 });
} }
} }
@ -118,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 });
} }
} }
@ -130,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 });
} }
} }
@ -142,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 });
} }
} }
@ -154,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 });
} }
} }
@ -166,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 });
} }
} }
@ -178,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 });
} }
} }
@ -191,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 });
} }
} }
@ -203,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 });
} }
} }
@ -215,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 });
} }
} }
@ -227,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 });
} }
} }
@ -239,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 });
} }
} }
@ -251,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 });
} }
} }
@ -263,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 });
} }
} }
@ -275,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 });
} }
} }
@ -287,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

@ -322,7 +322,7 @@ namespace NovetusLauncher
void Button1Click(object sender, EventArgs e) void Button1Click(object sender, EventArgs e)
{ {
if (GlobalVars.LocalPlayMode) if (LocalVars.LocalPlayMode)
{ {
GeneratePlayerID(); GeneratePlayerID();
GenerateTripcode(); GenerateTripcode();
@ -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;
@ -485,7 +485,7 @@ namespace NovetusLauncher
void MainFormClose(object sender, CancelEventArgs e) void MainFormClose(object sender, CancelEventArgs e)
{ {
if (GlobalVars.LocalPlayMode != true) if (LocalVars.LocalPlayMode != true)
{ {
WriteConfigValues(); WriteConfigValues();
} }
@ -584,7 +584,7 @@ namespace NovetusLauncher
textBox5.Enabled = false; textBox5.Enabled = false;
button4.Enabled = false; button4.Enabled = false;
checkBox3.Enabled = false; checkBox3.Enabled = false;
GlobalVars.LocalPlayMode = false; LocalVars.LocalPlayMode = false;
break; break;
} }
@ -620,7 +620,7 @@ namespace NovetusLauncher
{ {
GlobalVars.IP = textBox1.Text; GlobalVars.IP = textBox1.Text;
checkBox3.Enabled = false; checkBox3.Enabled = false;
GlobalVars.LocalPlayMode = false; LocalVars.LocalPlayMode = false;
label37.Text = GlobalVars.IP; label37.Text = GlobalVars.IP;
} }
@ -654,7 +654,7 @@ namespace NovetusLauncher
void CheckBox3CheckedChanged(object sender, EventArgs e) void CheckBox3CheckedChanged(object sender, EventArgs e)
{ {
GlobalVars.LocalPlayMode = checkBox3.Checked; LocalVars.LocalPlayMode = checkBox3.Checked;
} }
void TextBox5TextChanged(object sender, EventArgs e) void TextBox5TextChanged(object sender, EventArgs e)
@ -694,7 +694,7 @@ namespace NovetusLauncher
GlobalVars.IP = listBox3.SelectedItem.ToString(); GlobalVars.IP = listBox3.SelectedItem.ToString();
textBox1.Text = GlobalVars.IP; textBox1.Text = GlobalVars.IP;
checkBox3.Enabled = false; checkBox3.Enabled = false;
GlobalVars.LocalPlayMode = false; LocalVars.LocalPlayMode = false;
label37.Text = GlobalVars.IP; label37.Text = GlobalVars.IP;
} }
@ -1299,9 +1299,9 @@ namespace NovetusLauncher
void Button7Click(object sender, EventArgs e) void Button7Click(object sender, EventArgs e)
{ {
numericUpDown1.Value = Convert.ToDecimal(GlobalVars.DefaultRobloxPort); numericUpDown1.Value = Convert.ToDecimal(LocalVars.DefaultRobloxPort);
numericUpDown2.Value = Convert.ToDecimal(GlobalVars.DefaultRobloxPort); numericUpDown2.Value = Convert.ToDecimal(LocalVars.DefaultRobloxPort);
GlobalVars.UserConfiguration.RobloxPort = GlobalVars.DefaultRobloxPort; GlobalVars.UserConfiguration.RobloxPort = LocalVars.DefaultRobloxPort;
} }
void Button23Click(object sender, EventArgs e) void Button23Click(object sender, EventArgs e)
@ -1311,9 +1311,9 @@ namespace NovetusLauncher
void Button22Click(object sender, EventArgs e) void Button22Click(object sender, EventArgs e)
{ {
numericUpDown1.Value = Convert.ToDecimal(GlobalVars.DefaultRobloxPort); numericUpDown1.Value = Convert.ToDecimal(LocalVars.DefaultRobloxPort);
numericUpDown2.Value = Convert.ToDecimal(GlobalVars.DefaultRobloxPort); numericUpDown2.Value = Convert.ToDecimal(LocalVars.DefaultRobloxPort);
GlobalVars.UserConfiguration.RobloxPort = GlobalVars.DefaultRobloxPort; GlobalVars.UserConfiguration.RobloxPort = LocalVars.DefaultRobloxPort;
} }
void TreeView1AfterSelect(object sender, TreeViewEventArgs e) void TreeView1AfterSelect(object sender, TreeViewEventArgs e)
@ -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

@ -324,7 +324,7 @@ namespace NovetusLauncher
void Button1Click(object sender, EventArgs e) void Button1Click(object sender, EventArgs e)
{ {
if (GlobalVars.LocalPlayMode) if (LocalVars.LocalPlayMode)
{ {
GeneratePlayerID(); GeneratePlayerID();
GenerateTripcode(); GenerateTripcode();
@ -447,29 +447,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;
@ -487,7 +487,7 @@ namespace NovetusLauncher
void MainFormClose(object sender, CancelEventArgs e) void MainFormClose(object sender, CancelEventArgs e)
{ {
if (GlobalVars.LocalPlayMode != true) if (LocalVars.LocalPlayMode != true)
{ {
WriteConfigValues(); WriteConfigValues();
} }
@ -620,7 +620,7 @@ namespace NovetusLauncher
textBox5.Enabled = false; textBox5.Enabled = false;
button4.Enabled = false; button4.Enabled = false;
checkBox3.Enabled = false; checkBox3.Enabled = false;
GlobalVars.LocalPlayMode = false; LocalVars.LocalPlayMode = false;
break; break;
} }
@ -656,7 +656,7 @@ namespace NovetusLauncher
{ {
GlobalVars.IP = textBox1.Text; GlobalVars.IP = textBox1.Text;
checkBox3.Enabled = false; checkBox3.Enabled = false;
GlobalVars.LocalPlayMode = false; LocalVars.LocalPlayMode = false;
label37.Text = GlobalVars.IP; label37.Text = GlobalVars.IP;
} }
@ -690,7 +690,7 @@ namespace NovetusLauncher
void CheckBox3CheckedChanged(object sender, EventArgs e) void CheckBox3CheckedChanged(object sender, EventArgs e)
{ {
GlobalVars.LocalPlayMode = checkBox3.Checked; LocalVars.LocalPlayMode = checkBox3.Checked;
} }
void TextBox5TextChanged(object sender, EventArgs e) void TextBox5TextChanged(object sender, EventArgs e)
@ -730,7 +730,7 @@ namespace NovetusLauncher
GlobalVars.IP = listBox3.SelectedItem.ToString(); GlobalVars.IP = listBox3.SelectedItem.ToString();
textBox1.Text = GlobalVars.IP; textBox1.Text = GlobalVars.IP;
checkBox3.Enabled = false; checkBox3.Enabled = false;
GlobalVars.LocalPlayMode = false; LocalVars.LocalPlayMode = false;
label37.Text = GlobalVars.IP; label37.Text = GlobalVars.IP;
} }
@ -1335,9 +1335,9 @@ namespace NovetusLauncher
void Button7Click(object sender, EventArgs e) void Button7Click(object sender, EventArgs e)
{ {
numericUpDown1.Value = Convert.ToDecimal(GlobalVars.DefaultRobloxPort); numericUpDown1.Value = Convert.ToDecimal(LocalVars.DefaultRobloxPort);
numericUpDown2.Value = Convert.ToDecimal(GlobalVars.DefaultRobloxPort); numericUpDown2.Value = Convert.ToDecimal(LocalVars.DefaultRobloxPort);
GlobalVars.UserConfiguration.RobloxPort = GlobalVars.DefaultRobloxPort; GlobalVars.UserConfiguration.RobloxPort = LocalVars.DefaultRobloxPort;
} }
void Button23Click(object sender, EventArgs e) void Button23Click(object sender, EventArgs e)
@ -1347,9 +1347,9 @@ namespace NovetusLauncher
void Button22Click(object sender, EventArgs e) void Button22Click(object sender, EventArgs e)
{ {
numericUpDown1.Value = Convert.ToDecimal(GlobalVars.DefaultRobloxPort); numericUpDown1.Value = Convert.ToDecimal(LocalVars.DefaultRobloxPort);
numericUpDown2.Value = Convert.ToDecimal(GlobalVars.DefaultRobloxPort); numericUpDown2.Value = Convert.ToDecimal(LocalVars.DefaultRobloxPort);
GlobalVars.UserConfiguration.RobloxPort = GlobalVars.DefaultRobloxPort; GlobalVars.UserConfiguration.RobloxPort = LocalVars.DefaultRobloxPort;
} }
void TreeView1AfterSelect(object sender, TreeViewEventArgs e) void TreeView1AfterSelect(object sender, TreeViewEventArgs e)
@ -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

@ -134,7 +134,18 @@
<Compile Include="CharacterCustomization\CharacterCustomization.Designer.cs"> <Compile Include="CharacterCustomization\CharacterCustomization.Designer.cs">
<DependentUpon>CharacterCustomization.cs</DependentUpon> <DependentUpon>CharacterCustomization.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Classes\LocalVars.cs" /> <Compile Include="Classes\Launcher\AddonLoader.cs" />
<Compile Include="Classes\CharCustom\IconLoader.cs" />
<Compile Include="Classes\LocalPaths.cs" />
<Compile Include="Classes\SDK\Downloader.cs" />
<Compile Include="Classes\SDK\RobloxXMLLocalizer.cs" />
<Compile Include="Classes\Launcher\SplashLoader.cs" />
<Compile Include="Classes\WinForms\FormExt.cs" />
<Compile Include="Classes\Launcher\LocalVars.cs" />
<Compile Include="Classes\WinForms\TabControlWithoutHeader.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Classes\WinForms\TreeNodeHelper.cs" />
<Compile Include="LauncherForm\Compact\LauncherFormCompact.cs"> <Compile Include="LauncherForm\Compact\LauncherFormCompact.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>

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