Config System Part 2/ console changes

This commit is contained in:
Bitl 2023-05-18 17:25:05 -07:00
parent 97fc2370f7
commit 43c7856fba
9 changed files with 126 additions and 83 deletions

View File

@ -72,29 +72,29 @@ namespace Novetus.Bootstrapper
//
// CMDButton
//
this.CMDButton.Location = new System.Drawing.Point(166, 58);
this.CMDButton.Location = new System.Drawing.Point(9, 36);
this.CMDButton.Name = "CMDButton";
this.CMDButton.Size = new System.Drawing.Size(60, 23);
this.CMDButton.Size = new System.Drawing.Size(248, 23);
this.CMDButton.TabIndex = 3;
this.CMDButton.Text = "LAUNCH";
this.CMDButton.Text = "LAUNCH SERVER";
this.CMDButton.UseVisualStyleBackColor = true;
this.CMDButton.Click += new System.EventHandler(this.CMDButton_Click);
//
// CMDHelpButton
//
this.CMDHelpButton.Location = new System.Drawing.Point(32, 58);
this.CMDHelpButton.Location = new System.Drawing.Point(9, 63);
this.CMDHelpButton.Name = "CMDHelpButton";
this.CMDHelpButton.Size = new System.Drawing.Size(128, 23);
this.CMDHelpButton.Size = new System.Drawing.Size(248, 23);
this.CMDHelpButton.TabIndex = 4;
this.CMDHelpButton.Text = "ARGUMENT HELP";
this.CMDHelpButton.Text = "CONSOLE HELP";
this.CMDHelpButton.UseVisualStyleBackColor = true;
this.CMDHelpButton.Click += new System.EventHandler(this.CMDHelpButton_Click);
//
// DependencyInstallerButton
//
this.DependencyInstallerButton.Location = new System.Drawing.Point(32, 42);
this.DependencyInstallerButton.Location = new System.Drawing.Point(18, 42);
this.DependencyInstallerButton.Name = "DependencyInstallerButton";
this.DependencyInstallerButton.Size = new System.Drawing.Size(155, 23);
this.DependencyInstallerButton.Size = new System.Drawing.Size(182, 23);
this.DependencyInstallerButton.TabIndex = 5;
this.DependencyInstallerButton.Text = "DEPENDENCY INSTALLER";
this.DependencyInstallerButton.UseVisualStyleBackColor = true;
@ -124,9 +124,9 @@ namespace Novetus.Bootstrapper
//
// ArgBox
//
this.ArgBox.Location = new System.Drawing.Point(6, 32);
this.ArgBox.Location = new System.Drawing.Point(66, 13);
this.ArgBox.Name = "ArgBox";
this.ArgBox.Size = new System.Drawing.Size(251, 20);
this.ArgBox.Size = new System.Drawing.Size(191, 20);
this.ArgBox.TabIndex = 5;
//
// groupBox1

View File

@ -91,7 +91,7 @@ namespace Novetus.Bootstrapper
private void CMDButton_Click(object sender, EventArgs e)
{
LocalFuncs.LaunchApplication(LocalPaths.LauncherName, "-cmdonly -cmdmode " + ArgBox.Text);
LocalFuncs.LaunchApplication(LocalPaths.LauncherName, "-cmdonly " + ArgBox.Text);
Close();
}
@ -116,5 +116,10 @@ namespace Novetus.Bootstrapper
{
GlobalVars.UserConfiguration.SaveSettingBool("BootstrapperShowUI", !LauncherBox.Checked);
}
private void CMDBarebonesButton_Click(object sender, EventArgs e)
{
LocalFuncs.LaunchApplication(LocalPaths.LauncherName, "-cmdonly " + ArgBox.Text);
}
}
}

View File

