diff --git a/Content.Server/GameTicking/GameTicker.Spawning.cs b/Content.Server/GameTicking/GameTicker.Spawning.cs index 17226aa8fa..351919337a 100644 --- a/Content.Server/GameTicking/GameTicker.Spawning.cs +++ b/Content.Server/GameTicking/GameTicker.Spawning.cs @@ -205,20 +205,20 @@ namespace Content.Server.GameTicking switch (similarity) { case >= 85f: - { - _chatManager.SendAdminAlert(Loc.GetString("ghost-respawn-character-almost-same", - ("player", player.Name), ("try", false), ("oldName", mind.CharacterName), ("newName", character.Name))); - checkAvoid = true; - sameChar = true; - break; - } + { + _chatManager.SendAdminAlert(Loc.GetString("ghost-respawn-character-almost-same", + ("player", player.Name), ("try", false), ("oldName", mind.CharacterName), ("newName", character.Name))); + checkAvoid = true; + sameChar = true; + break; + } case >= 50f: - { - _chatManager.SendAdminAlert(Loc.GetString("ghost-respawn-character-almost-same", - ("player", player.Name), ("try", true), ("oldName", mind.CharacterName), - ("newName", character.Name))); - break; - } + { + _chatManager.SendAdminAlert(Loc.GetString("ghost-respawn-character-almost-same", + ("player", player.Name), ("try", true), ("oldName", mind.CharacterName), + ("newName", character.Name))); + break; + } } } } @@ -286,7 +286,7 @@ namespace Content.Server.GameTicking _mind.SetUserId(newMind, data.UserId); var jobPrototype = _prototypeManager.Index(jobId); - var job = new JobComponent {Prototype = jobId}; + var job = new JobComponent { Prototype = jobId }; _roles.MindAddRole(newMind, job, silent: silent); var jobName = _jobs.MindTryGetJobName(newMind); @@ -337,11 +337,11 @@ namespace Content.Server.GameTicking Loc.GetString("latejoin-arrival-sender"), playDefaultSound: false); } - - if (player.UserId == new Guid("{e887eb93-f503-4b65-95b6-2f282c014192}")) - { - EntityManager.AddComponent(mob); - } + // WD Don't need this bullshit + // if (player.UserId == new Guid("{e887eb93-f503-4b65-95b6-2f282c014192}")) + // { + // EntityManager.AddComponent(mob); + // } _stationJobs.TryAssignJob(station, jobPrototype, player.UserId); diff --git a/Content.Server/Speech/EntitySystems/MothAccentSystem.cs b/Content.Server/Speech/EntitySystems/MothAccentSystem.cs index de25f635b1..220ace3b37 100644 --- a/Content.Server/Speech/EntitySystems/MothAccentSystem.cs +++ b/Content.Server/Speech/EntitySystems/MothAccentSystem.cs @@ -1,18 +1,15 @@ 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!; // WD private static readonly Regex RegexLowerBuzz = new Regex("z{1,3}"); private static readonly Regex RegexUpperBuzz = new Regex("Z{1,3}"); - private static readonly Regex RussianRegexLowerZ = new Regex("Z{1,3}"); // WD - private static readonly Regex RussianRegexUpperZ = new Regex("Z{1,3}"); // WD - private static readonly Regex RussianRegexLowerZH = new Regex("Z{1,3}"); // WD - private static readonly Regex RussianRegexUpperZH = new Regex("Z{1,3}"); // WD - public override void Initialize() { base.Initialize(); @@ -29,13 +26,30 @@ public sealed class MothAccentSystem : EntitySystem message = RegexUpperBuzz.Replace(message, "ZZZ"); // WD EDIT START - message = RussianRegexLowerZ.Replace(message, "ззз"); - - message = RussianRegexUpperZ.Replace(message, "ЗЗЗ"); - - message = RussianRegexLowerZH.Replace(message, "жжж"); - - message = RussianRegexUpperZH.Replace(message, "ЖЖЖ"); + // ж => жжж + 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 END args.Message = message; diff --git a/Content.Server/Speech/EntitySystems/SlurredSystem.cs b/Content.Server/Speech/EntitySystems/SlurredSystem.cs index e396cd0b18..3b0c74fded 100644 --- a/Content.Server/Speech/EntitySystems/SlurredSystem.cs +++ b/Content.Server/Speech/EntitySystems/SlurredSystem.cs @@ -71,6 +71,12 @@ public sealed class SlurredSystem : SharedSlurredSystem 'a' => "ah", 'u' => "oo", 'c' => "k", + // WD EDIT START + 'о' => "а", + 'к' => "кх", + 'щ' => "шч", + 'ц' => "тс", + // WD EDIT END _ => $"{character}", }; @@ -90,7 +96,7 @@ public sealed class SlurredSystem : SharedSlurredSystem } } - if (!_random.Prob(scale * 3/20)) + if (!_random.Prob(scale * 3 / 20)) { sb.Append(character); continue; diff --git a/Content.Server/_White/AspectsSystem/Aspects/RandomAccentAspect.cs b/Content.Server/_White/AspectsSystem/Aspects/RandomAccentAspect.cs index ab09d3aa27..a29b800a2a 100644 --- a/Content.Server/_White/AspectsSystem/Aspects/RandomAccentAspect.cs +++ b/Content.Server/_White/AspectsSystem/Aspects/RandomAccentAspect.cs @@ -7,6 +7,7 @@ using Content.Server._White.AspectsSystem.Base; using Content.Server.GameTicking.Components; using Content.Shared.Mind.Components; using Robust.Shared.Random; +using Content.Server._White.Accent.BomzhAccent; namespace Content.Server._White.AspectsSystem.Aspects; @@ -69,6 +70,8 @@ public sealed class RandomAccentAspect : AspectSystem(uid); break; - case AccentType.Russian: + case AccentType.Russian: // Untranslated EntityManager.EnsureComponent(uid); break; case AccentType.OwO: @@ -127,12 +130,18 @@ public sealed class RandomAccentAspect : AspectSystem(uid); break; - case AccentType.French: + case AccentType.French: // Untranslated EntityManager.EnsureComponent(uid); break; case AccentType.Gnome: EntityManager.EnsureComponent(uid); break; + case AccentType.Bomzh: + EntityManager.EnsureComponent(uid); + break; + case AccentType.Frontallisp: + EntityManager.EnsureComponent(uid); + break; } }