diff --git a/CMakeLists.txt b/CMakeLists.txt index 78a6a7c..816e862 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.22) set(NAME "BakaPowerArmorHUD") -set(VERSION 1.0.0) +set(VERSION 1.1.0) # ---- Options ---- diff --git a/src/c++/Hooks/Hooks.h b/src/c++/Hooks/Hooks.h index 2383f4d..995a9e1 100644 --- a/src/c++/Hooks/Hooks.h +++ b/src/c++/Hooks/Hooks.h @@ -121,6 +121,11 @@ class Hooks return _SetPowerArmorMode(a_inPowerArmor); } + if (MCM::Settings::General::bDisableColor) + { + return; + } + detail::Notify(); } @@ -173,6 +178,11 @@ class Hooks return _QActorInPowerArmor(a_actor); } + if (MCM::Settings::General::bDisableColor) + { + return _QActorInPowerArmor(a_actor); + } + if (!MCM::Settings::General::bDisablePAColor) { return _QActorInPowerArmor(a_actor); @@ -240,6 +250,11 @@ class Hooks return _GetPowerArmorHUDColor(); } + if (MCM::Settings::General::bDisableColor) + { + return _GetPowerArmorHUDColor(); + } + if (!MCM::Settings::General::bDisablePAColor) { return _GetPowerArmorHUDColor(); diff --git a/src/c++/MCM/MCM.h b/src/c++/MCM/MCM.h index 794bf89..1536394 100644 --- a/src/c++/MCM/MCM.h +++ b/src/c++/MCM/MCM.h @@ -10,6 +10,7 @@ namespace MCM public: inline static bool bEnable{ true }; inline static bool bDisablePAColor{ false }; + inline static bool bDisableColor{ false }; inline static double fConditionMeterX{ 136.0 }; inline static double fConditionMeterY{ 675.0 }; @@ -22,6 +23,7 @@ namespace MCM GetModSettingBool("General", "bEnable", General::bEnable); GetModSettingBool("General", "bDisablePAColor", General::bDisablePAColor); + GetModSettingBool("General", "bDisableColor", General::bDisableColor); GetModSettingDouble("General", "fConditionMeterX", General::fConditionMeterX); GetModSettingDouble("General", "fConditionMeterY", General::fConditionMeterY); diff --git a/src/c++/Menus/PowerArmorConditionMenu.h b/src/c++/Menus/PowerArmorConditionMenu.h index aa99823..29d4ee8 100644 --- a/src/c++/Menus/PowerArmorConditionMenu.h +++ b/src/c++/Menus/PowerArmorConditionMenu.h @@ -50,6 +50,11 @@ namespace Menus static void ShowMenu() { + if (!RE::PowerArmor::PlayerInPowerArmor()) + { + return; + } + if (auto UI = RE::UI::GetSingleton()) { if (UI->GetMenuOpen()) @@ -67,11 +72,6 @@ namespace Menus return; } - if (!RE::PowerArmor::PlayerInPowerArmor()) - { - return; - } - if (auto UIMessageQueue = RE::UIMessageQueue::GetSingleton()) { UIMessageQueue->AddMessage(