Compare commits
1 Commits
1d9716b5eb
...
d6ac86ed8c
Author | SHA1 | Date | |
---|---|---|---|
d6ac86ed8c |
14
Js/Player.js
14
Js/Player.js
@ -960,7 +960,12 @@ class Player {
|
|||||||
let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
|
let text = cur.English ? (this.utage.translations ? (this.utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
|
||||||
text = commonFunctions.convertUtageTextTags(text);
|
text = commonFunctions.convertUtageTextTags(text);
|
||||||
if(cur.Arg2 && cur.Arg2.toLowerCase() === "<off>") {
|
if(cur.Arg2 && cur.Arg2.toLowerCase() === "<off>") {
|
||||||
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
|
let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
|
||||||
|
let nameHalfWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
|
||||||
|
this.text.characterName(true, this.utage.charTranslations[cur.Arg1]
|
||||||
|
|| this.utage.charTranslations[nameFullWidth]
|
||||||
|
|| this.utage.charTranslations[nameHalfWidth]
|
||||||
|
|| cur.Arg1);
|
||||||
this.text.dialogText(true, commonFunctions.convertUtageTextTags(text));
|
this.text.dialogText(true, commonFunctions.convertUtageTextTags(text));
|
||||||
} else {
|
} else {
|
||||||
let found = false;
|
let found = false;
|
||||||
@ -1018,7 +1023,12 @@ class Player {
|
|||||||
}
|
}
|
||||||
//If we didnt find the character just dump the text anyways with Arg1 as the name
|
//If we didnt find the character just dump the text anyways with Arg1 as the name
|
||||||
if(!found) {
|
if(!found) {
|
||||||
this.text.characterName(true, this.utage.charTranslations[cur.Arg1] || cur.Arg1);
|
let nameFullWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) + 0xFEE0);});
|
||||||
|
let nameHalfWidth = cur.Arg1.replace(/[A-Za-z0-9]/g, function(s) {return String.fromCharCode(s.charCodeAt(0) - 0xFEE0)});
|
||||||
|
this.text.characterName(true, this.utage.charTranslations[cur.Arg1]
|
||||||
|
|| this.utage.charTranslations[nameFullWidth]
|
||||||
|
|| this.utage.charTranslations[nameHalfWidth]
|
||||||
|
|| cur.Arg1);
|
||||||
this.text.dialogText(true, text);
|
this.text.dialogText(true, text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user