summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Content/AssetInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/Content/AssetInfo.cs')
-rw-r--r--src/SMAPI/Framework/Content/AssetInfo.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Content/AssetInfo.cs b/src/SMAPI/Framework/Content/AssetInfo.cs
index 556f1c2a..6e93c33c 100644
--- a/src/SMAPI/Framework/Content/AssetInfo.cs
+++ b/src/SMAPI/Framework/Content/AssetInfo.cs
@@ -27,7 +27,20 @@ namespace StardewModdingAPI.Framework.Content
/// <inheritdoc />
[Obsolete($"Use {nameof(Name)} or {nameof(NameWithoutLocale)} instead.")]
- public string AssetName => this.NameWithoutLocale.Name;
+ public string AssetName
+ {
+ get
+ {
+ SCore.DeprecationManager.Warn(
+ source: SCore.DeprecationManager.GetSourceNameFromStack(),
+ nounPhrase: $"{nameof(IAssetInfo)}.{nameof(IAssetInfo.AssetName)}",
+ version: "3.14.0",
+ severity: DeprecationLevel.Notice
+ );
+
+ return this.NameWithoutLocale.Name;
+ }
+ }
/// <inheritdoc />
public Type DataType { get; }
@@ -54,6 +67,14 @@ namespace StardewModdingAPI.Framework.Content
[Obsolete($"Use {nameof(Name)}.{nameof(IAssetName.IsEquivalentTo)} or {nameof(NameWithoutLocale)}.{nameof(IAssetName.IsEquivalentTo)} instead.")]
public bool AssetNameEquals(string path)
{
+ SCore.DeprecationManager.Warn(
+ source: SCore.DeprecationManager.GetSourceNameFromStack(),
+ nounPhrase: $"{nameof(IAssetInfo)}.{nameof(IAssetInfo.AssetNameEquals)}",
+ version: "3.14.0",
+ severity: DeprecationLevel.Notice
+ );
+
+
return this.NameWithoutLocale.IsEquivalentTo(path);
}