Fix additional line break bug

This commit is contained in:
Flashfyre 2024-04-08 21:10:53 -04:00
parent 665eece2ac
commit 611d78718d
2 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,7 @@ splashMessages.push(...[
'You Do Not Start at Level 2000!', 'You Do Not Start at Level 2000!',
'Also Try Pokéngine!', 'Also Try Pokéngine!',
'Also Try Emerald Rogue!', 'Also Try Emerald Rogue!',
'Also Try Radical Red!',
'Eevee Expo!', 'Eevee Expo!',
'YNOproject!' 'YNOproject!'
]); ]);

View File

@ -54,7 +54,8 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
let lastLineCount = 1; let lastLineCount = 1;
let newText = ''; let newText = '';
for (let w = 0; w < textWords.length; w++) { for (let w = 0; w < textWords.length; w++) {
const nextWordText = `${newText} ${textWords[w]}`; const nextWordText = newText ? `${newText} ${textWords[w]}` : textWords[w];
if (textWords[w].includes('\n')) { if (textWords[w].includes('\n')) {
newText = nextWordText; newText = nextWordText;
lastLineCount++; lastLineCount++;
@ -68,7 +69,7 @@ export default abstract class MessageUiHandler extends AwaitableUiHandler {
} }
} }
text = newText.trimStart(); text = newText;
} }
if (this.textTimer) { if (this.textTimer) {