diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-13 23:13:06 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-13 23:13:06 -0400 |
commit | f663ed3359d89448e03022d4caa6de662f0ab077 (patch) | |
tree | 20117f3b17568ae6fde7ae510d34bb05deea2dcb /src/SMAPI/Program.cs | |
parent | ff718d7993793ef4e93d49dc82f5ce3bb7de208e (diff) | |
download | SMAPI-f663ed3359d89448e03022d4caa6de662f0ab077.tar.gz SMAPI-f663ed3359d89448e03022d4caa6de662f0ab077.tar.bz2 SMAPI-f663ed3359d89448e03022d4caa6de662f0ab077.zip |
fix assets not being reloaded when mods implement IAssetEditor or IAssetLoader directly
Diffstat (limited to 'src/SMAPI/Program.cs')
-rw-r--r-- | src/SMAPI/Program.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs index 293c9da7..fe306e24 100644 --- a/src/SMAPI/Program.cs +++ b/src/SMAPI/Program.cs @@ -774,6 +774,13 @@ namespace StardewModdingAPI // add interceptors if (metadata.Mod.Helper.Content is ContentHelper helper) { + // ReSharper disable SuspiciousTypeConversion.Global + if (metadata.Mod is IAssetEditor editor) + helper.ObservableAssetEditors.Add(editor); + if (metadata.Mod is IAssetLoader loader) + helper.ObservableAssetLoaders.Add(loader); + // ReSharper restore SuspiciousTypeConversion.Global + this.ContentManager.Editors[metadata] = helper.ObservableAssetEditors; this.ContentManager.Loaders[metadata] = helper.ObservableAssetLoaders; } |