summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/SCore.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-26 01:19:44 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-26 01:19:44 -0400
commite40907ab8b97bd8a557adf683a406413646b1fc5 (patch)
tree6f13c434e37ea71f8007752f39210c4800357965 /src/SMAPI/Framework/SCore.cs
parent4da38e1317f6ebd6485b04482eb3d2ffd0507530 (diff)
downloadSMAPI-e40907ab8b97bd8a557adf683a406413646b1fc5.tar.gz
SMAPI-e40907ab8b97bd8a557adf683a406413646b1fc5.tar.bz2
SMAPI-e40907ab8b97bd8a557adf683a406413646b1fc5.zip
add NameWithoutLocale fields (#766)
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r--src/SMAPI/Framework/SCore.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index dd682e40..dd952dee 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -1113,15 +1113,15 @@ namespace StardewModdingAPI.Framework
private void OnAssetLoaded(IContentManager contentManager, IAssetName assetName)
{
if (this.EventManager.AssetReady.HasListeners())
- this.EventManager.AssetReady.Raise(new AssetReadyEventArgs(assetName));
+ this.EventManager.AssetReady.Raise(new AssetReadyEventArgs(assetName, assetName.GetBaseAssetName()));
}
/// <summary>A callback invoked after assets have been invalidated from the content cache.</summary>
/// <param name="assetNames">The invalidated asset names.</param>
- private void OnAssetsInvalidated(IEnumerable<IAssetName> assetNames)
+ private void OnAssetsInvalidated(IList<IAssetName> assetNames)
{
if (this.EventManager.AssetsInvalidated.HasListeners())
- this.EventManager.AssetsInvalidated.Raise(new AssetsInvalidatedEventArgs(assetNames));
+ this.EventManager.AssetsInvalidated.Raise(new AssetsInvalidatedEventArgs(assetNames, assetNames.Select(p => p.GetBaseAssetName())));
}
/// <summary>Get the load/edit operations to apply to an asset by querying registered <see cref="IContentEvents.AssetRequested"/> event handlers.</summary>
@@ -1133,7 +1133,7 @@ namespace StardewModdingAPI.Framework
this.EventManager.AssetRequested.Raise(
invoke: (mod, invoke) =>
{
- AssetRequestedEventArgs args = new(mod, asset.Name, this.GetOnBehalfOfContentPack);
+ AssetRequestedEventArgs args = new(mod, asset.Name, asset.NameWithoutLocale, this.GetOnBehalfOfContentPack);
invoke(args);