From 2c486b8f238853a7b448e71e12796efaf96cae53 Mon Sep 17 00:00:00 2001 From: nenado45 Date: Thu, 23 Jul 2026 10:44:18 +0500 Subject: [PATCH 1/4] =?UTF-8?q?=D1=88=D1=88=D1=88=D1=88=D1=89=D1=89=D1=89?= =?UTF-8?q?=D1=89=D1=89=D1=81=D1=81=D1=81=D1=81=D1=81=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EntitySystems/LizardAccentSystem.cs | 59 ++++++++++++++++++- .../Speech/EntitySystems/StutteringSystem.cs | 2 +- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs index 97981ea30c2..679fd436ad5 100644 --- a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 Alex Evgrashin +// SPDX-FileCopyrightText: 2022 Alex Evgrashin // SPDX-FileCopyrightText: 2024 Pieter-Jan Briers // SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com> // @@ -6,12 +6,17 @@ using System.Text.RegularExpressions; using Content.Server.Speech.Components; +using Robust.Shared.Random; using Content.Shared.Speech; +#pragma warning disable RA0026 + namespace Content.Server.Speech.EntitySystems; public sealed class LizardAccentSystem : EntitySystem { + [Dependency] private readonly IRobustRandom _random = default!; // Corvax-Localization + private static readonly Regex RegexLowerS = new("s+"); private static readonly Regex RegexUpperS = new("S+"); private static readonly Regex RegexInternalX = new(@"(\w)x"); @@ -39,6 +44,56 @@ private void OnAccent(EntityUid uid, LizardAccentComponent component, AccentGetE // eckS message = RegexUpperEndX.Replace(message, "ECKS$1"); + // Corvax-Localization-Start + // c => ссс + message = Regex.Replace( + message, + "с+", + _random.Pick(new List() { "сс", "ссс" }) + ); + // С => CCC + message = Regex.Replace( + message, + "С+", + _random.Pick(new List() { "СС", "ССС" }) + ); + // з => ссс + message = Regex.Replace( + message, + "з+", + _random.Pick(new List() { "сс", "ссс" }) + ); + // З => CCC + message = Regex.Replace( + message, + "З+", + _random.Pick(new List() { "СС", "ССС" }) + ); + // ш => шшш + message = Regex.Replace( + message, + "ш+", + _random.Pick(new List() { "шш", "шшш" }) + ); + // Ш => ШШШ + message = Regex.Replace( + message, + "Ш+", + _random.Pick(new List() { "ШШ", "ШШШ" }) + ); + // ч => щщщ + message = Regex.Replace( + message, + "ч+", + _random.Pick(new List() { "щщ", "щщщ" }) + ); + // Ч => ЩЩЩ + message = Regex.Replace( + message, + "Ч+", + _random.Pick(new List() { "ЩЩ", "ЩЩЩ" }) + ); + // Corvax-Localization-End args.Message = message; } -} \ No newline at end of file +} diff --git a/Content.Server/Speech/EntitySystems/StutteringSystem.cs b/Content.Server/Speech/EntitySystems/StutteringSystem.cs index 55c278629f3..deedaedf05d 100644 --- a/Content.Server/Speech/EntitySystems/StutteringSystem.cs +++ b/Content.Server/Speech/EntitySystems/StutteringSystem.cs @@ -25,7 +25,7 @@ public sealed class StutteringSystem : SharedStutteringSystem [Dependency] private readonly IRobustRandom _random = default!; // Regex of characters to stutter. - private static readonly Regex Stutter = new(@"[b-df-hj-np-tv-wxyz]", + private static readonly Regex Stutter = new(@"[b-df-hj-np-tv-wxyz-б-вд-к-лмн-прст]", RegexOptions.Compiled | RegexOptions.IgnoreCase); public override void Initialize() From 3a456388c55229bc508d6f44c9db6f426466612e Mon Sep 17 00:00:00 2001 From: nenado45 Date: Fri, 31 Jul 2026 14:15:50 +0500 Subject: [PATCH 2/4] Update LizardAccentSystem.cs --- Content.Server/Speech/EntitySystems/LizardAccentSystem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs index 679fd436ad5..42eaf055367 100644 --- a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs @@ -15,7 +15,7 @@ namespace Content.Server.Speech.EntitySystems; public sealed class LizardAccentSystem : EntitySystem { - [Dependency] private readonly IRobustRandom _random = default!; // Corvax-Localization + [Dependency] private readonly IRobustRandom _random = default!; // Arcane: Localization private static readonly Regex RegexLowerS = new("s+"); private static readonly Regex RegexUpperS = new("S+"); @@ -44,7 +44,7 @@ private void OnAccent(EntityUid uid, LizardAccentComponent component, AccentGetE // eckS message = RegexUpperEndX.Replace(message, "ECKS$1"); - // Corvax-Localization-Start + // Arcane-Start: Localization // c => ссс message = Regex.Replace( message, @@ -93,7 +93,7 @@ private void OnAccent(EntityUid uid, LizardAccentComponent component, AccentGetE "Ч+", _random.Pick(new List() { "ЩЩ", "ЩЩЩ" }) ); - // Corvax-Localization-End + // Arcane-End args.Message = message; } } From ebef4348aea38ff222710b970555ce8b46aa46a8 Mon Sep 17 00:00:00 2001 From: nenado45 Date: Fri, 31 Jul 2026 14:23:23 +0500 Subject: [PATCH 3/4] Update StutteringSystem.cs --- Content.Server/Speech/EntitySystems/StutteringSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Speech/EntitySystems/StutteringSystem.cs b/Content.Server/Speech/EntitySystems/StutteringSystem.cs index deedaedf05d..2adb2944c3b 100644 --- a/Content.Server/Speech/EntitySystems/StutteringSystem.cs +++ b/Content.Server/Speech/EntitySystems/StutteringSystem.cs @@ -25,7 +25,7 @@ public sealed class StutteringSystem : SharedStutteringSystem [Dependency] private readonly IRobustRandom _random = default!; // Regex of characters to stutter. - private static readonly Regex Stutter = new(@"[b-df-hj-np-tv-wxyz-б-вд-к-лмн-прст]", + private static readonly Regex Stutter = new(@"[b-df-hj-np-tv-wxyz-б-вд-к-лмн-прст]", // Arcane-Edit RegexOptions.Compiled | RegexOptions.IgnoreCase); public override void Initialize() From fa853c03f9017ec00aa7dc2f218eda97a9d0a8d8 Mon Sep 17 00:00:00 2001 From: nenado45 Date: Fri, 31 Jul 2026 14:25:21 +0500 Subject: [PATCH 4/4] Update LizardAccentSystem.cs --- Content.Server/Speech/EntitySystems/LizardAccentSystem.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs index 42eaf055367..8a1de9aadad 100644 --- a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs @@ -1,8 +1,4 @@ -// SPDX-FileCopyrightText: 2022 Alex Evgrashin -// SPDX-FileCopyrightText: 2024 Pieter-Jan Briers -// SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com> -// -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0-or-later using System.Text.RegularExpressions; using Content.Server.Speech.Components;