summaryrefslogtreecommitdiff
path: root/src/SMAPI/IContentHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/IContentHelper.cs')
-rw-r--r--src/SMAPI/IContentHelper.cs6
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>