diff --git a/Content.Server/Speech/EntitySystems/BarkAccentSystem.cs b/Content.Server/Speech/EntitySystems/BarkAccentSystem.cs index a6e5b68ffc8..3b9098e1692 100644 --- a/Content.Server/Speech/EntitySystems/BarkAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/BarkAccentSystem.cs @@ -8,7 +8,7 @@ public sealed class BarkAccentSystem : EntitySystem [Dependency] private readonly IRobustRandom _random = default!; private static readonly IReadOnlyList Barks = new List{ - " Woof!", " WOOF", " wof-wof" + " Гав!", " ГАВ", " вуф-вуф" // Corvax-Localization }.AsReadOnly(); private static readonly IReadOnlyDictionary SpecialWords = new Dictionary() @@ -17,6 +17,12 @@ public sealed class BarkAccentSystem : EntitySystem { "Ah", "Arf" }, { "oh", "oof" }, { "Oh", "Oof" }, + //Corvax-Localization-Start + { "га", "гаф" }, + { "Га", "Гаф" }, + { "угу", "вуф" }, + { "Угу", "Вуф" }, + //Corvax-Localization-End }; public override void Initialize() @@ -33,6 +39,9 @@ public string Accentuate(string message) return message.Replace("!", _random.Pick(Barks)) .Replace("l", "r").Replace("L", "R"); + //Corvax-Localization-Start + .Replace("л", "р").Replace("Л", "Р"); + //Corvax-Localization-End } private void OnAccent(EntityUid uid, BarkAccentComponent component, AccentGetEvent args) diff --git a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs index a7e21016a2d..58ba2ca64f1 100644 --- a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs @@ -1,10 +1,12 @@ using System.Text.RegularExpressions; using Content.Server.Speech.Components; +using Robust.Shared.Random; namespace Content.Server.Speech.EntitySystems; public sealed class LizardAccentSystem : EntitySystem { + [Dependency] private readonly IRobustRandom _random = default!; // Corvax-Localization public override void Initialize() { base.Initialize(); @@ -26,6 +28,57 @@ private void OnAccent(EntityUid uid, LizardAccentComponent component, AccentGetE // eckS message = Regex.Replace(message, @"\bX([\-|r|R]|\b)", "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; } } diff --git a/Content.Server/Speech/EntitySystems/MobsterAccentSystem.cs b/Content.Server/Speech/EntitySystems/MobsterAccentSystem.cs index dfc3ab7e124..4229bbe3d1e 100644 --- a/Content.Server/Speech/EntitySystems/MobsterAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/MobsterAccentSystem.cs @@ -12,6 +12,35 @@ public sealed class MobsterAccentSystem : EntitySystem private static readonly Dictionary DirectReplacements = new() { + // Corvax-Localization-Start + { "утащил", "сдёрнул" }, + { "принеси", "надыбай" }, + { "принесите", "надыбайте" }, + { "сб", "мусора" }, + { "враг", "шелупонь" }, + { "враги", "шелупонь" }, + { "тревога", "шухер" }, + { "заметили", "спалили" }, + { "оружие", "валына" }, + { "убийство", "мокруха" }, + { "убить", "замочить" }, + { "убей", "вальни" }, + { "убейте", "завалите" }, + { "еда", "жратва"}, + { "еды", "жратвы"}, + { "убили", "замаслили" }, + { "ранен", "словил маслину"}, + { "мертв", "спит с рыбами"}, + { "мёртв", "спит с рыбами"}, + { "мертва", "спит с рыбами"}, + { "хэй", "йоу" }, + { "хей", "йоу" }, + { "здесь", "здеся" }, + { "тут", "тута" }, + { "привет", "аве" }, + { "плохо", "ацтой" }, + { "хорошо", "агонь" }, + // Corvax-Localization-End { "let me", "lemme" }, { "should", "oughta" }, { "the", "da" }, diff --git a/Content.Server/Speech/EntitySystems/MothAccentSystem.cs b/Content.Server/Speech/EntitySystems/MothAccentSystem.cs index 3de4651b4af..222d9021e9d 100644 --- a/Content.Server/Speech/EntitySystems/MothAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/MothAccentSystem.cs @@ -1,10 +1,12 @@ using System.Text.RegularExpressions; using Content.Server.Speech.Components; +using Robust.Shared.Random; namespace Content.Server.Speech.EntitySystems; public sealed class MothAccentSystem : EntitySystem { + [Dependency] private readonly IRobustRandom _random = default!; // Corvax-Localization public override void Initialize() { base.Initialize(); @@ -19,6 +21,33 @@ private void OnAccent(EntityUid uid, MothAccentComponent component, AccentGetEve message = Regex.Replace(message, "z{1,3}", "zzz"); // buZZZ message = Regex.Replace(message, "Z{1,3}", "ZZZ"); + + // Corvax-Localization-Start + // ж => жжж + message = Regex.Replace( + message, + "ж+", + _random.Pick(new List() { "жж", "жжж" }) + ); + // Ж => ЖЖЖ + 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() { "ЗЗ", "ЗЗЗ" }) + ); + // Corvax-Localization-End args.Message = message; } diff --git a/Content.Server/Speech/EntitySystems/OwOAccentSystem.cs b/Content.Server/Speech/EntitySystems/OwOAccentSystem.cs index cac3debe819..906da0713e5 100644 --- a/Content.Server/Speech/EntitySystems/OwOAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/OwOAccentSystem.cs @@ -29,6 +29,10 @@ public string Accentuate(string message) } return message.Replace("!", _random.Pick(Faces)) + // Corvax-Localization-Start + .Replace("р", "в").Replace("Р", "В") + .Replace("л", "в").Replace("Л", "В") + // Corvax-Localization-End .Replace("r", "w").Replace("R", "W") .Replace("l", "w").Replace("L", "W"); }