diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-01-16 18:01:19 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-01-16 18:01:19 -0500 |
commit | 1b9ff9cd101621cacc246fc2b7d936f964ae4b3f (patch) | |
tree | ff742b2a12270b57c28e8ddecdc5322c64f6c2ce /src/SMAPI.Toolkit/Framework | |
parent | 8a2618d812e4e2f36161907af5af5c484eb37abf (diff) | |
parent | ad0e6b315dc7b4e616dcdf6c090cd54a2f3b7499 (diff) | |
download | SMAPI-1b9ff9cd101621cacc246fc2b7d936f964ae4b3f.tar.gz SMAPI-1b9ff9cd101621cacc246fc2b7d936f964ae4b3f.tar.bz2 SMAPI-1b9ff9cd101621cacc246fc2b7d936f964ae4b3f.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Toolkit/Framework')
-rw-r--r-- | src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs index 37e4f263..8d4198de 100644 --- a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs +++ b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs @@ -157,7 +157,7 @@ namespace StardewModdingAPI.Toolkit.Framework.GameScanning yield return Path.Combine(steamPath.Replace('/', '\\'), @"steamapps\common\Stardew Valley"); #endif - // default paths + // default GOG/Steam paths foreach (string programFiles in new[] { @"C:\Program Files", @"C:\Program Files (x86)" }) { yield return $@"{programFiles}\GalaxyClient\Games\Stardew Valley"; @@ -165,6 +165,15 @@ namespace StardewModdingAPI.Toolkit.Framework.GameScanning yield return $@"{programFiles}\GOG Games\Stardew Valley"; yield return $@"{programFiles}\Steam\steamapps\common\Stardew Valley"; } + + // default Xbox app paths + // The Xbox app saves the install path to the registry, but we can't use it + // here since it saves the internal readonly path (like C:\Program Files\WindowsApps\Mutable\<package ID>) + // instead of the mods-enabled path(like C:\Program Files\ModifiableWindowsApps\Stardew Valley). + // Fortunately we can cheat a bit: players can customize the install drive, but they can't + // change the install path on the drive. + for (char driveLetter = 'C'; driveLetter <= 'H'; driveLetter++) + yield return $@"{driveLetter}:\Program Files\ModifiableWindowsApps\Stardew Valley"; } break; |