diff --git a/src/HUDMerger/Commands/MergeCommand.cs b/src/HUDMerger/Commands/MergeCommand.cs index e83327d..95ded99 100644 --- a/src/HUDMerger/Commands/MergeCommand.cs +++ b/src/HUDMerger/Commands/MergeCommand.cs @@ -44,7 +44,7 @@ static bool PathContainsPath(string parentDir, string subDir) return !relativeDirectory.StartsWith("..") && !Path.IsPathRooted(relativeDirectory); } - if (PathContainsPath(Path.Join(Properties.Settings.Default.Team_Fortress_2_Folder, "tf\\custom"), _mainWindowViewModel.TargetHUD!.FolderPath) && Process.GetProcessesByName("hl2").Length != 0) + if (PathContainsPath(Path.Join(Properties.Settings.Default.TeamFortress2Folder, "tf\\custom"), _mainWindowViewModel.TargetHUD!.FolderPath) && Process.GetProcessesByName("hl2").Length != 0) { MessageBox.Show("HL2 process open, cannot merge!", "HL2 Open Error", MessageBoxButton.OK, MessageBoxImage.Error); return; diff --git a/src/HUDMerger/Properties/Settings.Designer.cs b/src/HUDMerger/Properties/Settings.Designer.cs index c148ef5..81b2b96 100644 --- a/src/HUDMerger/Properties/Settings.Designer.cs +++ b/src/HUDMerger/Properties/Settings.Designer.cs @@ -26,12 +26,12 @@ public static Settings Default { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Team Fortress 2")] - public string Team_Fortress_2_Folder { + public string TeamFortress2Folder { get { - return ((string)(this["Team_Fortress_2_Folder"])); + return ((string)(this["TeamFortress2Folder"])); } set { - this["Team_Fortress_2_Folder"] = value; + this["TeamFortress2Folder"] = value; } } } diff --git a/src/HUDMerger/Properties/Settings.settings b/src/HUDMerger/Properties/Settings.settings index 8b0cf58..88a0882 100644 --- a/src/HUDMerger/Properties/Settings.settings +++ b/src/HUDMerger/Properties/Settings.settings @@ -2,7 +2,7 @@ - + C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2 diff --git a/src/HUDMerger/Services/HUDFileReaderService.cs b/src/HUDMerger/Services/HUDFileReaderService.cs index ba8c418..9712d31 100644 --- a/src/HUDMerger/Services/HUDFileReaderService.cs +++ b/src/HUDMerger/Services/HUDFileReaderService.cs @@ -22,8 +22,8 @@ public enum FileType : byte public partial class HUDFileReaderService { - private readonly Lazy TF2MiscDirVPK = new(() => new(Path.Join(Properties.Settings.Default.Team_Fortress_2_Folder, "tf\\tf2_misc_dir.vpk"))); - private readonly Lazy PlatformMiscDirVPK = new(() => new(Path.Join(Properties.Settings.Default.Team_Fortress_2_Folder, "platform\\platform_misc_dir.vpk"))); + private readonly Lazy TF2MiscDirVPK = new(() => new(Path.Join(Properties.Settings.Default.TeamFortress2Folder, "tf\\tf2_misc_dir.vpk"))); + private readonly Lazy PlatformMiscDirVPK = new(() => new(Path.Join(Properties.Settings.Default.TeamFortress2Folder, "platform\\platform_misc_dir.vpk"))); private readonly Dictionary Files = []; @@ -64,13 +64,13 @@ void Add(HUD hud, string relativePath, FileType type) return Encoding.UTF8.GetString(PlatformMiscDirVPK.Value.Read(relativePath)); } - string tfPath = Path.Join(Properties.Settings.Default.Team_Fortress_2_Folder, "tf", relativePath); + string tfPath = Path.Join(Properties.Settings.Default.TeamFortress2Folder, "tf", relativePath); if (File.Exists(tfPath)) { return File.ReadAllText(tfPath); } - string hl2Path = Path.Join(Properties.Settings.Default.Team_Fortress_2_Folder, "hl2", relativePath); + string hl2Path = Path.Join(Properties.Settings.Default.TeamFortress2Folder, "hl2", relativePath); if (File.Exists(hl2Path)) { return File.ReadAllText(hl2Path); diff --git a/src/HUDMerger/SettingsWindow.xaml b/src/HUDMerger/SettingsWindow.xaml index 69261a1..4a6f892 100644 --- a/src/HUDMerger/SettingsWindow.xaml +++ b/src/HUDMerger/SettingsWindow.xaml @@ -22,7 +22,7 @@ diff --git a/src/HUDMerger/ViewModels/MainWindowViewModel.cs b/src/HUDMerger/ViewModels/MainWindowViewModel.cs index 831eb54..cd0392e 100644 --- a/src/HUDMerger/ViewModels/MainWindowViewModel.cs +++ b/src/HUDMerger/ViewModels/MainWindowViewModel.cs @@ -15,7 +15,7 @@ public class MainWindowViewModel : ViewModelBase { private static readonly OpenFolderDialog OpenFolderDialog = new() { - InitialDirectory = Path.Join(Properties.Settings.Default.Team_Fortress_2_Folder, "tf\\custom\\") + InitialDirectory = Path.Join(Properties.Settings.Default.TeamFortress2Folder, "tf\\custom\\") }; // File