From 77faa3eaa9bb732b32d755c2517a27397ad16bb3 Mon Sep 17 00:00:00 2001 From: MattNL Date: Wed, 15 Mar 2023 11:44:14 -0400 Subject: [PATCH] Added warning when deleting compass.png or clock.png --- PCK-Studio/MainForm.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 3672e21d..aff0517f 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -703,6 +703,17 @@ namespace PckStudio if (node.Tag is PckFile.FileData) { PckFile.FileData file = node.Tag as PckFile.FileData; + + string itemPath = "res/textures/items/"; + + // warn the user about deleting compass.png and clock.png + if (file.Filetype == PckFile.FileData.FileType.TextureFile && + (file.Filename == itemPath + "compass.png" || file.Filename == itemPath + "clock.png")) + { + if(MessageBox.Show("Are you sure want to delete this file? If \"compass.png\" or \"clock.png\" are missing, your game will crash upon loading this pack.", "Warning", + MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) return; + } + // remove loc key if its a skin/cape if (file.Filetype == PckFile.FileData.FileType.SkinFile || file.Filetype == PckFile.FileData.FileType.CapeFile) {