[tweak] accent adaptation

This commit is contained in:
rhailrake
2023-04-23 18:30:37 +06:00
committed by Remuchi
parent 423c3db243
commit c4f378b4a8
6 changed files with 88 additions and 11 deletions

View File

@@ -8,12 +8,17 @@ namespace Content.Server.Speech.EntitySystems
[Dependency] private readonly IRobustRandom _random = default!;
private static readonly IReadOnlyList<string> Faces = new List<string>{
" (・`ω´・)", " ;;w;;", " owo", " UwU", " >w<", " ^w^"
//WD-EDIT
" (`ω´)", " ;;w;;", " owo", " UwU", " >w<", " ^w^"
//WD-EDIT
}.AsReadOnly();
private static readonly IReadOnlyDictionary<string, string> SpecialWords = new Dictionary<string, string>()
{
{ "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)