Resolve all non-obsoleting warnings in content (#27934)

* Resolve all non-obsoleting warnings in content

* Update ClientGameTicker.cs

* Update SkeletonAccentSystem.cs

* Update BwoinkSystem.cs
This commit is contained in:
Kara
2024-05-11 20:13:58 -07:00
committed by GitHub
parent cf148288a0
commit 1596e04d0f
35 changed files with 32 additions and 70 deletions

View File

@@ -4,10 +4,13 @@ using Robust.Shared.Random;
namespace Content.Server.Speech.EntitySystems;
public sealed class SkeletonAccentSystem : EntitySystem
public sealed partial class SkeletonAccentSystem : EntitySystem
{
[Dependency] private readonly IRobustRandom _random = default!;
[GeneratedRegex(@"(?<!\w)[^aeiou]one", RegexOptions.IgnoreCase, "en-US")]
private static partial Regex BoneRegex();
private static readonly Dictionary<string, string> DirectReplacements = new()
{
{ "fuck you", "I've got a BONE to pick with you" },
@@ -45,7 +48,7 @@ public sealed class SkeletonAccentSystem : EntitySystem
// Character manipulations:
// At the start of words, any non-vowel + "one" becomes "bone", e.g. tone -> bone ; lonely -> bonely; clone -> clone (remains unchanged).
msg = Regex.Replace(msg, @"(?<!\w)[^aeiou]one", "bone", RegexOptions.IgnoreCase);
msg = BoneRegex().Replace(msg, "bone");
// Direct word/phrase replacements:
foreach (var (first, replace) in DirectReplacements)