From e0ba94cf2d1306e6656899ba6d72cace19c47bdd Mon Sep 17 00:00:00 2001
From: Floogen <31755155+Floogen@users.noreply.github.com>
Date: Mon, 19 Jan 2026 15:42:11 -0600
Subject: [PATCH 1/2] Minor code cleanup
---
Stardrop/Models/SMAPI/Manifest.cs | 2 +-
Stardrop/i18n/default.json | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Stardrop/Models/SMAPI/Manifest.cs b/Stardrop/Models/SMAPI/Manifest.cs
index 9d16c326..519f57aa 100644
--- a/Stardrop/Models/SMAPI/Manifest.cs
+++ b/Stardrop/Models/SMAPI/Manifest.cs
@@ -34,7 +34,7 @@ public class Manifest
//[JsonConverter(typeof(ManifestDependencyArrayConverter))]
public ManifestDependency[] Dependencies { get; set; }
- // Custom property for Stardrop.
+ /// Custom property for Stardrop.
public bool DeleteOldVersion { get; set; }
}
}
diff --git a/Stardrop/i18n/default.json b/Stardrop/i18n/default.json
index 788c289b..79691ed9 100644
--- a/Stardrop/i18n/default.json
+++ b/Stardrop/i18n/default.json
@@ -159,10 +159,10 @@
"ui.downloads_panel.download_canceled": "Canceled",
"ui.downloads_panel.download_failed": "Failed",
"ui_downloads_panel.download_success": "Complete!",
- "ui.downloads_panel.no_downloads_label": "No downloads in progress",
+ "ui.downloads_panel.no_downloads_label": "No downloads in progress",
// Downloads Panel - Tooltips
- "ui.downloads_panel.tooltips.cancel_button": "Cancel",
+ "ui.downloads_panel.tooltips.cancel_button": "Cancel",
"ui.downloads_panel.tooltips.remove_button": "Remove", // Tooltip for the button that clears out a completed or failed download
// Warnings
From ce9fbd69865329ebfb3eab1a1033cc29311327c8 Mon Sep 17 00:00:00 2001
From: Floogen <31755155+Floogen@users.noreply.github.com>
Date: Mon, 19 Jan 2026 15:43:31 -0600
Subject: [PATCH 2/2] Implemented custom Manifest property UpdateCautionMessage
Relates to #299.
---
Stardrop/Models/SMAPI/Manifest.cs | 3 +++
Stardrop/Views/MainWindow.axaml.cs | 24 ++++++++++++++++++++++++
Stardrop/i18n/default.json | 1 +
3 files changed, 28 insertions(+)
diff --git a/Stardrop/Models/SMAPI/Manifest.cs b/Stardrop/Models/SMAPI/Manifest.cs
index 519f57aa..b4be1e48 100644
--- a/Stardrop/Models/SMAPI/Manifest.cs
+++ b/Stardrop/Models/SMAPI/Manifest.cs
@@ -36,5 +36,8 @@ public class Manifest
/// Custom property for Stardrop.
public bool DeleteOldVersion { get; set; }
+
+ /// Custom property for Stardrop.
+ public string? UpdateCautionMessage { get; set; }
}
}
diff --git a/Stardrop/Views/MainWindow.axaml.cs b/Stardrop/Views/MainWindow.axaml.cs
index 10a1366c..eea3e639 100644
--- a/Stardrop/Views/MainWindow.axaml.cs
+++ b/Stardrop/Views/MainWindow.axaml.cs
@@ -2260,6 +2260,25 @@ private async Task> AddMods(string[]? filePaths)
continue;
}
+ // If this is a mod update and if the Manifest.UpdateCautionMessage has a value, display message (and confirm if user wants to continue with mod update)
+ bool shouldProceedWithUpdate = true;
+ foreach (var manifest in pathToManifests.Values.Where(m => m is not null && HasModInstalled(m.UniqueID) is true && string.IsNullOrEmpty(m.UpdateCautionMessage) is false))
+ {
+ var requestWindow = new MessageWindow(String.Format(Program.translation.Get("ui.message.confirm_mod_update_caution"), manifest!.Name, manifest!.UpdateCautionMessage)) { Topmost = true };
+ if (await requestWindow.ShowDialog(this) is false)
+ {
+ Program.helper.Log($"User elected to skip mod update due to given Manifest.UpdateCautionMessage message for mod {manifest!.UniqueID}:{manifest!.UpdateCautionMessage}");
+ shouldProceedWithUpdate = false;
+ break;
+ }
+ }
+
+ // Skip updating if user elected to skip any of the bundled mods due to Manifest.UpdateCautionMessage
+ if (shouldProceedWithUpdate is false)
+ {
+ continue;
+ }
+
int currentManifestIndex = 1;
bool alwaysAskToDelete = Program.settings.AlwaysAskToDelete;
foreach (var manifestPath in pathToManifests.Keys)
@@ -2438,6 +2457,11 @@ private async Task> AddMods(string[]? filePaths)
return addedMods;
}
+ private bool HasModInstalled(string uniqueID)
+ {
+ return _viewModel.Mods.Any(m => m.UniqueId.Equals(uniqueID, StringComparison.OrdinalIgnoreCase));
+ }
+
private void CreateDirectoryJunctions(List arguments)
{
// Prepare the process
diff --git a/Stardrop/i18n/default.json b/Stardrop/i18n/default.json
index 79691ed9..ab0fb700 100644
--- a/Stardrop/i18n/default.json
+++ b/Stardrop/i18n/default.json
@@ -228,6 +228,7 @@
"ui.message.confirm_nxm_install": "Would you like to install the following mod:\n\n{0}\n\nYou can disable this confirmation in the settings menu.",
"ui.message.require_nexus_login": "This action requires being signed into the Nexus Mods API.",
"ui.message.succeeded_nexus_install": "Successfully installed the following mod via Nexus Mods:\n\n{0}",
+ "ui.message.confirm_mod_update_caution": "{0}\nUpdate Caution Message:\n\n{1}\n\nProceed with the mod update?",
// Window Names
"ui.window.settings.name": "Settings",