diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-02 18:49:49 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-12-02 18:49:49 -0500 |
commit | 5cc5f089b9645a60385ff293b5a7202f260bfc0f (patch) | |
tree | 68f8bee734d164277f711b8ac54bd1064c0757d6 /src/SMAPI/IContentHelper.cs | |
parent | e0b72374cd14298aacc6f71dc391fdc9814be37c (diff) | |
parent | dc4f89acb6cd8f838934b60e8f5645c6145706f8 (diff) | |
download | SMAPI-5cc5f089b9645a60385ff293b5a7202f260bfc0f.tar.gz SMAPI-5cc5f089b9645a60385ff293b5a7202f260bfc0f.tar.bz2 SMAPI-5cc5f089b9645a60385ff293b5a7202f260bfc0f.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/IContentHelper.cs')
-rw-r--r-- | src/SMAPI/IContentHelper.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/SMAPI/IContentHelper.cs b/src/SMAPI/IContentHelper.cs index e3362502..1b87183d 100644 --- a/src/SMAPI/IContentHelper.cs +++ b/src/SMAPI/IContentHelper.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics.Contracts; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using StardewValley; @@ -37,6 +38,11 @@ namespace StardewModdingAPI /// <exception cref="ContentLoadException">The content asset couldn't be loaded (e.g. because it doesn't exist).</exception> T Load<T>(string key, ContentSource source = ContentSource.ModFolder); + /// <summary>Normalise an asset name so it's consistent with those generated by the game. This is mainly useful for string comparisons like <see cref="string.StartsWith(string)"/> on generated asset names, and isn't necessary when passing asset names into other content helper methods.</summary> + /// <param name="assetName">The asset key.</param> + [Pure] + string NormaliseAssetName(string assetName); + /// <summary>Get the underlying key in the game's content cache for an asset. This can be used to load custom map tilesheets, but should be avoided when you can use the content API instead. This does not validate whether the asset exists.</summary> /// <param name="key">The asset key to fetch (if the <paramref name="source"/> is <see cref="ContentSource.GameContent"/>), or the local path to a content file relative to the mod folder.</param> /// <param name="source">Where to search for a matching content asset.</param> |