diff --git a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs index a7e21016a2..41b0797a79 100644 --- a/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/LizardAccentSystem.cs @@ -1,10 +1,13 @@ 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!; + public override void Initialize() { base.Initialize(); @@ -26,6 +29,60 @@ public sealed class LizardAccentSystem : EntitySystem // eckS message = Regex.Replace(message, @"\bX([\-|r|R]|\b)", "ECKS$1"); + + //WD-EDIT + + // 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() { "Щщ", "Щщщ" }) + ); + + //WD-EDIT + args.Message = message; } } diff --git a/Content.Server/Speech/EntitySystems/MonkeyAccentSystem.cs b/Content.Server/Speech/EntitySystems/MonkeyAccentSystem.cs index f2813d8245..26a07931a5 100644 --- a/Content.Server/Speech/EntitySystems/MonkeyAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/MonkeyAccentSystem.cs @@ -28,23 +28,23 @@ public sealed class MonkeyAccentSystem : EntitySystem { foreach (var _ in word) { - accentedMessage.Append('O'); + accentedMessage.Append('У'); //WD-EDIT } if (_random.NextDouble() >= 0.3) - accentedMessage.Append('K'); + accentedMessage.Append('К'); //WD-EDIT } else - accentedMessage.Append('O'); + accentedMessage.Append('У'); //WD-EDIT } else { foreach (var _ in word) { if (_random.NextDouble() >= 0.8) - accentedMessage.Append('H'); + accentedMessage.Append('Г'); //WD-EDIT else - accentedMessage.Append('A'); + accentedMessage.Append('А'); //WD-EDIT } } diff --git a/Content.Server/Speech/EntitySystems/OwOAccentSystem.cs b/Content.Server/Speech/EntitySystems/OwOAccentSystem.cs index cac3debe81..b9f0e4ba33 100644 --- a/Content.Server/Speech/EntitySystems/OwOAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/OwOAccentSystem.cs @@ -8,12 +8,17 @@ namespace Content.Server.Speech.EntitySystems [Dependency] private readonly IRobustRandom _random = default!; private static readonly IReadOnlyList Faces = new List{ - " (・`ω´・)", " ;;w;;", " owo", " UwU", " >w<", " ^w^" + //WD-EDIT + " (`ω´)", " ;;w;;", " owo", " UwU", " >w<", " ^w^" + //WD-EDIT }.AsReadOnly(); private static readonly IReadOnlyDictionary SpecialWords = new Dictionary() { { "you", "wu" }, + //WD-EDIT + { "ты", "ти" } + //WD-EDIT }; public override void Initialize() @@ -30,7 +35,12 @@ namespace Content.Server.Speech.EntitySystems return message.Replace("!", _random.Pick(Faces)) .Replace("r", "w").Replace("R", "W") - .Replace("l", "w").Replace("L", "W"); + .Replace("l", "w").Replace("L", "W") + + //WD-EDIT + .Replace("р", "в").Replace("Р", "В") + .Replace("л", "в").Replace("Л", "В"); + //WD-EDIT } private void OnAccent(EntityUid uid, OwOAccentComponent component, AccentGetEvent args) diff --git a/Content.Server/Speech/EntitySystems/StutteringSystem.cs b/Content.Server/Speech/EntitySystems/StutteringSystem.cs index d6e3c0b749..16c313e96d 100644 --- a/Content.Server/Speech/EntitySystems/StutteringSystem.cs +++ b/Content.Server/Speech/EntitySystems/StutteringSystem.cs @@ -13,7 +13,7 @@ namespace Content.Server.Speech.EntitySystems [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-б-вд-к-лмн-прст]", // WD-EDIT RegexOptions.Compiled | RegexOptions.IgnoreCase); public override void Initialize() diff --git a/Content.Server/StationRecords/Systems/GeneralStationRecordConsoleSystem.cs b/Content.Server/StationRecords/Systems/GeneralStationRecordConsoleSystem.cs index f69caaa9a7..fb79018692 100644 --- a/Content.Server/StationRecords/Systems/GeneralStationRecordConsoleSystem.cs +++ b/Content.Server/StationRecords/Systems/GeneralStationRecordConsoleSystem.cs @@ -78,17 +78,17 @@ public sealed class GeneralStationRecordConsoleSystem : EntitySystem if (listing.Count == 0) { - GeneralStationRecordConsoleState state = new(null, null, null, console.Filter); + GeneralStationRecordConsoleState state = new(null, null, null, console!.Filter); SetStateForInterface(uid, state); return; } else if (listing.Count == 1) { - console.ActiveKey = listing.Keys.First(); + console!.ActiveKey = listing.Keys.First(); } GeneralStationRecord? record = null; - if (console.ActiveKey != null) + if (console!.ActiveKey != null) { _stationRecordsSystem.TryGetRecord(owningStation.Value, _stationRecordsSystem.Convert(console.ActiveKey.Value), out record, stationRecordsComponent); diff --git a/Content.Shared/Localizations/ContentLocalizationManager.cs b/Content.Shared/Localizations/ContentLocalizationManager.cs index 943c37b097..b3d8643e14 100644 --- a/Content.Shared/Localizations/ContentLocalizationManager.cs +++ b/Content.Shared/Localizations/ContentLocalizationManager.cs @@ -10,7 +10,11 @@ namespace Content.Shared.Localizations [Dependency] private readonly ILocalizationManager _loc = default!; // If you want to change your codebase's language, do it here. + + // WD-EDIT private const string Culture = "ru-RU"; + + // WD-EDIT private const string FallbackCulture = "en-US"; /// @@ -27,12 +31,18 @@ namespace Content.Shared.Localizations public void Initialize() { var culture = new CultureInfo(Culture); + + // WD-EDIT var fallbackCulture = new CultureInfo(FallbackCulture); _loc.LoadCulture(culture); + + // WD-EDIT _loc.LoadCulture(fallbackCulture); _loc.SetFallbackCluture(fallbackCulture); + // WD-EDIT + _loc.AddFunction(culture, "PRESSURE", FormatPressure); _loc.AddFunction(culture, "POWERWATTS", FormatPowerWatts); _loc.AddFunction(culture, "POWERJOULES", FormatPowerJoules);