Archaic Accent fixes (#17897)

* added accent changes

* added changes for the words "ok, k, okay"

* fix prefixes and the 'd

* add more words

* fix some and add more words

* fix more and add more
This commit is contained in:
Ubaser
2023-07-08 18:34:11 +10:00
committed by GitHub
parent 0af38e6d65
commit 993086df20
3 changed files with 727 additions and 224 deletions

View File

@@ -22,20 +22,6 @@ public sealed class ArchaicAccentSystem : EntitySystem
var msg = message;
msg = _replacement.ApplyReplacements(msg, "archaic");
// Changes words like "Looked" to "Look'd"
msg = Regex.Replace(msg, "ed", "'d");
// "LOOKED" to "LOOK'D"
msg = Regex.Replace(msg, "ED", "'D");
if (!_random.Prob(component.ForsoothChance))
return msg;
var pick = _random.Pick(component.ArchaicWords);
// Reverse sanitize capital
msg = msg[0].ToString().ToLower() + msg.Remove(0, 1);
msg = Loc.GetString(pick) + " " + msg;
return msg;
}