load name variants
global stinx
This commit is contained in:
parent
afd850fbca
commit
1d9716b5eb
3 changed files with 12 additions and 3 deletions
|
@ -975,7 +975,12 @@ class Player {
|
|||
if(cur.Character) {
|
||||
nameToUse = cur.Arg1;
|
||||
}
|
||||
this.text.characterName(true, this.utage.charTranslations[nameToUse] || nameToUse);
|
||||
let nameFullWidth = nameToUse.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
|
||||
let nameHalfWidth = nameToUse.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
|
||||
this.text.characterName(true, this.utage.charTranslations[nameToUse]
|
||||
|| this.utage.charTranslations[nameFullWidth]
|
||||
|| this.utage.charTranslations[nameHalfWidth]
|
||||
|| nameToUse);
|
||||
this.text.dialogText(true, text);
|
||||
//restoreTint is set from a colorTo command.
|
||||
//We want to maintain the tint change from colorTo during speaking still.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue