From 2154a80e331f6340bde5d79fe02e8f4ce1cc70ad Mon Sep 17 00:00:00 2001 From: MattNL Date: Mon, 20 Feb 2023 17:53:52 -0500 Subject: [PATCH] Fixed Mirror and Armor checkboxes in Box Editor saving incorrectly --- PCK-Studio/Forms/Utilities/Skins/BoxEditor.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PCK-Studio/Forms/Utilities/Skins/BoxEditor.cs b/PCK-Studio/Forms/Utilities/Skins/BoxEditor.cs index 07f06daa..e2fc7e8e 100644 --- a/PCK-Studio/Forms/Utilities/Skins/BoxEditor.cs +++ b/PCK-Studio/Forms/Utilities/Skins/BoxEditor.cs @@ -33,8 +33,8 @@ namespace PckStudio.Forms.Utilities.Skins Size.Z = float.Parse(arguments[6]); uvX = float.Parse(arguments[7]); uvY = float.Parse(arguments[8]); - HideWithArmor = arguments[9] == "1"; - Mirror = arguments[10] == "1"; + HideWithArmor = Convert.ToBoolean(Int32.Parse(arguments[9])); + Mirror = Convert.ToBoolean(Int32.Parse(arguments[10])); Inflation = float.Parse(arguments[11]); } catch (IndexOutOfRangeException) @@ -84,7 +84,8 @@ namespace PckStudio.Forms.Utilities.Skins $"{PosXUpDown.Value} {PosYUpDown.Value} {PosZUpDown.Value} " + $"{SizeXUpDown.Value} {SizeYUpDown.Value} {SizeZUpDown.Value} " + $"{uvXUpDown.Value} {uvYUpDown.Value} " + - $"{(mirrorCheckBox.Checked ? "1 " : "0 ")} {(mirrorCheckBox.Checked ? "1 " : "0 ")} " + + $"{Convert.ToInt32(armorCheckBox.Checked)} " + + $"{Convert.ToInt32(mirrorCheckBox.Checked)} " + $"{inflationUpDown.Value}"; DialogResult = DialogResult.OK; Close();