diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-01-25 21:53:11 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-01-25 21:53:11 -0500 |
commit | f1505b0ebe5c8fa7cf3c160231f0ed7d1bd6619a (patch) | |
tree | 104d6fb0415287524dbad32431a6d6249155d93b /src/SMAPI/Metadata/CoreAssetPropagator.cs | |
parent | d0dc3ea6f6d03e6aabdab5f5f10a60177f0e53b6 (diff) | |
parent | 082028016993606e8deec84027c781d77e062caa (diff) | |
download | SMAPI-f1505b0ebe5c8fa7cf3c160231f0ed7d1bd6619a.tar.gz SMAPI-f1505b0ebe5c8fa7cf3c160231f0ed7d1bd6619a.tar.bz2 SMAPI-f1505b0ebe5c8fa7cf3c160231f0ed7d1bd6619a.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Metadata/CoreAssetPropagator.cs')
-rw-r--r-- | src/SMAPI/Metadata/CoreAssetPropagator.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 4b911a83..063804e0 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using Microsoft.Xna.Framework.Graphics; @@ -79,7 +80,7 @@ namespace StardewModdingAPI.Metadata }); // reload assets - IDictionary<string, bool> propagated = assets.ToDictionary(p => p.Key, p => false, StringComparer.OrdinalIgnoreCase); + IDictionary<string, bool> propagated = assets.ToDictionary(p => p.Key, _ => false, StringComparer.OrdinalIgnoreCase); foreach (var bucket in buckets) { switch (bucket.Key) @@ -110,6 +111,7 @@ namespace StardewModdingAPI.Metadata /// <param name="key">The asset key to reload.</param> /// <param name="type">The asset type to reload.</param> /// <returns>Returns whether an asset was loaded. The return value may be true or false, or a non-null value for true.</returns> + [SuppressMessage("ReSharper", "StringLiteralTypo", Justification = "These deliberately match the asset names.")] private bool PropagateOther(LocalizedContentManager content, string key, Type type) { key = this.AssertAndNormalizeAssetName(key); @@ -492,8 +494,7 @@ namespace StardewModdingAPI.Metadata return true; case "terrainfeatures\\grass": // from Grass - this.ReloadGrassTextures(content, key); - return true; + return this.ReloadGrassTextures(content, key); case "terrainfeatures\\hoedirt": // from HoeDirt HoeDirt.lightTexture = content.Load<Texture2D>(key); @@ -785,6 +786,7 @@ namespace StardewModdingAPI.Metadata private void ReloadMap(GameLocation location) { // reload map + location.interiorDoors.Clear(); // prevent errors when doors try to update tiles which no longer exist location.reloadMap(); location.updateWarps(); location.MakeMapModifications(force: true); |