@ -64,13 +64,17 @@ namespace Novetus.Core
public INIFile INI;
private string Section { get; set; }
private string Path { get; set; }
private string FileName { get; set; }
public string FullPath { get;}
public ConfigBase(string section, string path)
public ConfigBase(string section, string path, string fileName)
{
Section = section;
Path = path;
FileName = fileName;
FullPath = Path + "\\" + FileName;
bool fileExists = File.Exists(Path);
bool fileExists = File.Exists(FullPath);
if (!fileExists)
{
@ -78,13 +82,13 @@ namespace Novetus.Core
}
else
{
INI = new INIFile(Path, false);
INI = new INIFile(FullPath, false);
}
}
public void CreateFile()
{
INI = new INIFile(Path);
INI = new INIFile(FullPath);
GenerateDefaults();
GenerateDefaultsEvent();
}
@ -105,6 +109,11 @@ namespace Novetus.Core
File.Replace(inputPath, Path, null);
}
public void SaveSetting(string name)
{
SaveSetting(Section, name, "");
}
public void SaveSetting(string name, string value)
{
SaveSetting(Section, name, value);
@ -179,7 +188,9 @@ namespace Novetus.Core
#region Configuration
public class Config : ConfigBase
{
public Config() : base("Config", GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName) { }
public Config() : base("Config", GlobalPaths.ConfigDir, GlobalPaths.ConfigName) { }
public Config(string filename) : base("Config", GlobalPaths.ConfigDir, filename) { }
public override void GenerateDefaults()
{
@ -226,7 +237,8 @@ namespace Novetus.Core
#region Customization Configuration
public class CustomizationConfig : ConfigBase
{
public CustomizationConfig() : base("Items", GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigNameCustomization) { }
public CustomizationConfig() : base("Items", GlobalPaths.ConfigDir, GlobalPaths.ConfigNameCustomization) { }
public CustomizationConfig(string filename) : base("Items", GlobalPaths.ConfigDir, filename) { }
public override void GenerateDefaults()
{

View File

@ -110,6 +110,7 @@ namespace Novetus.Core
#region File Names
public static readonly string ConfigName = "config.ini";
public static readonly string CMDConfigName = "config_cmd.ini";
public static string ConfigNameCustomization = "config_customization.ini";
public static readonly string InfoName = "info.ini";
public static readonly string ScriptName = "CSMPFunctions";

View File

@ -41,17 +41,17 @@ namespace NovetusLauncher
private void NewGUI2011MBox_CheckedChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.NewGUI = NewGUI2011MBox.Checked;
GlobalVars.UserConfiguration.SaveSettingBool("NewGUI", NewGUI2011MBox.Checked);
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.GraphicsMode = (Settings.Mode)comboBox1.SelectedIndex;
GlobalVars.UserConfiguration.SaveSettingInt("GraphicsMode", comboBox1.SelectedIndex);
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.QualityLevel = (Settings.Level)comboBox2.SelectedIndex;
GlobalVars.UserConfiguration.SaveSettingInt("QualityLevel", comboBox2.SelectedIndex);
if (comboBox2.SelectedIndex != 6)
{
@ -79,34 +79,37 @@ namespace NovetusLauncher
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
ProcessPriorityClass setting = ProcessPriorityClass.RealTime;
switch (comboBox3.SelectedIndex)
{
case 1:
GlobalVars.UserConfiguration.Priority = ProcessPriorityClass.BelowNormal;
setting = ProcessPriorityClass.BelowNormal;
break;
case 2:
GlobalVars.UserConfiguration.Priority = ProcessPriorityClass.Normal;
setting = ProcessPriorityClass.Normal;
break;
case 3:
GlobalVars.UserConfiguration.Priority = ProcessPriorityClass.AboveNormal;
setting = ProcessPriorityClass.AboveNormal;
break;
case 4:
GlobalVars.UserConfiguration.Priority = ProcessPriorityClass.High;
setting = ProcessPriorityClass.High;
break;
case 5:
GlobalVars.UserConfiguration.Priority = ProcessPriorityClass.RealTime;
setting = ProcessPriorityClass.RealTime;
break;
default:
GlobalVars.UserConfiguration.Priority = ProcessPriorityClass.Idle;
setting = ProcessPriorityClass.Idle;
break;
}
GlobalVars.UserConfiguration.SaveSettingInt("Priority", (int)setting);
}
private void button1_Click(object sender, EventArgs e)
{
if (GlobalVars.UserConfiguration.QualityLevel == Settings.Level.Custom)
if (GlobalVars.UserConfiguration.ReadSettingInt("QualityLevel") == (int)Settings.Level.Custom)
{
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true);
CustomGraphicsOptions opt = new CustomGraphicsOptions();
opt.Show();
}
@ -118,8 +121,8 @@ namespace NovetusLauncher
private void button2_Click(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.QualityLevel = Settings.Level.Automatic;
GlobalVars.UserConfiguration.GraphicsMode = Settings.Mode.Automatic;
GlobalVars.UserConfiguration.SaveSettingInt("QualityLevel", (int)Settings.Level.Automatic);
GlobalVars.UserConfiguration.SaveSettingInt("GraphicsMode", (int)Settings.Mode.Automatic);
ReadConfigValues();
MessageBox.Show("Graphics options reset for the currently selected client!", "Novetus - Client Settings Reset", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
@ -128,12 +131,11 @@ namespace NovetusLauncher
#region Functions
void ReadConfigValues()
{
FileManagement.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
NewGUI2011MBox.Checked = GlobalVars.UserConfiguration.NewGUI;
comboBox1.SelectedIndex = (int)GlobalVars.UserConfiguration.GraphicsMode;
comboBox2.SelectedIndex = (int)GlobalVars.UserConfiguration.QualityLevel;
NewGUI2011MBox.Checked = GlobalVars.UserConfiguration.ReadSettingBool("NewGUI");
comboBox1.SelectedIndex = GlobalVars.UserConfiguration.ReadSettingInt("GraphicsMode");
comboBox2.SelectedIndex = GlobalVars.UserConfiguration.ReadSettingInt("QualityLevel");
switch (GlobalVars.UserConfiguration.Priority)
switch ((ProcessPriorityClass)GlobalVars.UserConfiguration.ReadSettingInt("Priority"))
{
case ProcessPriorityClass.BelowNormal:
comboBox3.SelectedIndex = 1;

View File

@ -21,7 +21,7 @@ namespace NovetusLauncher
bool helpMode = false;
bool disableCommands = false;
string[] argList;
FileFormat.Config savedConfig;
FileFormat.Config cmdConfig;
public NovetusConsole()
{
@ -76,16 +76,32 @@ namespace NovetusLauncher
{
CommandLineArguments.Arguments ConsoleArgs = new CommandLineArguments.Arguments(argList);
if (ConsoleArgs["help"] != null)
if (ConsoleArgs["cmdonly"] != null)
{
helpMode = true;
ConsoleHelp();
}
if (ConsoleArgs["help"] != null)
{
helpMode = true;
ConsoleHelp();
return;
}
string CFGName = GlobalPaths.CMDConfigName;
if (ConsoleArgs["configname"] != null)
{
CFGName = ConsoleArgs["configname"];
}
if (ConsoleArgs["confignooverride"] == null)
{
cmdConfig = new FileFormat.Config(CFGName);
GlobalVars.UserConfiguration = cmdConfig;
}
else
{
cmdConfig = GlobalVars.UserConfiguration;
}
if (ConsoleArgs["cmdonly"] != null && ConsoleArgs["cmdmode"] != null && !helpMode)
{
//cmd mode
savedConfig = GlobalVars.UserConfiguration;
//disableCommands = true;
bool no3d = false;
bool nomap = false;
@ -120,11 +136,9 @@ namespace NovetusLauncher
Util.ConsolePrint(error, 2);
}
if (ConsoleArgs["client"] != null)
{
GlobalVars.UserConfiguration.SelectedClient = ConsoleArgs["client"];
cmdConfig.SaveSetting("SelectedClient", ConsoleArgs["client"]);
}
else
{
@ -154,28 +168,28 @@ namespace NovetusLauncher
if (ConsoleArgs["hostport"] != null)
{
GlobalVars.UserConfiguration.RobloxPort = Convert.ToInt32(ConsoleArgs["hostport"]);
cmdConfig.SaveSettingInt("RobloxPort", Convert.ToInt32(ConsoleArgs["hostport"]));
}
if (ConsoleArgs["upnp"] != null)
{
GlobalVars.UserConfiguration.UPnP = Convert.ToBoolean(ConsoleArgs["upnp"]);
cmdConfig.SaveSettingBool("UPnP", Convert.ToBoolean(ConsoleArgs["upnp"]));
if (GlobalVars.UserConfiguration.UPnP)
if (cmdConfig.ReadSettingBool("UPnP"))
{
Util.ConsolePrint("Novetus will now use UPnP for port forwarding.", 4);
}
else
{
Util.ConsolePrint("Novetus will not use UPnP for port forwarding. Make sure the port " + GlobalVars.UserConfiguration.RobloxPort + " is properly forwarded or you are running a LAN redirection tool.", 4);
Util.ConsolePrint("Novetus will not use UPnP for port forwarding. Make sure the port '" + GlobalVars.UserConfiguration.ReadSettingInt("RobloxPort") + "' is properly forwarded or you are running a LAN redirection tool.", 4);
}
}
if (ConsoleArgs["notifications"] != null)
{
GlobalVars.UserConfiguration.ShowServerNotifications = Convert.ToBoolean(ConsoleArgs["notifications"]);
cmdConfig.SaveSettingBool("ShowServerNotifications", Convert.ToBoolean(ConsoleArgs["notifications"]));
if (GlobalVars.UserConfiguration.ShowServerNotifications)
if (cmdConfig.ReadSettingBool("ShowServerNotifications"))
{
Util.ConsolePrint("Novetus will show notifications on player join/leave.", 4);
}
@ -187,17 +201,17 @@ namespace NovetusLauncher
if (ConsoleArgs["maxplayers"] != null)
{
GlobalVars.UserConfiguration.PlayerLimit = Convert.ToInt32(ConsoleArgs["maxplayers"]);
cmdConfig.SaveSettingInt("PlayerLimit", Convert.ToInt32(ConsoleArgs["maxplayers"]));
}
if (ConsoleArgs["serverbrowsername"] != null)
{
GlobalVars.UserConfiguration.ServerBrowserServerName = ConsoleArgs["serverbrowsername"];
cmdConfig.SaveSetting("ServerBrowserServerName", ConsoleArgs["serverbrowsername"]);
}
if (ConsoleArgs["serverbrowseraddress"] != null)
{
GlobalVars.UserConfiguration.ServerBrowserServerAddress = ConsoleArgs["serverbrowseraddress"];
cmdConfig.SaveSetting("ServerBrowserServerAddress", ConsoleArgs["serverbrowseraddress"]);
}
MapArg(ConsoleArgs);
@ -229,15 +243,19 @@ namespace NovetusLauncher
ConsoleForm.StartGame(loadMode, no3d, nomap, true);
}
else
{
cmdConfig = new FileFormat.Config("cmdconfig.ini");
}
}
public void MapArg (CommandLineArguments.Arguments ConsoleArgs)
{
if (ConsoleArgs["map"] != null)
{
GlobalVars.UserConfiguration.Map = ConsoleArgs["map"];
GlobalVars.UserConfiguration.MapPath = ConsoleArgs["map"];
Util.ConsolePrint("Novetus will now launch the client with the map " + GlobalVars.UserConfiguration.MapPath, 4);
cmdConfig.SaveSetting("Map", ConsoleArgs["map"]);
cmdConfig.SaveSetting("MapPath", ConsoleArgs["map"]);
Util.ConsolePrint("Novetus will now launch the client with the map " + cmdConfig.ReadSetting("MapPath"), 4);
}
else
{
@ -358,13 +376,13 @@ namespace NovetusLauncher
if (vals[1].Equals("none", StringComparison.InvariantCultureIgnoreCase))
{
GlobalVars.UserConfiguration.AlternateServerIP = "";
cmdConfig.SaveSetting("AlternateServerIP");
Util.ConsolePrint("Alternate Server IP removed.", 4);
}
else
{
GlobalVars.UserConfiguration.AlternateServerIP = vals[1];
Util.ConsolePrint("Alternate Server IP set to " + GlobalVars.UserConfiguration.AlternateServerIP, 4);
cmdConfig.SaveSetting("AlternateServerIP", vals[1]);
Util.ConsolePrint("Alternate Server IP set to " + cmdConfig.ReadSetting("AlternateServerIP"), 4);
}
}
catch (Exception)
@ -395,7 +413,7 @@ namespace NovetusLauncher
if (vals[1].Equals("on", StringComparison.InvariantCultureIgnoreCase))
{
if (GlobalVars.UserConfiguration.WebProxyInitialSetupRequired)
if (cmdConfig.ReadSettingBool("WebProxyInitialSetupRequired"))
{
// this is wierd and really dumb if we are just using console mode.....
GlobalVars.Proxy.DoSetup();
@ -403,9 +421,9 @@ namespace NovetusLauncher
else
{
// fast start it.
if (!GlobalVars.UserConfiguration.WebProxyEnabled)
if (!cmdConfig.ReadSettingBool("WebProxyEnabled"))
{
GlobalVars.UserConfiguration.WebProxyEnabled = true;
cmdConfig.SaveSettingBool("WebProxyEnabled", true);
}
GlobalVars.Proxy.Start();
@ -413,7 +431,7 @@ namespace NovetusLauncher
}
else if (vals[1].Equals("off", StringComparison.InvariantCultureIgnoreCase))
{
if (!GlobalVars.Proxy.Started && !GlobalVars.UserConfiguration.WebProxyEnabled)
if (!GlobalVars.Proxy.Started && !cmdConfig.ReadSettingBool("WebProxyEnabled"))
{
Util.ConsolePrint("The web proxy is disabled. Please turn it on in order to use this command.", 2);
return;
@ -423,15 +441,15 @@ namespace NovetusLauncher
}
else if (vals[1].Equals("disable", StringComparison.InvariantCultureIgnoreCase))
{
if (!GlobalVars.Proxy.Started && !GlobalVars.UserConfiguration.WebProxyEnabled)
if (!GlobalVars.Proxy.Started && !cmdConfig.ReadSettingBool("WebProxyEnabled"))
{
Util.ConsolePrint("The web proxy is already disabled.", 2);
return;
}
if (GlobalVars.UserConfiguration.WebProxyEnabled)
if (cmdConfig.ReadSettingBool("WebProxyEnabled"))
{
GlobalVars.UserConfiguration.WebProxyEnabled = false;
cmdConfig.SaveSettingBool("WebProxyEnabled", false);
}
GlobalVars.Proxy.Stop();
@ -440,7 +458,7 @@ namespace NovetusLauncher
}
else if (vals[1].Equals("extensions", StringComparison.InvariantCultureIgnoreCase))
{
if (!GlobalVars.Proxy.Started && !GlobalVars.UserConfiguration.WebProxyEnabled)
if (!GlobalVars.Proxy.Started && !cmdConfig.ReadSettingBool("WebProxyEnabled"))
{
Util.ConsolePrint("The web proxy is disabled. Please turn it on in order to use this command.", 2);
return;
@ -551,10 +569,15 @@ namespace NovetusLauncher
private void ConsoleClose(object sender, FormClosingEventArgs e)
{
CommandLineArguments.Arguments ConsoleArgs = new CommandLineArguments.Arguments(argList);
if (ConsoleArgs["cmdonly"] != null && ConsoleArgs["cmdmode"] != null && !helpMode)
if (ConsoleArgs["confignodelete"] == null || ConsoleArgs["confignooverride"] == null)
{
GlobalVars.UserConfiguration = savedConfig;
if (File.Exists(cmdConfig.FullPath))
{
Util.FixedFileDelete(cmdConfig.FullPath);
}
}
ConsoleForm.CloseEvent(e);
}
}

View File

@ -57,7 +57,7 @@ public partial class AssetDownloader : Form
URLSelection.SelectedItem = URLSelection.Items[0];
//downloader
AssetDownloader_LoadHelpMessage.Checked = GlobalVars.UserConfiguration.DisabledAssetSDKHelp;
AssetDownloader_LoadHelpMessage.Checked = GlobalVars.UserConfiguration.ReadSettingBool("DisabledAssetSDKHelp");
Height = 193;
CenterToScreen();
}
@ -73,7 +73,7 @@ public partial class AssetDownloader : Form
private void URLOverrideBox_Click(object sender, EventArgs e)
{
if (hasOverrideWarningOpenedOnce == false && !GlobalVars.UserConfiguration.DisabledAssetSDKHelp)
if (hasOverrideWarningOpenedOnce == false && !GlobalVars.UserConfiguration.ReadSettingBool("DisabledAssetSDKHelp"))
{
MessageBox.Show("By using the custom URL setting, you will override any selected entry in the default URL list. Keep this in mind before downloading anything with this option.\n\nAlso, the URL must be a asset url with 'asset/?id=' at the end of it in order for the Asset Downloader to work smoothly.", "Asset Downloader - URL Override Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
hasOverrideWarningOpenedOnce = true;
@ -125,7 +125,7 @@ public partial class AssetDownloader : Form
if (!iswebsite)
{
if (!GlobalVars.UserConfiguration.DisabledAssetSDKHelp)
if (!GlobalVars.UserConfiguration.ReadSettingBool("DisabledAssetSDKHelp"))
{
string helptext = "If you're trying to create a offline item, please use these file extension names when saving your files:\n.rbxm - Roblox Model/Item\n.rbxl - Roblox Place\n.mesh - Roblox Mesh\n.png - Texture/Icon\n.wav - Sound\n.lua - Lua Script";
MessageBox.Show(helptext, "Asset Downloader", MessageBoxButtons.OK, MessageBoxIcon.Information);
@ -242,7 +242,7 @@ public partial class AssetDownloader : Form
try
{
if (!GlobalVars.UserConfiguration.DisabledAssetSDKHelp)
if (!GlobalVars.UserConfiguration.ReadSettingBool("DisabledAssetSDKHelp"))
{
string helptext = "If you're trying to create a offline item, please use these file extension names when saving your files:\n.rbxm - Roblox Model/Item\n.rbxl - Roblox Place\n.mesh - Roblox Mesh\n.png - Texture/Icon\n.wav - Sound\n.lua - Lua Script";
MessageBox.Show(helptext, "Asset Downloader", MessageBoxButtons.OK, MessageBoxIcon.Information);
@ -302,7 +302,7 @@ public partial class AssetDownloader : Form
private void AssetDownloader_LoadHelpMessage_CheckedChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.DisabledAssetSDKHelp = AssetDownloader_LoadHelpMessage.Checked;
GlobalVars.UserConfiguration.SaveSettingBool("DisabledAssetSDKHelp", AssetDownloader_LoadHelpMessage.Checked);
}
private void AssetDownloader_BatchMode_CheckedChanged(object sender, EventArgs e)
{

View File

@ -60,7 +60,7 @@ public partial class AssetFixer : Form
URLSelection.SelectedItem = URLSelection.Items[0];
//asset localizer
AssetLocalization_SaveBackups.Checked = GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups;
AssetLocalization_SaveBackups.Checked = GlobalVars.UserConfiguration.ReadSettingBool("AssetSDKFixerSaveBackups");
AssetLocalization_AssetTypeBox.SelectedItem = "RBXL";
SetAssetCachePaths();
@ -83,7 +83,7 @@ public partial class AssetFixer : Form
private void URLOverrideBox_Click(object sender, EventArgs e)
{
if (hasOverrideWarningOpenedOnce == false && !GlobalVars.UserConfiguration.DisabledAssetSDKHelp)
if (hasOverrideWarningOpenedOnce == false && !GlobalVars.UserConfiguration.ReadSettingBool("DisabledAssetSDKHelp"))
{
MessageBox.Show("By using the custom URL setting, you will override any selected entry in the default URL list. Keep this in mind before downloading anything with this option.\n\nAlso, the URL must be a asset url with 'asset/?id=' at the end of it in order for the Asset Downloader to work smoothly.", "Asset Fixer - URL Override Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
hasOverrideWarningOpenedOnce = true;
@ -329,7 +329,7 @@ public partial class AssetFixer : Form
}
}
if (!error && GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups)
if (!error && GlobalVars.UserConfiguration.ReadSettingBool("AssetSDKFixerSaveBackups"))
{
try
{
@ -429,7 +429,7 @@ public partial class AssetFixer : Form
private void AssetLocalization_SaveBackups_CheckedChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.AssetSDKFixerSaveBackups = AssetLocalization_SaveBackups.Checked;
GlobalVars.UserConfiguration.SaveSettingBool("AssetSDKFixerSaveBackups", AssetLocalization_SaveBackups.Checked);
}
private void AssetLocalization_LocalizeButton_Click(object sender, EventArgs e)
@ -504,7 +504,7 @@ public partial class AssetFixer : Form
private void AssetLocalization_LocalizePermanentlyBox_Click(object sender, EventArgs e)
{
if (AssetLocalization_LocalizePermanentlyBox.Checked && !GlobalVars.UserConfiguration.DisabledAssetSDKHelp)
if (AssetLocalization_LocalizePermanentlyBox.Checked && !GlobalVars.UserConfiguration.ReadSettingBool("DisabledAssetSDKHelp"))
{
DialogResult res = MessageBox.Show("If you toggle this option, the Asset SDK will download all localized files directly into your Novetus data, rather than into the Asset Cache. This means you won't be able to clear these files with the 'Clear Asset Cache' option in the Launcher.\n\nWould you like to continue with the option anyways?", "Asset Fixer - Permanent Localization Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (res == DialogResult.No)

View File

@ -18,7 +18,7 @@ public partial class ModCreator : Form
private void ModCreator_Load(object sender, EventArgs e)
{
AuthorBox.Text = GlobalVars.UserConfiguration.PlayerName;
AuthorBox.Text = GlobalVars.UserConfiguration.ReadSetting("PlayerName");
CenterToScreen();
ListFiles();
}