From 5431a352222bbb88eec00b37bbda68857e8d33c4 Mon Sep 17 00:00:00 2001 From: AdAstra-LD <76622070+AdAstra-LD@users.noreply.github.com> Date: Sun, 5 May 2024 16:09:34 +0200 Subject: [PATCH] Created DecompressOverlay with string arg --- DS_Map/DSUtils.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DS_Map/DSUtils.cs b/DS_Map/DSUtils.cs index 6b82af8..00e27b9 100644 --- a/DS_Map/DSUtils.cs +++ b/DS_Map/DSUtils.cs @@ -271,11 +271,9 @@ namespace DSPRE { } return buffer; } - public static int DecompressOverlay(int overlayNumber, bool makeBackup = true) { - string overlayFilePath = GetOverlayPath(overlayNumber); - + public static int DecompressOverlay(string overlayFilePath, bool makeBackup = true) { if (!File.Exists(overlayFilePath)) { - MessageBox.Show("Overlay to decompress #" + overlayNumber + " doesn't exist", + MessageBox.Show($"File to decompress \"{overlayFilePath}\" doesn't exist", "Overlay not found", MessageBoxButtons.OK, MessageBoxIcon.Error); return ERR_OVERLAY_NOTFOUND; } @@ -292,6 +290,9 @@ namespace DSPRE { decompress.WaitForExit(); return decompress.ExitCode; } + public static int DecompressOverlay(int overlayNumber, bool makeBackup = true) { + return DecompressOverlay(GetOverlayPath(overlayNumber), makeBackup); + } public static Process CreateDecompressProcess(string path) { Process decompress = new Process();