Fix localized text fetch

enum order matters
This commit is contained in:
Kurt
2018-11-17 09:16:57 -08:00
parent 506484e804
commit 7cfcfbbb1a
2 changed files with 4 additions and 4 deletions

View File

@@ -8,9 +8,6 @@ public enum GameFile
/// <summary> Contains the game text that is commonly re-used, not related to the storyline or general overworld content. </summary>
GameText,
/// <summary> Contains the story text that is used to tell the story via overworld events and interactions. </summary>
StoryText,
/// <summary> Localized Game Text for <see cref="GameLanguage.カタカナ"/>. </summary>
GameText0,
@@ -41,6 +38,9 @@ public enum GameFile
/// <summary> Localized Game Text for <see cref="GameLanguage.漢字簡化方案"/>. </summary>
GameText9,
/// <summary> Contains the story text that is used to tell the story via overworld events and interactions. </summary>
StoryText,
/// <summary> Localized Story Text for <see cref="GameLanguage.カタカナ"/>. </summary>
StoryText0,

View File

@@ -24,7 +24,7 @@ public class GameFileMapping
internal IFileContainer GetFile(GameFile file, int language)
{
if (file == GameFile.GameText || file == GameFile.StoryText)
file += language; // shift to localized language
file += language + 1; // shift to localized language
if (Cache.TryGetValue(file, out var container))
return container;