Customization fix + other fixes
This commit is contained in:
parent
7dff2a4e17
commit
9f6427a5b9
|
|
@ -728,6 +728,8 @@ class CharacterCustomizationShared
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveOutfit(false);
|
SaveOutfit(false);
|
||||||
|
|
||||||
|
FileManagement.ReloadLoadoutValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsItemURL(string item)
|
public bool IsItemURL(string item)
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public partial class CharacterCustomizationCompact : Form
|
||||||
GlobalVars.UserCustomization.SaveSetting("Hat2", listBox2.SelectedItem.ToString());
|
GlobalVars.UserCustomization.SaveSetting("Hat2", listBox2.SelectedItem.ToString());
|
||||||
|
|
||||||
characterCustomizationForm.ChangeItem(
|
characterCustomizationForm.ChangeItem(
|
||||||
GlobalVars.UserCustomization.ReadSetting("Hat1"),
|
GlobalVars.UserCustomization.ReadSetting("Hat2"),
|
||||||
GlobalPaths.hatdir,
|
GlobalPaths.hatdir,
|
||||||
"NoHat",
|
"NoHat",
|
||||||
pictureBox2,
|
pictureBox2,
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ public partial class CharacterCustomizationExtended : Form
|
||||||
GlobalVars.UserCustomization.SaveSetting("Hat2", listBox2.SelectedItem.ToString());
|
GlobalVars.UserCustomization.SaveSetting("Hat2", listBox2.SelectedItem.ToString());
|
||||||
|
|
||||||
characterCustomizationForm.ChangeItem(
|
characterCustomizationForm.ChangeItem(
|
||||||
GlobalVars.UserCustomization.ReadSetting("Hat1"),
|
GlobalVars.UserCustomization.ReadSetting("Hat2"),
|
||||||
GlobalPaths.hatdir,
|
GlobalPaths.hatdir,
|
||||||
"NoHat",
|
"NoHat",
|
||||||
pictureBox2,
|
pictureBox2,
|
||||||
|
|
|
||||||
|
|
@ -1130,11 +1130,12 @@ namespace Novetus.Core
|
||||||
DecompressMap(type, nomap);
|
DecompressMap(type, nomap);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
FileManagement.ReloadLoadoutValue();
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case ScriptType.Client:
|
case ScriptType.Client:
|
||||||
case ScriptType.EasterEgg:
|
case ScriptType.EasterEgg:
|
||||||
FileManagement.ReloadLoadoutValue(true);
|
|
||||||
break;
|
break;
|
||||||
case ScriptType.Server:
|
case ScriptType.Server:
|
||||||
if (GlobalVars.UserConfiguration.ReadSettingBool("FirstServerLaunch"))
|
if (GlobalVars.UserConfiguration.ReadSettingBool("FirstServerLaunch"))
|
||||||
|
|
@ -1157,9 +1158,6 @@ namespace Novetus.Core
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ScriptType.Solo:
|
case ScriptType.Solo:
|
||||||
FileManagement.ReloadLoadoutValue(true);
|
|
||||||
goto default;
|
|
||||||
default:
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,14 +157,14 @@ namespace Novetus.Core
|
||||||
//save setting event goes in here.
|
//save setting event goes in here.
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ReadSetting(string name)
|
public string ReadSetting(string section, string name)
|
||||||
{
|
{
|
||||||
string value = INI.IniReadValue(Section, name);
|
string value = INI.IniReadValue(section, name);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(value))
|
if (!string.IsNullOrWhiteSpace(value))
|
||||||
{
|
{
|
||||||
ReadSettingEvent();
|
ReadSettingEvent();
|
||||||
return INI.IniReadValue(Section, name);
|
return INI.IniReadValue(section, name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -172,6 +172,11 @@ namespace Novetus.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string ReadSetting(string name)
|
||||||
|
{
|
||||||
|
return ReadSetting(Section, name);
|
||||||
|
}
|
||||||
|
|
||||||
public int ReadSettingInt(string name)
|
public int ReadSettingInt(string name)
|
||||||
{
|
{
|
||||||
bool result = int.TryParse(ReadSetting(name), out int value);
|
bool result = int.TryParse(ReadSetting(name), out int value);
|
||||||
|
|
@ -254,42 +259,36 @@ namespace Novetus.Core
|
||||||
#region Customization Configuration
|
#region Customization Configuration
|
||||||
public class CustomizationConfig : ConfigBase
|
public class CustomizationConfig : ConfigBase
|
||||||
{
|
{
|
||||||
public CustomizationConfig() : base("Items", GlobalPaths.ConfigDir, GlobalPaths.ConfigNameCustomization) { }
|
public CustomizationConfig() : base("Customization", GlobalPaths.ConfigDir, GlobalPaths.ConfigNameCustomization) { }
|
||||||
public CustomizationConfig(string filename) : base("Items", GlobalPaths.ConfigDir, filename) { }
|
public CustomizationConfig(string filename) : base("Customization", GlobalPaths.ConfigDir, filename) { }
|
||||||
|
|
||||||
public override void GenerateDefaults()
|
public override void GenerateDefaults()
|
||||||
{
|
{
|
||||||
SaveSetting("Items", "Hat1", "NoHat.rbxm");
|
SaveSetting("Hat1", "NoHat.rbxm");
|
||||||
SaveSetting("Items", "Hat2", "NoHat.rbxm");
|
SaveSetting("Hat2", "NoHat.rbxm");
|
||||||
SaveSetting("Items", "Hat3", "NoHat.rbxm");
|
SaveSetting("Hat3", "NoHat.rbxm");
|
||||||
SaveSetting("Items", "Face", "DefaultFace.rbxm");
|
SaveSetting("Face", "DefaultFace.rbxm");
|
||||||
SaveSetting("Items", "Head", "DefaultHead.rbxm");
|
SaveSetting("Head", "DefaultHead.rbxm");
|
||||||
SaveSetting("Items", "TShirt", "NoTShirt.rbxm");
|
SaveSetting("TShirt", "NoTShirt.rbxm");
|
||||||
SaveSetting("Items", "Shirt", "NoShirt.rbxm");
|
SaveSetting("Shirt", "NoShirt.rbxm");
|
||||||
SaveSetting("Items", "Pants", "NoPants.rbxm");
|
SaveSetting("Pants", "NoPants.rbxm");
|
||||||
SaveSetting("Items", "Icon", "NBC");
|
SaveSetting("Icon", "NBC");
|
||||||
SaveSetting("Items", "Extra", "NoExtra.rbxm");
|
SaveSetting("Extra", "NoExtra.rbxm");
|
||||||
SaveSettingInt("Colors", "HeadColorID", 24);
|
SaveSettingInt("HeadColorID", 24);
|
||||||
SaveSettingInt("Colors", "TorsoColorID", 23);
|
SaveSettingInt("TorsoColorID", 23);
|
||||||
SaveSettingInt("Colors", "LeftArmColorID", 24);
|
SaveSettingInt("LeftArmColorID", 24);
|
||||||
SaveSettingInt("Colors", "RightArmColorID", 24);
|
SaveSettingInt("RightArmColorID", 24);
|
||||||
SaveSettingInt("Colors", "LeftLegColorID", 119);
|
SaveSettingInt("LeftLegColorID", 119);
|
||||||
SaveSettingInt("Colors", "RightLegColorID", 119);
|
SaveSettingInt("RightLegColorID", 119);
|
||||||
SaveSetting("Colors", "HeadColorString", "Color [A=255, R=245, G=205, B=47]");
|
SaveSetting("HeadColorString", "Color [A=255, R=245, G=205, B=47]");
|
||||||
SaveSetting("Colors", "TorsoColorString", "Color [A=255, R=13, G=105, B=172]");
|
SaveSetting("TorsoColorString", "Color [A=255, R=13, G=105, B=172]");
|
||||||
SaveSetting("Colors", "LeftArmColorString", "Color [A=255, R=245, G=205, B=47]");
|
SaveSetting("LeftArmColorString", "Color [A=255, R=245, G=205, B=47]");
|
||||||
SaveSetting("Colors", "RightArmColorString", "Color [A=255, R=245, G=205, B=47]");
|
SaveSetting("RightArmColorString", "Color [A=255, R=245, G=205, B=47]");
|
||||||
SaveSetting("Colors", "LeftLegColorString", "Color [A=255, R=164, G=189, B=71]");
|
SaveSetting("LeftLegColorString", "Color [A=255, R=164, G=189, B=71]");
|
||||||
SaveSetting("Colors", "RightLegColorString", "Color [A=255, R=164, G=189, B=71]");
|
SaveSetting("RightLegColorString", "Color [A=255, R=164, G=189, B=71]");
|
||||||
SaveSettingBool("Other", "ExtraSelectionIsHat", false);
|
SaveSettingBool("ExtraSelectionIsHat", false);
|
||||||
SaveSettingBool("Other", "ShowHatsInExtra", false);
|
SaveSettingBool("ShowHatsInExtra", false);
|
||||||
SaveSetting("Other", "CharacterID", "");
|
SaveSetting("CharacterID", "");
|
||||||
}
|
|
||||||
|
|
||||||
public override void ReadSettingEvent()
|
|
||||||
{
|
|
||||||
//@TODO Reenable customization.
|
|
||||||
//FileManagement.ReloadLoadoutValue();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue