Fix ScrambledAccent (#13923)
This commit is contained in:
@@ -25,15 +25,15 @@ namespace Content.Server.Speech.EntitySystems
|
|||||||
return Loc.GetString($"accent-scrambled-words-{pick}");
|
return Loc.GetString($"accent-scrambled-words-{pick}");
|
||||||
}
|
}
|
||||||
|
|
||||||
//Scramble the words
|
// Scramble the words
|
||||||
var scrambled = words.OrderBy(x => _random.Next()).ToArray();
|
var scrambled = words.OrderBy(x => _random.Next()).ToArray();
|
||||||
|
|
||||||
var msg = String.Join(" ", scrambled);
|
var msg = string.Join(" ", scrambled);
|
||||||
|
|
||||||
//First letter should be capital
|
// First letter should be capital
|
||||||
msg = msg[0].ToString().ToUpper() + msg.Remove(0, 1);
|
msg = msg[0].ToString().ToUpper() + msg.Remove(0, 1);
|
||||||
|
|
||||||
//Capitalize lone i's
|
// Capitalize lone i's
|
||||||
msg = Regex.Replace(msg, @"(?<=\ )i(?=[\ \.\?]|$)", "I");
|
msg = Regex.Replace(msg, @"(?<=\ )i(?=[\ \.\?]|$)", "I");
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
accent-scrambled-words-1 = Who?,
|
accent-scrambled-words-1 = Who?
|
||||||
accent-scrambled-words-2 = What?,
|
accent-scrambled-words-2 = What?
|
||||||
accent-scrambled-words-3 = When?,
|
accent-scrambled-words-3 = When?
|
||||||
accent-scrambled-words-4 = Where?,
|
accent-scrambled-words-4 = Where?
|
||||||
accent-scrambled-words-5 = Why!,
|
accent-scrambled-words-5 = Why?
|
||||||
accent-scrambled-words-6 = How?,
|
accent-scrambled-words-6 = How?
|
||||||
accent-scrambled-words-7 = Me!,
|
accent-scrambled-words-7 = Me!
|
||||||
|
|||||||
Reference in New Issue
Block a user