Skip to content

Commit

Permalink
Load replacement table on archive load for ScriptDialogueEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
thesupersonic16 committed Sep 9, 2024
1 parent 622e0d6 commit a9bfdf4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DALTools/ScriptDialogueEditor/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ private void LoadButton_Click(object sender, RoutedEventArgs e)
ScriptArchive.Load(App.ScriptPath = ofd.FileName, true);
ScriptArchive.Preload();

// Load replacement table
string replacementTablePath = Path.Combine(Path.GetDirectoryName(App.ScriptPath), "replace.ini");
if (File.Exists(replacementTablePath))
App.StringProcess.Load(File.ReadAllText(replacementTablePath, Encoding.UTF8));

// Load script from config or use default
string fileName = !string.IsNullOrEmpty(Config.LastOpenedScript) && ScriptArchive.FileEntries.Any(t =>
t.FileName.ToLowerInvariant() == Config.LastOpenedScript.ToLowerInvariant())
Expand Down

0 comments on commit a9bfdf4

Please sign in to comment.