From b9001dfb550ecf4a93649c45425684800876cbc7 Mon Sep 17 00:00:00 2001 From: Pablo-Dallegri Date: Fri, 7 May 2021 10:29:49 -0300 Subject: [PATCH] Rename cg_alerts to cg_alerts_show --- Resources/Scripts/Gui/Preferences.as | 2 +- Sources/Client/Client_Input.cpp | 8 ++++---- Sources/Client/Client_Update.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Resources/Scripts/Gui/Preferences.as b/Resources/Scripts/Gui/Preferences.as index 1fffb620..090d46b4 100644 --- a/Resources/Scripts/Gui/Preferences.as +++ b/Resources/Scripts/Gui/Preferences.as @@ -660,7 +660,7 @@ namespace spades { layouter.AddHeading(_Tr("Preferences", "Feedbacks")); layouter.AddVolumeSlider(_Tr("Preferences", "Chat Notify Sounds"), "cg_chatBeep"); layouter.AddToggleField(_Tr("Preferences", "Hit Indicator"), "cg_hitIndicator"); - layouter.AddToggleField(_Tr("Preferences", "Show Alerts"), "cg_alerts"); + layouter.AddToggleField(_Tr("Preferences", "Show Alerts"), "cg_alerts_show"); layouter.AddHeading(_Tr("Preferences", "AoS 0.75/0.76 Compatibility")); layouter.AddToggleField(_Tr("Preferences", "Allow Unicode"), "cg_unicode"); diff --git a/Sources/Client/Client_Input.cpp b/Sources/Client/Client_Input.cpp index 4031cf47..e737a135 100644 --- a/Sources/Client/Client_Input.cpp +++ b/Sources/Client/Client_Input.cpp @@ -82,7 +82,7 @@ DEFINE_SPADES_SETTING(cg_keySaveMap, "8"); DEFINE_SPADES_SETTING(cg_switchToolByWheel, "1"); DEFINE_SPADES_SETTING(cg_debugCorpse, "0"); -DEFINE_SPADES_SETTING(cg_alerts, "1"); +DEFINE_SPADES_SETTING(cg_alerts_show, "1"); SPADES_SETTING(cg_manualFocus); DEFINE_SPADES_SETTING(cg_keyAutoFocus, "MiddleMouseButton"); @@ -481,7 +481,7 @@ namespace spades { if (world->GetLocalPlayer()->IsToolSelectable(Player::ToolBlock)) { SetSelectedTool(Player::ToolBlock); } else { - if (cg_alerts) + if (cg_alerts_show) ShowAlert(_Tr("Client", "Out of Blocks"), AlertType::Error); else PlayAlertSound(); @@ -493,7 +493,7 @@ namespace spades { if (world->GetLocalPlayer()->IsToolSelectable(Player::ToolWeapon)) { SetSelectedTool(Player::ToolWeapon); } else { - if (cg_alerts) + if (cg_alerts_show) ShowAlert(_Tr("Client", "Out of Ammo"), AlertType::Error); else PlayAlertSound(); @@ -505,7 +505,7 @@ namespace spades { if (world->GetLocalPlayer()->IsToolSelectable(Player::ToolGrenade)) { SetSelectedTool(Player::ToolGrenade); } else { - if (cg_alerts) + if (cg_alerts_show) ShowAlert(_Tr("Client", "Out of Grenades"), AlertType::Error); else PlayAlertSound(); diff --git a/Sources/Client/Client_Update.cpp b/Sources/Client/Client_Update.cpp index ca07115a..38d9b2e5 100644 --- a/Sources/Client/Client_Update.cpp +++ b/Sources/Client/Client_Update.cpp @@ -53,7 +53,7 @@ SPADES_SETTING(cg_blood); DEFINE_SPADES_SETTING(cg_ejectBrass, "1"); DEFINE_SPADES_SETTING(cg_hitFeedbackSoundGain, "0.2"); -SPADES_SETTING(cg_alerts); +SPADES_SETTING(cg_alerts_show); SPADES_SETTING(cg_centerMessage); SPADES_SETTING(cg_shake); @@ -1276,7 +1276,7 @@ namespace spades { void Client::LocalPlayerBuildError(BuildFailureReason reason) { SPADES_MARK_FUNCTION(); - if (!cg_alerts) { + if (!cg_alerts_show) { PlayAlertSound(); return; }