Add option to disable bwoink sound. (#33782)
* Add option to disable bwoink sound. * Now it's working only with active admin status. * No bwoink, only "notification sound" * Moar changes * Another one
This commit is contained in:
@@ -45,6 +45,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
|
||||
public IAHelpUIHandler? UIHelper;
|
||||
private bool _discordRelayActive;
|
||||
private bool _hasUnreadAHelp;
|
||||
private bool _bwoinkSoundEnabled;
|
||||
private string? _aHelpSound;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -56,6 +57,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
|
||||
|
||||
_adminManager.AdminStatusUpdated += OnAdminStatusUpdated;
|
||||
_config.OnValueChanged(CCVars.AHelpSound, v => _aHelpSound = v, true);
|
||||
_config.OnValueChanged(CCVars.BwoinkSoundEnabled, v => _bwoinkSoundEnabled = v, true);
|
||||
}
|
||||
|
||||
public void UnloadButton()
|
||||
@@ -135,7 +137,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
|
||||
}
|
||||
if (message.PlaySound && localPlayer.UserId != message.TrueSender)
|
||||
{
|
||||
if (_aHelpSound != null)
|
||||
if (_aHelpSound != null && (_bwoinkSoundEnabled || !_adminManager.IsActive()))
|
||||
_audio.PlayGlobal(_aHelpSound, Filter.Local(), false);
|
||||
_clyde.RequestWindowAttention();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user