Use setLevelDirError for level not found & parse errors

This exports the previously-internal setLevelDirError function in
FileSystemUtils and uses it for if a level is not found or there was a
parsing error. Previously, if a level failed to load in these ways, it
would take you to the error screen with no error, while printing it to
the console. But this makes it more user-friendly.

As a bonus, the text is localizable, just like the existing usage of
FILESYSTEM_setLevelDirError for if a path couldn't be mounted.
This commit is contained in:
Misa
2023-05-17 10:09:59 -07:00
parent a5eb361448
commit 9387186083
15 changed files with 38 additions and 4 deletions

View File

@@ -759,6 +759,8 @@ Encontraste o laboratório secreto!" explanation="" max="34*4"/>
<string english="MASTER OF THE UNIVERSE" translation="MESTRE DO UNIVERSO" explanation="achievement/trophy title - no death mode complete" max="38*2"/>
<string english="Complete the game in no death mode" translation="Conclui o jogo em Imortal." explanation="achievement/trophy description" max="38*2"/>
<string english="Could not mount {path}: real directory doesn&apos;t exist" translation="Não foi possível montar {path}: o diretório não existe" explanation="mount: link/attach a directory (folder) in the filesystem into the game&apos;s filesystem so we can access it" max="38*6"/>
<string english="Level {path} not found" translation="" explanation="" max="38*6"/>
<string english="Error parsing {path}: {error}" translation="" explanation="we tried to parse the level file, but failed" max="38*6"/>
<string english="ERROR: Could not write to language folder! Make sure there is no &quot;lang&quot; folder next to the regular saves." translation="ERRO: Não foi possível escrever na pasta de idioma! Certifica-te de que não há uma pasta &apos;&apos;lang&apos;&apos; junto dos dados guardados." explanation="" max="38*5"/>
<string english="" translation="" explanation=""/>
<string english="" translation="" explanation=""/>