diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8bb28b01c..e75dfd69a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
## [Unreleased](https://github.com/rr-/Tomb1Main/compare/stable...develop)
- added Spanish localization to the config tool
+- added an option to launch Unfinished Business from the config tool (#739)
- fixed Larson's gun textures in Tomb of Qualopec to match the cutscene and Sanctuary of the Scion (#737)
- fixed texture issues in the Cowboy, Kold and Skateboard Kid models (#744)
- fixed the savegame requestor arrow's position with a large number of savegames and long level titles (#756)
diff --git a/tools/config/Tomb1Main_ConfigTool/Controls/MainWindow.xaml b/tools/config/Tomb1Main_ConfigTool/Controls/MainWindow.xaml
index 053978024..bbe2fe071 100644
--- a/tools/config/Tomb1Main_ConfigTool/Controls/MainWindow.xaml
+++ b/tools/config/Tomb1Main_ConfigTool/Controls/MainWindow.xaml
@@ -175,6 +175,7 @@
+
@@ -193,6 +194,13 @@
+
+ _launchGameCommand ??= new RelayCommand(LaunchGame);
+ get => _launchGameCommand ??= new RelayCommand(() => LaunchGame());
}
- private void LaunchGame()
+ private RelayCommand _launchUBCommand;
+ public ICommand LaunchUBCommand
+ {
+ get => _launchUBCommand ??= new RelayCommand(() => LaunchGame(Tomb1MainConstants.GoldArgs));
+ }
+
+ private void LaunchGame(string arguments = null)
{
if (!ConfirmEditorSaveState())
{
@@ -235,7 +241,7 @@ private void LaunchGame()
try
{
- ProcessUtils.Start(Tomb1MainConstants.ExecutableName);
+ ProcessUtils.Start(Path.GetFullPath(Tomb1MainConstants.ExecutableName), arguments);
}
catch (Exception e)
{
diff --git a/tools/config/Tomb1Main_ConfigTool/Models/Tomb1MainConstants.cs b/tools/config/Tomb1Main_ConfigTool/Models/Tomb1MainConstants.cs
index 837c760de..7d3b684cd 100644
--- a/tools/config/Tomb1Main_ConfigTool/Models/Tomb1MainConstants.cs
+++ b/tools/config/Tomb1Main_ConfigTool/Models/Tomb1MainConstants.cs
@@ -5,5 +5,6 @@ public static class Tomb1MainConstants
public const string ConfigFilterExtension = "|*.json5";
public const string ConfigPath = @"cfg\Tomb1Main.json5";
public const string ExecutableName = "Tomb1Main.exe";
+ public const string GoldArgs = "-gold";
public const string GitHubURL = "https://github.com/rr-/Tomb1Main";
}
\ No newline at end of file
diff --git a/tools/config/Tomb1Main_ConfigTool/Resources/Lang/en.json b/tools/config/Tomb1Main_ConfigTool/Resources/Lang/en.json
index 5d4f94a6d..7ee5ad305 100644
--- a/tools/config/Tomb1Main_ConfigTool/Resources/Lang/en.json
+++ b/tools/config/Tomb1Main_ConfigTool/Resources/Lang/en.json
@@ -7,6 +7,7 @@
"command_save": "_Save",
"command_save_as": "Save _As...",
"command_launch_game": "_Launch Game",
+ "command_launch_ub": "Launch _Unfinished Business",
"command_exit": "E_xit",
"menu_tools": "_Tools",
"command_restore": "_Restore Defaults",
diff --git a/tools/config/Tomb1Main_ConfigTool/Resources/Lang/es.json b/tools/config/Tomb1Main_ConfigTool/Resources/Lang/es.json
index 910167faf..481804868 100644
--- a/tools/config/Tomb1Main_ConfigTool/Resources/Lang/es.json
+++ b/tools/config/Tomb1Main_ConfigTool/Resources/Lang/es.json
@@ -15,6 +15,7 @@
"command_exit": "Salir",
"command_github": "_GitHub",
"command_launch_game": "_Abrir juego",
+ "command_launch_ub": "Abrir Asuntos _Pendientes",
"command_open": "_Abierto",
"command_reload": "_Recargar",
"command_restore": "_Restaurar los valores predeterminados",
diff --git a/tools/config/Tomb1Main_ConfigTool/Resources/Lang/fr.json b/tools/config/Tomb1Main_ConfigTool/Resources/Lang/fr.json
index fa198e745..0170a262e 100644
--- a/tools/config/Tomb1Main_ConfigTool/Resources/Lang/fr.json
+++ b/tools/config/Tomb1Main_ConfigTool/Resources/Lang/fr.json
@@ -7,6 +7,7 @@
"command_save": "_Sauvegarder",
"command_save_as": "Enregistrer sous...",
"command_launch_game": "_Lancer le jeu",
+ "command_launch_ub": "Lancer _Unfinished Business",
"command_exit": "_Quitter",
"menu_tools": "_Outils",
"command_restore": "_Restaurer par défaut",
diff --git a/tools/config/Tomb1Main_ConfigTool/Utils/ProcessUtils.cs b/tools/config/Tomb1Main_ConfigTool/Utils/ProcessUtils.cs
index a0a64d189..61307273e 100644
--- a/tools/config/Tomb1Main_ConfigTool/Utils/ProcessUtils.cs
+++ b/tools/config/Tomb1Main_ConfigTool/Utils/ProcessUtils.cs
@@ -1,15 +1,21 @@
-using System.Diagnostics;
+using System;
+using System.Diagnostics;
+using System.IO;
namespace Tomb1Main_ConfigTool.Utils;
public static class ProcessUtils
{
- public static void Start(string fileName)
+ public static void Start(string fileName, string arguments = null)
{
Process.Start(new ProcessStartInfo
{
FileName = fileName,
- UseShellExecute = true
+ Arguments = arguments,
+ UseShellExecute = true,
+ WorkingDirectory = new Uri(fileName).IsFile
+ ? Path.GetDirectoryName(fileName)
+ : null
});
}
}
\ No newline at end of file