Correct mobster suffix (#33240)

Correct mob grammar
This commit is contained in:
Preston Smith
2025-04-18 19:33:14 -05:00
committed by GitHub
parent f23851a30d
commit cfda91e0f0

View File

@@ -14,7 +14,7 @@ public sealed class MobsterAccentSystem : EntitySystem
private static readonly Regex RegexUpperAr = new(@"(?<=\w)A[Rr](?=\w)");
private static readonly Regex RegexFirstWord = new(@"^(\S+)");
private static readonly Regex RegexLastWord = new(@"(\S+)$");
private static readonly Regex RegexLastPunctuation = new(@"([.!?]+$)(?!.*[.!?])|(?<![.!?])$");
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ReplacementAccentSystem _replacement = default!;
@@ -84,7 +84,7 @@ public sealed class MobsterAccentSystem : EntitySystem
}
if (lastWordAllCaps)
suffix = suffix.ToUpper();
msg += suffix;
msg = RegexLastPunctuation.Replace(msg, suffix);
}
return msg;