summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModHelpers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-22 12:03:39 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-22 12:03:39 -0500
commit66079f2253a0c81bb33c1fee848a6cd2222d43d9 (patch)
treeca5fdd5f27c24f8d90665cb369e50f4580ce24fc /src/SMAPI/Framework/ModHelpers
parentc8d627cdf2ae3126584ec2500877ff19987db17f (diff)
parent585b23797e262073e0738069eff61e90819216b7 (diff)
downloadSMAPI-66079f2253a0c81bb33c1fee848a6cd2222d43d9.tar.gz
SMAPI-66079f2253a0c81bb33c1fee848a6cd2222d43d9.tar.bz2
SMAPI-66079f2253a0c81bb33c1fee848a6cd2222d43d9.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers')
-rw-r--r--src/SMAPI/Framework/ModHelpers/ContentHelper.cs8
-rw-r--r--src/SMAPI/Framework/ModHelpers/InputHelper.cs7
2 files changed, 12 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
index 043ae376..e9b70845 100644
--- a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
@@ -32,7 +32,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
/// <summary>The friendly mod name for use in errors.</summary>
private readonly string ModName;
- /// <summary>Encapsulates monitoring and logging for a given module.</summary>
+ /// <summary>Encapsulates monitoring and logging.</summary>
private readonly IMonitor Monitor;
@@ -70,9 +70,11 @@ namespace StardewModdingAPI.Framework.ModHelpers
public ContentHelper(ContentCoordinator contentCore, string modFolderPath, string modID, string modName, IMonitor monitor)
: base(modID)
{
+ string managedAssetPrefix = contentCore.GetManagedAssetPrefix(modID);
+
this.ContentCore = contentCore;
- this.GameContentManager = contentCore.CreateGameContentManager(this.ContentCore.GetManagedAssetPrefix(modID) + ".content");
- this.ModContentManager = contentCore.CreateModContentManager(this.ContentCore.GetManagedAssetPrefix(modID), modFolderPath, this.GameContentManager);
+ this.GameContentManager = contentCore.CreateGameContentManager(managedAssetPrefix + ".content");
+ this.ModContentManager = contentCore.CreateModContentManager(managedAssetPrefix, modName, modFolderPath, this.GameContentManager);
this.ModName = modName;
this.Monitor = monitor;
}
diff --git a/src/SMAPI/Framework/ModHelpers/InputHelper.cs b/src/SMAPI/Framework/ModHelpers/InputHelper.cs
index f4cd12b6..f8ff0355 100644
--- a/src/SMAPI/Framework/ModHelpers/InputHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/InputHelper.cs
@@ -50,5 +50,12 @@ namespace StardewModdingAPI.Framework.ModHelpers
{
this.InputState.SuppressButtons.Add(button);
}
+
+ /// <summary>Get the state of a button.</summary>
+ /// <param name="button">The button to check.</param>
+ public SButtonState GetState(SButton button)
+ {
+ return this.InputState.GetState(button);
+ }
}
}