diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-27 12:16:28 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-27 12:16:28 -0400 |
commit | d864f2ed775dfd5843b9e1cdd1da96ade5dd1068 (patch) | |
tree | 0c5d14bb6e1febc82a1d4cebaf46c44b83f46026 /src/SMAPI/Events | |
parent | 03efea26676464933513383eb1c841f1ca5db34d (diff) | |
download | SMAPI-d864f2ed775dfd5843b9e1cdd1da96ade5dd1068.tar.gz SMAPI-d864f2ed775dfd5843b9e1cdd1da96ade5dd1068.tar.bz2 SMAPI-d864f2ed775dfd5843b9e1cdd1da96ade5dd1068.zip |
add asset type to AssetRequested event (#766)
Diffstat (limited to 'src/SMAPI/Events')
-rw-r--r-- | src/SMAPI/Events/AssetRequestedEventArgs.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI/Events/AssetRequestedEventArgs.cs b/src/SMAPI/Events/AssetRequestedEventArgs.cs index 4d9ee236..c0cbd8fb 100644 --- a/src/SMAPI/Events/AssetRequestedEventArgs.cs +++ b/src/SMAPI/Events/AssetRequestedEventArgs.cs @@ -30,6 +30,9 @@ namespace StardewModdingAPI.Events /// <remarks>For example, if <see cref="Name"/> contains a locale like <c>Data/Bundles.fr-FR</c>, this will be the name without locale like <c>Data/Bundles</c>. If the name has no locale, this field is equivalent.</remarks> public IAssetName NameWithoutLocale { get; } + /// <summary>The requested data type.</summary> + public Type DataType { get; } + /// <summary>The load operations requested by the event handler.</summary> internal IList<AssetLoadOperation> LoadOperations { get; } = new List<AssetLoadOperation>(); @@ -43,13 +46,15 @@ namespace StardewModdingAPI.Events /// <summary>Construct an instance.</summary> /// <param name="mod">The mod handling the event.</param> /// <param name="name">The name of the asset being requested.</param> + /// <param name="dataType">The requested data type.</param> /// <param name="nameWithoutLocale">The <paramref name="name"/> with any locale codes stripped.</param> /// <param name="getOnBehalfOf">Get the mod metadata for a content pack, if it's a valid content pack for the mod.</param> - internal AssetRequestedEventArgs(IModMetadata mod, IAssetName name, IAssetName nameWithoutLocale, Func<IModMetadata, string, string, IModMetadata> getOnBehalfOf) + internal AssetRequestedEventArgs(IModMetadata mod, IAssetName name, IAssetName nameWithoutLocale, Type dataType, Func<IModMetadata, string, string, IModMetadata> getOnBehalfOf) { this.Mod = mod; this.Name = name; this.NameWithoutLocale = nameWithoutLocale; + this.DataType = dataType; this.GetOnBehalfOf = getOnBehalfOf; } |