Skip to content

Commit

Permalink
Merge pull request #1141 from shananas/master
Browse files Browse the repository at this point in the history
Fix panacea_settings.txt
  • Loading branch information
TopazTK authored Jan 23, 2025
2 parents d9c6d78 + 02c75bf commit 2cf5d3a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions OpenKh.Tools.ModsManager/ViewModels/SetupWizardViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -892,18 +892,18 @@ public SetupWizardViewModel()
File.Copy(PanaceaSourceLocation, PanaceaAlternateLocation, true);
File.Delete(PanaceaDestinationLocation);
}
if (Directory.Exists(ConfigurationService.PcReleaseLocation))
if (Directory.Exists(PcReleaseLocation))
{
File.WriteAllLines(Path.Combine(ConfigurationService.PcReleaseLocation, "panacea_settings.txt"),
File.WriteAllLines(Path.Combine(PcReleaseLocation, "panacea_settings.txt"),
new string[]
{
$"mod_path={ConfigurationService.GameModPath}",
$"show_console={false}",
});
}
if (Directory.Exists(ConfigurationService.PcReleaseLocationKH3D))
if (Directory.Exists(PcReleaseLocationKH3D))
{
File.WriteAllLines(Path.Combine(ConfigurationService.PcReleaseLocationKH3D, "panacea_settings.txt"),
File.WriteAllLines(Path.Combine(PcReleaseLocationKH3D, "panacea_settings.txt"),
new string[]
{
$"mod_path={ConfigurationService.GameModPath}",
Expand Down Expand Up @@ -948,8 +948,8 @@ public SetupWizardViewModel()
File.Delete(Path.Combine(PanaceaDependenciesLocation, "libspeex-1.dll"));
File.Delete(Path.Combine(PanaceaDependenciesLocation, "libvorbis.dll"));
File.Delete(Path.Combine(PanaceaDependenciesLocation, "swresample-vgmstream-4.dll"));
File.Delete(Path.Combine(ConfigurationService.PcReleaseLocation, "panacea_settings.txt"));
File.Delete(Path.Combine(ConfigurationService.PcReleaseLocationKH3D, "panacea_settings.txt"));
File.Delete(Path.Combine(PcReleaseLocation, "panacea_settings.txt"));
File.Delete(Path.Combine(PcReleaseLocationKH3D, "panacea_settings.txt"));
PanaceaInstalled = false;
return;
}
Expand Down Expand Up @@ -1002,8 +1002,8 @@ public SetupWizardViewModel()
File.Delete(Path.Combine(PanaceaDependenciesLocation, "libspeex-1.dll"));
File.Delete(Path.Combine(PanaceaDependenciesLocation, "libvorbis.dll"));
File.Delete(Path.Combine(PanaceaDependenciesLocation, "swresample-vgmstream-4.dll"));
File.Delete(Path.Combine(ConfigurationService.PcReleaseLocation, "panacea_settings.txt"));
File.Delete(Path.Combine(ConfigurationService.PcReleaseLocationKH3D, "panacea_settings.txt"));
File.Delete(Path.Combine(PcReleaseLocation, "panacea_settings.txt"));
File.Delete(Path.Combine(PcReleaseLocationKH3D, "panacea_settings.txt"));
}
OnPropertyChanged(nameof(IsLastPanaceaVersionInstalled));
OnPropertyChanged(nameof(PanaceaInstalledVisibility));
Expand Down Expand Up @@ -1308,17 +1308,17 @@ public SetupWizardViewModel()
{
if (GameCollection == 0)
{
if (Directory.Exists(ConfigurationService.PcReleaseLocation))
if (Directory.Exists(PcReleaseLocation))
{
File.WriteAllText(Path.Combine(ConfigurationService.PcReleaseLocation, "steam_appid.txt"), "2552430");
File.WriteAllText(Path.Combine(PcReleaseLocation, "steam_appid.txt"), "2552430");
ConfigurationService.SteamAPITrick1525 = true;
}
}
else if (GameCollection == 1)
{
if (Directory.Exists(ConfigurationService.PcReleaseLocationKH3D))
if (Directory.Exists(PcReleaseLocationKH3D))
{
File.WriteAllText(Path.Combine(ConfigurationService.PcReleaseLocationKH3D, "steam_appid.txt"), "2552440");
File.WriteAllText(Path.Combine(PcReleaseLocationKH3D, "steam_appid.txt"), "2552440");
ConfigurationService.SteamAPITrick28 = true;
}
}
Expand All @@ -1327,17 +1327,17 @@ public SetupWizardViewModel()
{
if (GameCollection == 0)
{
if (File.Exists(Path.Combine(ConfigurationService.PcReleaseLocation, "steam_appid.txt")))
if (File.Exists(Path.Combine(PcReleaseLocation, "steam_appid.txt")))
{
File.Delete(Path.Combine(ConfigurationService.PcReleaseLocation, "steam_appid.txt"));
File.Delete(Path.Combine(PcReleaseLocation, "steam_appid.txt"));
ConfigurationService.SteamAPITrick1525 = false;
}
}
else if (GameCollection == 1)
{
if (File.Exists(Path.Combine(ConfigurationService.PcReleaseLocationKH3D, "steam_appid.txt")))
if (File.Exists(Path.Combine(PcReleaseLocationKH3D, "steam_appid.txt")))
{
File.Delete(Path.Combine(ConfigurationService.PcReleaseLocationKH3D, "steam_appid.txt"));
File.Delete(Path.Combine(PcReleaseLocationKH3D, "steam_appid.txt"));
ConfigurationService.SteamAPITrick28 = false;
}
}
Expand Down

0 comments on commit 2cf5d3a

Please sign in to comment.