From 1f7e2f5ed396a698d2b2959a2a0bc46b483b96c2 Mon Sep 17 00:00:00 2001 From: Nemoumbra <62447396+Nemoumbra@users.noreply.github.com> Date: Thu, 16 Nov 2023 23:38:20 +0300 Subject: [PATCH] fix: IPS Patch Achievement not being obtainable (#1429) It turned out that the achievement "ROM hacks" wasn't actually unlockable. I'm not sure if the IPS32 patch also has to trigger this achievement, but it seemed logical to me so I added the call to both methods. --- plugins/builtin/source/content/main_menu_items.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/main_menu_items.cpp b/plugins/builtin/source/content/main_menu_items.cpp index dad00327e..20d2c7d1b 100644 --- a/plugins/builtin/source/content/main_menu_items.cpp +++ b/plugins/builtin/source/content/main_menu_items.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -276,6 +277,8 @@ namespace hex::plugin::builtin { else { handleIPSError(data.error()); } + + AchievementManager::unlockAchievement("hex.builtin.achievement.hex_editor", "hex.builtin.achievement.hex_editor.create_patch.name"); }); }); }); @@ -306,8 +309,11 @@ namespace hex::plugin::builtin { if (data.has_value()) file.writeVector(data.value()); - else + else { handleIPSError(data.error()); + } + + AchievementManager::unlockAchievement("hex.builtin.achievement.hex_editor", "hex.builtin.achievement.hex_editor.create_patch.name"); }); }); });