From 439173b809cac9aee15ee3130565211ec42ae511 Mon Sep 17 00:00:00 2001 From: Guffawaffle Date: Fri, 18 Sep 2026 23:27:18 -0500 Subject: [PATCH 1/2] Repair mission HUD visibility hooks for current client --- example_community_patch_settings_da.toml | 29 ++++---- example_community_patch_settings_de.toml | 29 ++++---- ...munity_patch_settings_en-GB-x-cockney.toml | 29 ++++---- ...mmunity_patch_settings_en-x-minionese.toml | 29 ++++---- example_community_patch_settings_en.toml | 29 ++++---- example_community_patch_settings_es.toml | 29 ++++---- example_community_patch_settings_fr.toml | 29 ++++---- example_community_patch_settings_nl.toml | 29 ++++---- example_community_patch_settings_ru.toml | 29 ++++---- example_community_patch_settings_tlh.toml | 29 ++++---- mods/src/config.cc | 3 - mods/src/defaultconfig.h | 1 - mods/src/patches/parts/mission_hud_tweaks.cc | 68 ++++++++++++++++--- 13 files changed, 177 insertions(+), 185 deletions(-) diff --git a/example_community_patch_settings_da.toml b/example_community_patch_settings_da.toml index bd067d2a8..5474108fb 100644 --- a/example_community_patch_settings_da.toml +++ b/example_community_patch_settings_da.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/example_community_patch_settings_de.toml b/example_community_patch_settings_de.toml index 04b7f970c..4da2914b5 100644 --- a/example_community_patch_settings_de.toml +++ b/example_community_patch_settings_de.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Vorschauen diff --git a/example_community_patch_settings_en-GB-x-cockney.toml b/example_community_patch_settings_en-GB-x-cockney.toml index 72b77cb88..9e5773678 100644 --- a/example_community_patch_settings_en-GB-x-cockney.toml +++ b/example_community_patch_settings_en-GB-x-cockney.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/example_community_patch_settings_en-x-minionese.toml b/example_community_patch_settings_en-x-minionese.toml index ca5a5850f..ecc4b7c2a 100644 --- a/example_community_patch_settings_en-x-minionese.toml +++ b/example_community_patch_settings_en-x-minionese.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/example_community_patch_settings_en.toml b/example_community_patch_settings_en.toml index 20855aed0..0a7a4dabb 100644 --- a/example_community_patch_settings_en.toml +++ b/example_community_patch_settings_en.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/example_community_patch_settings_es.toml b/example_community_patch_settings_es.toml index cd1fb5c77..4ca29932b 100644 --- a/example_community_patch_settings_es.toml +++ b/example_community_patch_settings_es.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/example_community_patch_settings_fr.toml b/example_community_patch_settings_fr.toml index 6fad76481..39a1bc5a4 100644 --- a/example_community_patch_settings_fr.toml +++ b/example_community_patch_settings_fr.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/example_community_patch_settings_nl.toml b/example_community_patch_settings_nl.toml index 59649e9f8..35a6f1b1c 100644 --- a/example_community_patch_settings_nl.toml +++ b/example_community_patch_settings_nl.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/example_community_patch_settings_ru.toml b/example_community_patch_settings_ru.toml index eaf83d806..3d0a6ce31 100644 --- a/example_community_patch_settings_ru.toml +++ b/example_community_patch_settings_ru.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/example_community_patch_settings_tlh.toml b/example_community_patch_settings_tlh.toml index 0ebcbb1b5..3d30db384 100644 --- a/example_community_patch_settings_tlh.toml +++ b/example_community_patch_settings_tlh.toml @@ -730,34 +730,29 @@ pinned_ships = "" # Subgroup: HUD # ------------- -# HUD visibility mode: auto, show, or hide -# "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item -hud_daily_goals = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_field_training = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_missions = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_outposts = "auto" -# HUD visibility mode: auto, show, or hide +# HUD visibility mode: auto, always, or never # "auto" - Use the game's default visibility behaviour -# "show" - Always show this HUD item -# "hide" - Always hide this HUD item +# "always" - Always show this HUD item +# "never" - Always hide this HUD item hud_q_trials = "auto" # Subgroup: Previews diff --git a/mods/src/config.cc b/mods/src/config.cc index d60e54c4d..a39de2c5e 100644 --- a/mods/src/config.cc +++ b/mods/src/config.cc @@ -1105,9 +1105,6 @@ void Config::Load() write_config)); this->mission_hud_buttons.emplace( "outposts", get_mission_hud_visibility(config, parsed, "hud_outposts", DCU::hud_outposts, write_config)); - this->mission_hud_buttons.emplace( - "daily_goals", - get_mission_hud_visibility(config, parsed, "hud_daily_goals", DCU::hud_daily_goals, write_config)); this->mission_hud_buttons.emplace( "missions", get_mission_hud_visibility(config, parsed, "hud_missions", DCU::hud_missions, write_config)); this->installMissionHudTweaksHooks = this->MissionHudTweaksEnabled(); diff --git a/mods/src/defaultconfig.h b/mods/src/defaultconfig.h index 222e87d0d..0f9eda329 100644 --- a/mods/src/defaultconfig.h +++ b/mods/src/defaultconfig.h @@ -247,7 +247,6 @@ namespace UI constexpr bool disable_veil_chat = false; constexpr bool double_click_to_assign_ship = false; constexpr const char* disabled_banner_types = ""; - constexpr const char* hud_daily_goals = "auto"; constexpr const char* hud_field_training = "auto"; constexpr const char* hud_missions = "auto"; constexpr const char* hud_outposts = "auto"; diff --git a/mods/src/patches/parts/mission_hud_tweaks.cc b/mods/src/patches/parts/mission_hud_tweaks.cc index b23ebc46c..e5cf42699 100644 --- a/mods/src/patches/parts/mission_hud_tweaks.cc +++ b/mods/src/patches/parts/mission_hud_tweaks.cc @@ -26,11 +26,10 @@ struct MissionHudButtonDefinition { using ComponentGetGameObjectFn = void* (*)(void*); using GameObjectSetActiveFn = void (*)(void*, bool); -std::array g_button_definitions{{ +std::array g_button_definitions{{ {"q_trials", "_challengesButton"}, {"field_training", "_achievementsButton"}, {"outposts", "_outpostsButton"}, - {"daily_goals", "_dailyGoalsButton"}, {"missions", "_missionsButton"}, }}; @@ -115,15 +114,45 @@ void ApplyButtonVisibility(void* controller, const MissionHudButtonDefinition& b } } // namespace -int32_t MissionsHudViewController_UpdateButtons_Hook(auto original, void* controller) +// Visibility is now refreshed through several independent paths. Keep the game's +// setup/notification work, then apply only explicitly configured overrides. +void ApplyConfiguredButtonVisibility(void* controller) { - const auto result = original(controller); - for (const auto* button : g_configured_buttons) { ApplyButtonVisibility(controller, *button); } +} + +void MissionsHudViewController_OnEnable_Hook(auto original, void* controller) +{ + original(controller); + ApplyConfiguredButtonVisibility(controller); +} + +void MissionsHudViewController_SetupAchievementsButton_Hook(auto original, void* controller) +{ + original(controller); + ApplyConfiguredButtonVisibility(controller); +} - return result; +void MissionsHudViewController_SetupChallengesButton_Hook(auto original, void* controller, bool replace_with_outposts) +{ + original(controller, replace_with_outposts); + ApplyConfiguredButtonVisibility(controller); +} + +void MissionsHudViewController_SetupOutpostsButton_Hook(auto original, void* controller, bool show_outposts) +{ + original(controller, show_outposts); + ApplyConfiguredButtonVisibility(controller); +} + +void MissionsHudViewController_HandleOutpostsAndChallengesHUD_Hook(auto original, void* controller) +{ + // In planetary view this method hides challenges directly, bypassing its setup + // method. Reapply after the whole operation, including the planetary branch. + original(controller); + ApplyConfiguredButtonVisibility(controller); } void InstallMissionHudTweaksHooks() @@ -168,13 +197,30 @@ void InstallMissionHudTweaksHooks() return; } - auto update_buttons = controller_helper.GetMethod("UpdateButtons", 0); - if (!update_buttons) { - ErrorMsg::MissingMethod("MissionsHudViewController", "UpdateButtons"); + // Resolve the complete surface before installing anything. Avoid the tiny + // planetary/outpost event wrappers: these substantive methods own the work. + auto on_enable = controller_helper.GetMethod("OnEnable", 0); + auto achievements = controller_helper.GetMethod("SetupAchievementsButton", 0); + auto challenges = controller_helper.GetMethod("SetupChallengesButton", 1); + auto outposts = controller_helper.GetMethod("SetupOutpostsButton", 1); + auto combined = controller_helper.GetMethod("HandleOutpostsAndChallengesHUD", 0); + if (!on_enable || !achievements || !challenges || !outposts || !combined) { + spdlog::error("MissionHudTweaks: current HUD lifecycle/setup methods are missing; overrides disabled"); return; } spdlog::info("MissionHudTweaks: applying {}", ConfiguredButtonModes()); - SPUD_STATIC_DETOUR(update_buttons, MissionsHudViewController_UpdateButtons_Hook); - spdlog::info("MissionHudTweaks: installed MissionsHudViewController.UpdateButtons hook"); + const bool enabled = SPUD_STATIC_DETOUR(on_enable, MissionsHudViewController_OnEnable_Hook); + const bool achievement_hook = SPUD_STATIC_DETOUR(achievements, MissionsHudViewController_SetupAchievementsButton_Hook); + const bool challenge_hook = SPUD_STATIC_DETOUR(challenges, MissionsHudViewController_SetupChallengesButton_Hook); + const bool outpost_hook = SPUD_STATIC_DETOUR(outposts, MissionsHudViewController_SetupOutpostsButton_Hook); + const bool combined_hook = SPUD_STATIC_DETOUR(combined, MissionsHudViewController_HandleOutpostsAndChallengesHUD_Hook); + if (enabled && achievement_hook && challenge_hook && outpost_hook && combined_hook) { + spdlog::info("MissionHudTweaks: installed current HUD lifecycle/setup hooks"); + } else { + // Successfully installed detours still call through, but must not partially + // enforce preferences when another refresh path could undo them. + g_configured_buttons.clear(); + spdlog::error("MissionHudTweaks: hook installation incomplete; overrides disabled"); + } } From 0121a6fbcc95a8888c8f9ec0ebecbc05c0d3fd67 Mon Sep 17 00:00:00 2001 From: Guffawaffle Date: Thu, 1 Oct 2026 20:59:56 -0500 Subject: [PATCH 2/2] Match mutable field metadata API --- mods/src/patches/parts/mission_hud_tweaks.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/src/patches/parts/mission_hud_tweaks.cc b/mods/src/patches/parts/mission_hud_tweaks.cc index 10b0c44fb..8b703bb2b 100644 --- a/mods/src/patches/parts/mission_hud_tweaks.cc +++ b/mods/src/patches/parts/mission_hud_tweaks.cc @@ -84,7 +84,7 @@ bool ResolveButtonFields(IL2CppClassHelper& controller_helper, Il2CppClass* comp auto valid_count = 0; for (auto* button : g_configured_buttons) { auto field = controller_helper.GetField(button->field_name); - const auto* info = field.get_info(); + auto* info = field.get_info(); const auto* type = info ? info->type : nullptr; auto* field_class = type ? il2cpp_class_from_type(type) : nullptr; if (!info || !type || type->byref || (il2cpp_field_get_flags(info) & FIELD_ATTRIBUTE_STATIC)