preliminary work on new client format

This commit is contained in:
Bitl 2024-02-14 19:06:04 -07:00
parent cfb2375db6
commit 27fe0e777d
9 changed files with 185 additions and 120 deletions

View File

@ -95,7 +95,7 @@ namespace Novetus.Core
public static void GenerateDefaultClientInfo(string path)
{
FileFormat.ClientInfo DefaultClientInfo = new FileFormat.ClientInfo();
FileFormat.ClientInfoLegacy DefaultClientInfo = new FileFormat.ClientInfoLegacy();
bool placeholder = false;
string ClientName = "";
@ -180,13 +180,13 @@ namespace Novetus.Core
}
//NOT FOR SDK.
public static FileFormat.ClientInfo GetClientInfoValues(string ClientName)
public static FileFormat.ClientInfoLegacy GetClientInfoValues(string ClientName)
{
string name = ClientName;
try
{
FileFormat.ClientInfo info = new FileFormat.ClientInfo();
FileFormat.ClientInfoLegacy info = new FileFormat.ClientInfoLegacy();
string clientpath = GlobalPaths.ClientDir + @"\\" + name + @"\\clientinfo.nov";
LoadClientValues(info, clientpath);
return info;
@ -203,7 +203,7 @@ namespace Novetus.Core
LoadClientValues(GlobalVars.SelectedClientInfo, clientpath);
}
public static void LoadClientValues(FileFormat.ClientInfo info, string clientpath)
public static void LoadClientValues(FileFormat.ClientInfoLegacy info, string clientpath)
{
string file, usesplayername, usesid, warning,
legacymode, clientmd5, scriptmd5,
@ -267,11 +267,11 @@ namespace Novetus.Core
info.AlreadyHasSecurity = ConvertSafe.ToBooleanSafe(alreadyhassecurity);
if (clientloadoptions.Equals("True") || clientloadoptions.Equals("False"))
{
info.ClientLoadOptions = Settings.GetClientLoadOptionsForBool(ConvertSafe.ToBooleanSafe(clientloadoptions));
info.ClientLoadOptions = FileFormat.ClientInfoLegacy.GetClientLoadOptionsForBool(ConvertSafe.ToBooleanSafe(clientloadoptions));
}
else
{
info.ClientLoadOptions = (Settings.ClientLoadOptions)ConvertSafe.ToInt32Safe(clientloadoptions);
info.ClientLoadOptions = (FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy)ConvertSafe.ToInt32Safe(clientloadoptions);
}
info.SeperateFolders = ConvertSafe.ToBooleanSafe(folders);
@ -383,14 +383,14 @@ namespace Novetus.Core
{
try
{
FileFormat.ClientInfo info = GetClientInfoValues(ClientName);
FileFormat.ClientInfoLegacy info = GetClientInfoValues(ClientName);
string filterPath = GlobalPaths.ConfigDir + @"\\" + GlobalPaths.FileDeleteFilterName;
string[] fileListToDelete = File.ReadAllLines(filterPath);
foreach (string file in fileListToDelete)
{
string fullFilePath = Settings.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + file;
string fullFilePath = FileFormat.ClientInfoLegacy.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + file;
IOSafe.File.Delete(fullFilePath);
}
@ -398,15 +398,15 @@ namespace Novetus.Core
{
int GraphicsMode = 0;
if (info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomatic)
if (info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomatic)
{
GraphicsMode = 1;
}
else
{
if (info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2007_NoGraphicsOptions ||
info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2008AndUp_NoGraphicsOptions)
if (info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2007_NoGraphicsOptions ||
info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_NoGraphicsOptions)
{
switch ((Settings.Mode)GlobalVars.UserConfiguration.ReadSettingInt("GraphicsMode"))
@ -414,13 +414,13 @@ namespace Novetus.Core
case Settings.Mode.OpenGLStable:
switch (info.ClientLoadOptions)
{
case Settings.ClientLoadOptions.Client_2007:
case Settings.ClientLoadOptions.Client_2008AndUp_LegacyOpenGL:
case Settings.ClientLoadOptions.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2007:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_LegacyOpenGL:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
GraphicsMode = 2;
break;
case Settings.ClientLoadOptions.Client_2008AndUp:
case Settings.ClientLoadOptions.Client_2008AndUp_QualityLevel21:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_QualityLevel21:
GraphicsMode = 4;
break;
default:
@ -444,8 +444,8 @@ namespace Novetus.Core
int MeshDetail = 100;
int ShadingQuality = 100;
int GFXQualityLevel = 19;
if (info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_QualityLevel21)
if (info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_QualityLevel21)
{
GFXQualityLevel = 21;
}
@ -496,10 +496,10 @@ namespace Novetus.Core
MaterialQuality = 2;
AASamples = 4;
Bevels = 2;
if (info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomatic ||
info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_QualityLevel21 ||
info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL)
if (info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomatic ||
info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_QualityLevel21 ||
info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL)
{
Shadows_2008 = 3;
}
@ -524,15 +524,15 @@ namespace Novetus.Core
//save graphics mode.
int GraphicsMode = 0;
if (info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomatic)
if (info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomatic)
{
GraphicsMode = 1;
}
else
{
if (info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2007_NoGraphicsOptions ||
info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2008AndUp_NoGraphicsOptions)
if (info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2007_NoGraphicsOptions ||
info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_NoGraphicsOptions)
{
switch ((Settings.Mode)GlobalVars.UserConfiguration.ReadSettingInt("GraphicsMode"))
@ -540,13 +540,13 @@ namespace Novetus.Core
case Settings.Mode.OpenGLStable:
switch (info.ClientLoadOptions)
{
case Settings.ClientLoadOptions.Client_2007:
case Settings.ClientLoadOptions.Client_2008AndUp_LegacyOpenGL:
case Settings.ClientLoadOptions.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2007:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_LegacyOpenGL:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
GraphicsMode = 2;
break;
case Settings.ClientLoadOptions.Client_2008AndUp:
case Settings.ClientLoadOptions.Client_2008AndUp_QualityLevel21:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_QualityLevel21:
GraphicsMode = 4;
break;
default:
@ -576,7 +576,7 @@ namespace Novetus.Core
{
if (dir.Contains(terms) && !dir.Contains("_default"))
{
IOSafe.File.Copy(dir, Settings.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + Path.GetFileName(dir).Replace(terms, "")
IOSafe.File.Copy(dir, FileFormat.ClientInfoLegacy.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + Path.GetFileName(dir).Replace(terms, "")
.Replace(dir.Substring(dir.LastIndexOf('-') + 1), "")
.Replace("-", ".xml"), true);
}
@ -592,7 +592,7 @@ namespace Novetus.Core
//oh god....
//we're using this one for custom graphics quality. Better than the latter.
public static void ApplyClientSettings_custom(FileFormat.ClientInfo info, string ClientName, int MeshDetail, int ShadingQuality, int MaterialQuality,
public static void ApplyClientSettings_custom(FileFormat.ClientInfoLegacy info, string ClientName, int MeshDetail, int ShadingQuality, int MaterialQuality,
int AA, int AASamples, int Bevels, int Shadows_2008, bool Shadows_2007, string Style_2007, int GFXQualityLevel, string WindowResolution, string FullscreenResolution,
int ModernResolution)
{
@ -600,28 +600,28 @@ namespace Novetus.Core
{
int GraphicsMode = 0;
if (info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomatic)
if (info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomatic)
{
GraphicsMode = 1;
}
else
{
if (info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2007_NoGraphicsOptions ||
info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2008AndUp_NoGraphicsOptions)
if (info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2007_NoGraphicsOptions ||
info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_NoGraphicsOptions)
{
switch ((Settings.Mode)GlobalVars.UserConfiguration.ReadSettingInt("GraphicsMode"))
{
case Settings.Mode.OpenGLStable:
switch (info.ClientLoadOptions)
{
case Settings.ClientLoadOptions.Client_2007:
case Settings.ClientLoadOptions.Client_2008AndUp_LegacyOpenGL:
case Settings.ClientLoadOptions.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2007:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_LegacyOpenGL:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
GraphicsMode = 2;
break;
case Settings.ClientLoadOptions.Client_2008AndUp:
case Settings.ClientLoadOptions.Client_2008AndUp_QualityLevel21:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp:
case FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_QualityLevel21:
GraphicsMode = 4;
break;
default:
@ -652,7 +652,7 @@ namespace Novetus.Core
}
//it's worse.
public static void ApplyClientSettings(FileFormat.ClientInfo info, string ClientName, int GraphicsMode, int MeshDetail, int ShadingQuality, int MaterialQuality,
public static void ApplyClientSettings(FileFormat.ClientInfoLegacy info, string ClientName, int GraphicsMode, int MeshDetail, int ShadingQuality, int MaterialQuality,
int AA, int AASamples, int Bevels, int Shadows_2008, bool Shadows_2007, string Style_2007, int GFXQualityLevel, string WindowResolution, string FullscreenResolution,
int ModernResolution, bool onlyGraphicsMode = false)
{
@ -731,7 +731,7 @@ namespace Novetus.Core
finally
{
doc.Save(dir);
IOSafe.File.Copy(dir, Settings.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + Path.GetFileName(dir).Replace(terms, "")
IOSafe.File.Copy(dir, FileFormat.ClientInfoLegacy.GetPathForClientLoadOptions(info.ClientLoadOptions) + @"\" + Path.GetFileName(dir).Replace(terms, "")
.Replace(dir.Substring(dir.LastIndexOf('-') + 1), "")
.Replace("-", ".xml"), true);
}
@ -1126,7 +1126,7 @@ namespace Novetus.Core
string mapfile = (GlobalVars.EasterEggMode && type != ScriptType.Solo) ? GlobalPaths.DataDir + "\\Appreciation.rbxl" :
(is3DView ? GlobalPaths.DataDir + "\\3DView.rbxl" : mapfilepath);
string mapname = ((GlobalVars.EasterEggMode && type != ScriptType.Solo) || is3DView) ? "" : mapfilename;
FileFormat.ClientInfo info = GetClientInfoValues(ClientName);
FileFormat.ClientInfoLegacy info = GetClientInfoValues(ClientName);
string quote = "\"";
string args = "";
GlobalVars.ValidatedExtraFiles = 0;

View File

@ -2,16 +2,92 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Xml.Linq;
using static Novetus.Core.FileFormat.ClientInfo;
using static Novetus.Core.FileFormat.ClientInfoLegacy;
namespace Novetus.Core
{
#region File Formats
public class FileFormat
{
#region Client Information
#region Client Information (Legacy)
public class ClientInfo
{
public class ClientPathDictionary
{
private Dictionary<ScriptType, string> _dict = new Dictionary<ScriptType, string>();
public Dictionary<ScriptType, string> Dict
{
get
{
return _dict;
}
set
{
_dict = value;
}
}
}
public enum ClientTag
{
NoGraphicsOptions,
ForceLegacyOpenGL,
HasQualityLevel21,
ForceAutomatic,
HasCharacterOnlyShadows,
RequiresWebProxy,
RequiresOnlineScripts,
RequiresCurrentMinimumNovetusVersion
}
public ClientInfo()
{
UsesPlayerName = true;
UsesID = true;
Description = "";
Warning = "";
ClientPaths = new ClientPathDictionary();
ClientMD5s = new ClientPathDictionary();
ScriptPaths = new ClientPathDictionary();
ScriptMD5s = new ClientPathDictionary();
CommandLineArgs = new ClientPathDictionary();
ClientTags = new List<ClientTag>();
}
public bool UsesPlayerName { get; set; }
public bool UsesID { get; set; }
public string Description { get; set; }
public string Warning { get; set; }
public ClientPathDictionary ClientPaths { get; set; }
public ClientPathDictionary ClientMD5s { get; set; }
public ClientPathDictionary ScriptPaths { get; set; }
public ClientPathDictionary ScriptMD5s { get; set; }
public ClientPathDictionary CommandLineArgs { get; set; }
public List<ClientTag> ClientTags { get; set; }
}
#endregion
//TODO: move this to legacy clientinfo creator when we move to JSON.
#region Client Information (Legacy)
public class ClientInfoLegacy
{
public enum ClientLoadOptionsLegacy
{
Client_2007_NoGraphicsOptions = 0,
Client_2007 = 1,
Client_2008AndUp = 2,
Client_2008AndUp_LegacyOpenGL = 3,
Client_2008AndUp_QualityLevel21 = 4,
Client_2008AndUp_NoGraphicsOptions = 5,
Client_2008AndUp_ForceAutomatic = 6,
Client_2008AndUp_ForceAutomaticQL21 = 7,
Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL = 8
}
public ClientInfoLegacy()
{
UsesPlayerName = true;
UsesID = true;
@ -22,7 +98,7 @@ namespace Novetus.Core
ScriptMD5 = "";
Fix2007 = false;
AlreadyHasSecurity = false;
ClientLoadOptions = Settings.ClientLoadOptions.Client_2008AndUp;
ClientLoadOptions = ClientLoadOptionsLegacy.Client_2008AndUp;
SeperateFolders = false;
UsesCustomClientEXEName = false;
CustomClientEXEName = "";
@ -41,8 +117,49 @@ namespace Novetus.Core
public bool SeperateFolders { get; set; }
public bool UsesCustomClientEXEName { get; set; }
public string CustomClientEXEName { get; set; }
public Settings.ClientLoadOptions ClientLoadOptions { get; set; }
public ClientLoadOptionsLegacy ClientLoadOptions { get; set; }
public string CommandLineArgs { get; set; }
public static ClientLoadOptionsLegacy GetClientLoadOptionsForBool(bool level)
{
switch (level)
{
case false:
return ClientLoadOptionsLegacy.Client_2008AndUp;
default:
return ClientLoadOptionsLegacy.Client_2007_NoGraphicsOptions;
}
}
public static string GetPathForClientLoadOptions(ClientLoadOptionsLegacy level)
{
string localAppdataRobloxPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Roblox";
string appdataRobloxPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Roblox";
if (!Directory.Exists(localAppdataRobloxPath))
{
Directory.CreateDirectory(localAppdataRobloxPath);
}
if (!Directory.Exists(appdataRobloxPath))
{
Directory.CreateDirectory(appdataRobloxPath);
}
switch (level)
{
case ClientLoadOptionsLegacy.Client_2008AndUp_QualityLevel21:
case ClientLoadOptionsLegacy.Client_2008AndUp_LegacyOpenGL:
case ClientLoadOptionsLegacy.Client_2008AndUp_NoGraphicsOptions:
case ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomatic:
case ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomaticQL21:
case ClientLoadOptionsLegacy.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
case ClientLoadOptionsLegacy.Client_2008AndUp:
return localAppdataRobloxPath;
default:
return appdataRobloxPath;
}
}
}
#endregion

View File

@ -62,7 +62,7 @@ namespace Novetus.Core
public static string GetScriptFuncForType(string ClientName, ScriptType type)
{
FileFormat.ClientInfo info = Client.GetClientInfoValues(ClientName);
FileFormat.ClientInfoLegacy info = Client.GetClientInfoValues(ClientName);
string rbxexe = "";
if (info.LegacyMode)
@ -338,7 +338,7 @@ namespace Novetus.Core
public static string GetRawArgsForType(ScriptType type, string ClientName, string luafile)
{
FileFormat.ClientInfo info = Client.GetClientInfoValues(ClientName);
FileFormat.ClientInfoLegacy info = Client.GetClientInfoValues(ClientName);
if (!info.Fix2007)
{
@ -362,6 +362,8 @@ namespace Novetus.Core
return CompileScript(GlobalVars.UserConfiguration.ReadSetting("SelectedClient"), code, tag, endtag, mapfile, luafile, rbxexe, usesharedtags);
}
//TODO I'll deal with this later.....
public static string CompileScript(string ClientName, string code, string tag, string endtag, string mapfile, string luafile, string rbxexe, bool usesharedtags = true)
{
string start = tag;
@ -384,7 +386,7 @@ namespace Novetus.Core
}
}
FileFormat.ClientInfo info = Client.GetClientInfoValues(ClientName);
FileFormat.ClientInfoLegacy info = Client.GetClientInfoValues(ClientName);
ScriptType type = GetTypeFromTag(start);

View File

@ -34,60 +34,6 @@ namespace Novetus.Core
Compact = 2,
Stylish = 3
}
public enum ClientLoadOptions
{
Client_2007_NoGraphicsOptions = 0,
Client_2007 = 1,
Client_2008AndUp = 2,
Client_2008AndUp_LegacyOpenGL = 3,
Client_2008AndUp_QualityLevel21 = 4,
Client_2008AndUp_NoGraphicsOptions = 5,
Client_2008AndUp_ForceAutomatic = 6,
Client_2008AndUp_ForceAutomaticQL21 = 7,
Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL = 8
}
public static ClientLoadOptions GetClientLoadOptionsForBool(bool level)
{
switch (level)
{
case false:
return ClientLoadOptions.Client_2008AndUp;
default:
return ClientLoadOptions.Client_2007_NoGraphicsOptions;
}
}
public static string GetPathForClientLoadOptions(ClientLoadOptions level)
{
string localAppdataRobloxPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Roblox";
string appdataRobloxPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Roblox";
if (!Directory.Exists(localAppdataRobloxPath))
{
Directory.CreateDirectory(localAppdataRobloxPath);
}
if (!Directory.Exists(appdataRobloxPath))
{
Directory.CreateDirectory(appdataRobloxPath);
}
switch (level)
{
case ClientLoadOptions.Client_2008AndUp_QualityLevel21:
case ClientLoadOptions.Client_2008AndUp_LegacyOpenGL:
case ClientLoadOptions.Client_2008AndUp_NoGraphicsOptions:
case ClientLoadOptions.Client_2008AndUp_ForceAutomatic:
case ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21:
case ClientLoadOptions.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
case ClientLoadOptions.Client_2008AndUp:
return localAppdataRobloxPath;
default:
return appdataRobloxPath;
}
}
}
#endregion

View File

@ -86,7 +86,7 @@ namespace Novetus.Core
#region Class definitions
public static FileFormat.ProgramInfo ProgramInformation = new FileFormat.ProgramInfo();
public static FileFormat.Config UserConfiguration = new FileFormat.Config();
public static FileFormat.ClientInfo SelectedClientInfo = new FileFormat.ClientInfo();
public static FileFormat.ClientInfoLegacy SelectedClientInfo = new FileFormat.ClientInfoLegacy();
public static FileFormat.CustomizationConfig UserCustomization = new FileFormat.CustomizationConfig();
public static PartColor[] PartColorList;
public static List<PartColor> PartColorListConv;

View File

@ -28,7 +28,7 @@ namespace NovetusLauncher
private string FullscreenResolution = "";
private bool initial = true;
private int ModernResolution = 0;
private FileFormat.ClientInfo info;
private FileFormat.ClientInfoLegacy info;
#endregion
#region Constructor
@ -307,8 +307,8 @@ namespace NovetusLauncher
private void GraphicsLevel_ValueChanged(object sender, EventArgs e)
{
if (GraphicsLevel.Value > 19 && (info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2008AndUp_QualityLevel21))
if (GraphicsLevel.Value > 19 && (info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_QualityLevel21))
{
GraphicsLevel.Value = 19;
}
@ -318,8 +318,8 @@ namespace NovetusLauncher
private void GraphicsLevel_Click(object sender, EventArgs e)
{
if (GraphicsLevel.Value > 19 && (info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions != Settings.ClientLoadOptions.Client_2008AndUp_QualityLevel21))
if (GraphicsLevel.Value > 19 && (info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions != FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp_QualityLevel21))
{
MessageBox.Show("This client does not support quality levels above 19.", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

View File

@ -11,7 +11,7 @@ using Novetus.Core;
public partial class ClientinfoEditor : Form
{
#region Private Variables
private FileFormat.ClientInfo SelectedClientInfo = new FileFormat.ClientInfo();
private FileFormat.ClientInfoLegacy SelectedClientInfo = new FileFormat.ClientInfoLegacy();
private string SelectedClientInfoPath = "";
private bool Locked = false;
public string RelativePath = "";
@ -208,11 +208,11 @@ public partial class ClientinfoEditor : Form
if (cmdargsorclientoptions.Equals("True") || cmdargsorclientoptions.Equals("False"))
{
label9.Text = "v2 (Last used in v1.2.3)";
SelectedClientInfo.ClientLoadOptions = Settings.GetClientLoadOptionsForBool(ConvertSafe.ToBooleanSafe(cmdargsorclientoptions));
SelectedClientInfo.ClientLoadOptions = FileFormat.ClientInfoLegacy.GetClientLoadOptionsForBool(ConvertSafe.ToBooleanSafe(cmdargsorclientoptions));
}
else
{
SelectedClientInfo.ClientLoadOptions = (Settings.ClientLoadOptions)ConvertSafe.ToInt32Safe(cmdargsorclientoptions);
SelectedClientInfo.ClientLoadOptions = (FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy)ConvertSafe.ToInt32Safe(cmdargsorclientoptions);
}
SelectedClientInfo.CommandLineArgs = commandargsver2;
}
@ -220,7 +220,7 @@ public partial class ClientinfoEditor : Form
catch (Exception)
{
//Again, fake it.
SelectedClientInfo.ClientLoadOptions = Settings.ClientLoadOptions.Client_2008AndUp;
SelectedClientInfo.ClientLoadOptions = FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy.Client_2008AndUp;
SelectedClientInfo.CommandLineArgs = cmdargsorclientoptions;
}
@ -430,7 +430,7 @@ public partial class ClientinfoEditor : Form
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
SelectedClientInfo.ClientLoadOptions = (Settings.ClientLoadOptions)comboBox1.SelectedIndex;
SelectedClientInfo.ClientLoadOptions = (FileFormat.ClientInfoLegacy.ClientLoadOptionsLegacy)comboBox1.SelectedIndex;
BeginInvoke(new Action(() => { comboBox1.Select(0, 0); }));
}
@ -578,7 +578,7 @@ public partial class ClientinfoEditor : Form
void NewClientInfo()
{
label9.Text = "Not Loaded";
SelectedClientInfo = new FileFormat.ClientInfo();
SelectedClientInfo = new FileFormat.ClientInfoLegacy();
Locked = false;
SelectedClientInfoPath = "";
LoadUIElements();

View File

@ -54,7 +54,7 @@
System.Windows.Forms.ListViewItem listViewItem13 = new System.Windows.Forms.ListViewItem(new string[] {
"JSON Content Editor"}, 9, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem14 = new System.Windows.Forms.ListViewItem(new string[] {
"Client SDK ( Legacy)"}, "ClientSDK.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))));
"Client SDK (Legacy)"}, "ClientSDK.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NovetusSDK));
this.label1 = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();

View File

@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACw
FgAAAk1TRnQBSQFMAgEBDQEAAWgBAAFoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
FgAAAk1TRnQBSQFMAgEBDQEAAXABAAFwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAAUADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA