From: alexalexmax <149889301+alexalexmax@users.noreply.github.com> Date: Fri, 26 Dec 2025 02:47:05 +0000 (-0800) Subject: Voice mask effects are toggleable and hide your accent (#41965) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4ff7411fb786c1288db1d2feab080729d2551018;p=space-station-14.git Voice mask effects are toggleable and hide your accent (#41965) * apply negate accents system * add toggle to voice mask ui * roll negateaccents into voice mask system, delete negate accents comp&system, update yml entries * convert button to ToggleButton and some cleanup * retry for heisenfail * accent toggle * update names and add mask active check for accent hiding --- diff --git a/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs b/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs index e76ca1cf8f..b2b374cac5 100644 --- a/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs +++ b/Content.Client/VoiceMask/VoiceMaskBoundUserInterface.cs @@ -26,6 +26,8 @@ public sealed class VoiceMaskBoundUserInterface : BoundUserInterface _window.OnNameChange += OnNameSelected; _window.OnVerbChange += verb => SendMessage(new VoiceMaskChangeVerbMessage(verb)); + _window.OnToggle += OnToggle; + _window.OnAccentToggle += OnAccentToggle; } private void OnNameSelected(string name) @@ -33,6 +35,16 @@ public sealed class VoiceMaskBoundUserInterface : BoundUserInterface SendMessage(new VoiceMaskChangeNameMessage(name)); } + private void OnToggle() + { + SendMessage(new VoiceMaskToggleMessage()); + } + + private void OnAccentToggle() + { + SendMessage(new VoiceMaskAccentToggleMessage()); + } + protected override void UpdateState(BoundUserInterfaceState state) { if (state is not VoiceMaskBuiState cast || _window == null) @@ -40,7 +52,7 @@ public sealed class VoiceMaskBoundUserInterface : BoundUserInterface return; } - _window.UpdateState(cast.Name, cast.Verb); + _window.UpdateState(cast.Name, cast.Verb, cast.Active, cast.AccentHide); } protected override void Dispose(bool disposing) diff --git a/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml b/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml index e23aca1239..18416757b9 100644 --- a/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml +++ b/Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml @@ -12,5 +12,7 @@