add friendly error when the game can't find its Content\XACT folder
This commit is contained in:
parent
8eee91c67d
commit
0d26285da1
|
@ -1,6 +1,7 @@
|
|||
# Release notes
|
||||
## Upcoming release
|
||||
* For players:
|
||||
* Fixed cryptic error message when the game isn't installed correctly.
|
||||
* Fixed error when a mod makes invalid changes to an NPC schedule.
|
||||
* Fixed invalid NPC data propagated when a mod changes NPC dispositions.
|
||||
* Fixed `Display.RenderedWorld` event broken in SMAPI 2.9.1.
|
||||
|
|
|
@ -165,6 +165,7 @@ namespace StardewModdingAPI.Web
|
|||
redirects.Add(new RedirectToUrlRule(@"^/3\.0\.?$", "https://stardewvalleywiki.com/Modding:Migrate_to_SMAPI_3.0"));
|
||||
redirects.Add(new RedirectToUrlRule(@"^/docs\.?$", "https://stardewvalleywiki.com/Modding:Index"));
|
||||
redirects.Add(new RedirectToUrlRule(@"^/install\.?$", "https://stardewvalleywiki.com/Modding:Player_Guide/Getting_Started#Install_SMAPI"));
|
||||
redirects.Add(new RedirectToUrlRule(@"^/troubleshoot(.*)$", "https://stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting$1"));
|
||||
|
||||
// redirect legacy canimod.com URLs
|
||||
var wikiRedirects = new Dictionary<string, string[]>
|
||||
|
|
|
@ -313,6 +313,12 @@ namespace StardewModdingAPI.Framework
|
|||
this.Monitor.Log($"Technical details: {ex.GetLogSummary()}", LogLevel.Trace);
|
||||
this.PressAnyKeyToExit();
|
||||
}
|
||||
catch (FileNotFoundException ex) when (ex.Message == "Could not find file 'C:\\Program Files (x86)\\Steam\\SteamApps\\common\\Stardew Valley\\Content\\XACT\\FarmerSounds.xgs'.") // path in error is hardcoded regardless of install path
|
||||
{
|
||||
this.Monitor.Log("The game can't find its Content\\XACT\\FarmerSounds.xgs file. You can usually fix this by resetting your content files (see https://smapi.io/troubleshoot#reset-content ), or by uninstalling and reinstalling the game.", LogLevel.Error);
|
||||
this.Monitor.Log($"Technical details: {ex.GetLogSummary()}", LogLevel.Trace);
|
||||
this.PressAnyKeyToExit();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.MonitorForGame.Log($"The game failed to launch: {ex.GetLogSummary()}", LogLevel.Error);
|
||||
|
|
Loading…
Reference in New Issue