From baf1df3eeebc26a5be4cb045177cd2c014d87a5f Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 16 Nov 2022 16:41:50 +0100 Subject: [PATCH] Update ANIM check in SelectNode --- PCK-Studio/MainForm.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 9349a379..d93fea68 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -23,6 +23,7 @@ using PckStudio.Forms.Additional_Popups; using RichPresenceClient; using PckStudio.Classes.Utils.ARC; +using PckStudio.Classes.Utils; namespace PckStudio { @@ -444,8 +445,7 @@ namespace PckStudio buttonEdit.Visible = true; } else if (file.properties.HasProperty("ANIM") && - (file.properties.GetPropertyValue("ANIM") == "0x40000" || - file.properties.GetPropertyValue("ANIM") == "0x80000")) + file.properties.GetPropertyValue("ANIM", s => new SkinANIM(s)) == (eANIM_EFFECTS.RESOLUTION_64x64 | eANIM_EFFECTS.SLIM_MODEL)) { buttonEdit.Text = "View Skin"; buttonEdit.Visible = true; @@ -654,9 +654,8 @@ namespace PckStudio using RenamePrompt diag = new RenamePrompt(node.FullPath); if (diag.ShowDialog(this) == DialogResult.OK) { - if (node.Tag is PCKFile.FileData) + if (node.Tag is PCKFile.FileData file) { - var file = node.Tag as PCKFile.FileData; file.filepath = diag.NewText; } else // folder @@ -1872,12 +1871,12 @@ namespace PckStudio continue; file.properties.Add((line.Substring(0, idx), line.Substring(idx + 1))); } - ReloadMetaTreeView(); - saved = false; - } + ReloadMetaTreeView(); + saved = false; } } } + } private void correctSkinDecimalsToolStripMenuItem_Click(object sender, EventArgs e) {