summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-01 00:33:35 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-01 00:33:35 -0400
commit6ad8ca932eb697a76dd9df43d6ae93c7ca4b2af5 (patch)
tree56b1762408d705016e43cbb5b61d2439af99098b /src/SMAPI/Framework/ContentManagers/ModContentManager.cs
parent1d3c99cc25f6c0d504fd5e43ea71ef327b6e9066 (diff)
downloadSMAPI-6ad8ca932eb697a76dd9df43d6ae93c7ca4b2af5.tar.gz
SMAPI-6ad8ca932eb697a76dd9df43d6ae93c7ca4b2af5.tar.bz2
SMAPI-6ad8ca932eb697a76dd9df43d6ae93c7ca4b2af5.zip
keep old XNB file extension behavior for backwards compatibility (#766)
Diffstat (limited to 'src/SMAPI/Framework/ContentManagers/ModContentManager.cs')
-rw-r--r--src/SMAPI/Framework/ContentManagers/ModContentManager.cs15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
index 2a5a3f16..63b40d66 100644
--- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
@@ -32,9 +32,6 @@ namespace StardewModdingAPI.Framework.ContentManagers
/// <summary>The game content manager used for map tilesheets not provided by the mod.</summary>
private readonly IContentManager GameContentManager;
- /// <summary>The language code for language-agnostic mod assets.</summary>
- private readonly LanguageCode DefaultLanguage = Constants.DefaultLanguage;
-
/// <summary>If a map tilesheet's image source has no file extensions, the file extensions to check for in the local mod folder.</summary>
private readonly string[] LocalTilesheetExtensions = { ".png", ".xnb" };
@@ -76,12 +73,6 @@ namespace StardewModdingAPI.Framework.ContentManagers
}
/// <inheritdoc />
- public override T Load<T>(string assetName)
- {
- return this.Load<T>(assetName, this.DefaultLanguage);
- }
-
- /// <inheritdoc />
public override T LoadExact<T>(IAssetName assetName, bool useCache)
{
// disable caching
@@ -222,14 +213,14 @@ namespace StardewModdingAPI.Framework.ContentManagers
private FileInfo GetModFile(string path)
{
// try exact match
- FileInfo file = new FileInfo(Path.Combine(this.FullRootDirectory, path));
+ FileInfo file = new(Path.Combine(this.FullRootDirectory, path));
// try with default extension
- if (!file.Exists && file.Extension == string.Empty)
+ if (!file.Exists)
{
foreach (string extension in this.LocalTilesheetExtensions)
{
- FileInfo result = new FileInfo(file.FullName + extension);
+ FileInfo result = new(file.FullName + extension);
if (result.Exists)
{
file = result;