diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-26 01:19:44 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-26 01:19:44 -0400 |
commit | e40907ab8b97bd8a557adf683a406413646b1fc5 (patch) | |
tree | 6f13c434e37ea71f8007752f39210c4800357965 /src/SMAPI/Events/AssetsInvalidatedEventArgs.cs | |
parent | 4da38e1317f6ebd6485b04482eb3d2ffd0507530 (diff) | |
download | SMAPI-e40907ab8b97bd8a557adf683a406413646b1fc5.tar.gz SMAPI-e40907ab8b97bd8a557adf683a406413646b1fc5.tar.bz2 SMAPI-e40907ab8b97bd8a557adf683a406413646b1fc5.zip |
add NameWithoutLocale fields (#766)
Diffstat (limited to 'src/SMAPI/Events/AssetsInvalidatedEventArgs.cs')
-rw-r--r-- | src/SMAPI/Events/AssetsInvalidatedEventArgs.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs b/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs index f3d83dd6..614cdf49 100644 --- a/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs +++ b/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; -using System.Linq; namespace StardewModdingAPI.Events { @@ -14,15 +13,21 @@ namespace StardewModdingAPI.Events /// <summary>The asset names that were invalidated.</summary> public IReadOnlySet<IAssetName> Names { get; } + /// <summary>The <see cref="Names"/> with any locale codes stripped.</summary> + /// <remarks>For example, if <see cref="Names"/> contains a locale like <c>Data/Bundles.fr-FR</c>, this will have the name without locale like <c>Data/Bundles</c>. If the name has no locale, this field is equivalent.</remarks> + public IReadOnlySet<IAssetName> NamesWithoutLocale { get; } + /********* ** Public methods *********/ /// <summary>Construct an instance.</summary> /// <param name="names">The asset names that were invalidated.</param> - internal AssetsInvalidatedEventArgs(IEnumerable<IAssetName> names) + /// <param name="namesWithoutLocale">The <paramref name="names"/> with any locale codes stripped.</param> + internal AssetsInvalidatedEventArgs(IEnumerable<IAssetName> names, IEnumerable<IAssetName> namesWithoutLocale) { this.Names = names.ToImmutableHashSet(); + this.NamesWithoutLocale = namesWithoutLocale.ToImmutableHashSet(); } } } |