diff --git a/NovetusLauncher/NovetusFuncs/GlobalVars.cs b/NovetusLauncher/NovetusFuncs/GlobalVars.cs index dffe1b7..742c29f 100644 --- a/NovetusLauncher/NovetusFuncs/GlobalVars.cs +++ b/NovetusLauncher/NovetusFuncs/GlobalVars.cs @@ -73,6 +73,7 @@ public static class GlobalVars 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; diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization.cs b/NovetusLauncher/NovetusLauncher/CharacterCustomization.cs index bf5c449..3be5a6c 100644 --- a/NovetusLauncher/NovetusLauncher/CharacterCustomization.cs +++ b/NovetusLauncher/NovetusLauncher/CharacterCustomization.cs @@ -168,7 +168,7 @@ namespace NovetusLauncher try { - Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\icons\\" + GlobalVars.PlayerName + ".png"); + Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradirIcons + "\\" + GlobalVars.PlayerName + ".png"); pictureBox10.Image = icon1; } catch (Exception) when (!Env.Debugging) @@ -1278,7 +1278,7 @@ namespace NovetusLauncher try { - Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradir + "\\icons\\" + GlobalVars.PlayerName + ".png"); + Image icon1 = LauncherFuncs.LoadImage(GlobalVars.extradirIcons + "\\" + GlobalVars.PlayerName + ".png"); pictureBox10.Image = icon1; } catch (Exception) when (!Env.Debugging) diff --git a/NovetusLauncher/NovetusLauncher/MainForm.cs b/NovetusLauncher/NovetusLauncher/MainForm.cs index 46e2a3d..90ed5da 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm.cs @@ -340,7 +340,33 @@ namespace NovetusLauncher ConsolePrint("WARNING 4 - ports.txt not found. Creating empty file.", 5); File.Create(GlobalVars.ConfigDir + "\\ports.txt").Dispose(); } - label5.Text = GlobalVars.BasePath; + + if (!Directory.Exists(GlobalVars.AssetCacheDirFonts)) + { + Directory.CreateDirectory(GlobalVars.AssetCacheDirFonts); + } + + if (!Directory.Exists(GlobalVars.AssetCacheDirSky)) + { + Directory.CreateDirectory(GlobalVars.AssetCacheDirSky); + } + + if (!Directory.Exists(GlobalVars.AssetCacheDirSounds)) + { + Directory.CreateDirectory(GlobalVars.AssetCacheDirSounds); + } + + if (!Directory.Exists(GlobalVars.AssetCacheDirTexturesGUI)) + { + Directory.CreateDirectory(GlobalVars.AssetCacheDirTexturesGUI); + } + + if (!Directory.Exists(GlobalVars.AssetCacheDirScripts)) + { + Directory.CreateDirectory(GlobalVars.AssetCacheDirScripts); + } + + label5.Text = GlobalVars.BasePath; label8.Text = Application.ProductVersion; GlobalVars.important = SecurityFuncs.CalculateMD5(Assembly.GetExecutingAssembly().Location); label11.Text = version;