Fix player not falling back to utage text if translation file didnt exist at all.
This commit is contained in:
parent
9ca07cca3b
commit
e098d27964
10
Js/Player.js
10
Js/Player.js
@ -585,13 +585,13 @@ class Player {
|
|||||||
this.lerpTargets.push({type: 'alpha', object: sprite, curTime: 0, time: 300, finalV: 1, initV: 0});
|
this.lerpTargets.push({type: 'alpha', object: sprite, curTime: 0, time: 300, finalV: 1, initV: 0});
|
||||||
this.lerpTargets.push({type: 'alpha', object: sprite, curTime: -(this.waitTime+500), time: 300, finalV: 0, initV: 1, post: "destroy"});
|
this.lerpTargets.push({type: 'alpha', object: sprite, curTime: -(this.waitTime+500), time: 300, finalV: 0, initV: 1, post: "destroy"});
|
||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text;
|
let text = cur.English ? (utage.translations ? (utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
|
||||||
this.text.titleText(true, text);
|
this.text.titleText(true, text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "divaeffect": {
|
case "divaeffect": {
|
||||||
this.waitTime = Number(cur.Arg5) * 1000;
|
this.waitTime = Number(cur.Arg5) * 1000;
|
||||||
let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text;
|
let text = cur.English ? (utage.translations ? (utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
|
||||||
this.text.divaText(true, text);
|
this.text.divaText(true, text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1197,8 +1197,8 @@ class Player {
|
|||||||
this.audio.stopSound(this.playingVoice);
|
this.audio.stopSound(this.playingVoice);
|
||||||
}
|
}
|
||||||
if(!cur.Command && cur.Arg1 && cur.Text) {
|
if(!cur.Command && cur.Arg1 && cur.Text) {
|
||||||
//If its chracter off screen text
|
//If its character off screen text
|
||||||
let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text;
|
let text = cur.English ? (utage.translations ? (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, utage.charTranslations[cur.Arg1] || cur.Arg1);
|
this.text.characterName(true, utage.charTranslations[cur.Arg1] || cur.Arg1);
|
||||||
@ -1236,7 +1236,7 @@ class Player {
|
|||||||
this.manualNext = true;
|
this.manualNext = true;
|
||||||
//Sometimes they don't give a Arg1 for the text.
|
//Sometimes they don't give a Arg1 for the text.
|
||||||
} else if(!cur.Command && cur.Arg2.toLowerCase() === "<off>" && cur.Text) {
|
} else if(!cur.Command && cur.Arg2.toLowerCase() === "<off>" && cur.Text) {
|
||||||
let text = cur.English ? (utage.translations[cur.English] || cur.Text) : cur.Text;
|
let text = cur.English ? (utage.translations ? (utage.translations[cur.English] || cur.Text) : cur.Text) : cur.Text;
|
||||||
this.text.characterName(true, "");
|
this.text.characterName(true, "");
|
||||||
this.text.dialogText(true, commonFunctions.convertUtageTextTags(text));
|
this.text.dialogText(true, commonFunctions.convertUtageTextTags(text));
|
||||||
this.manualNext = true;
|
this.manualNext = true;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 533c48371ed01ed7265b6b5f052d1b2c3fce940f
|
Subproject commit dc15df970a33c34dd53654fb77ce775ee9e3f051
|
Loading…
x
Reference in New Issue
Block a user