From 93475bab7fe692773350e227e1eae55c567ae8bf Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 23 Mar 2020 22:32:57 -0400 Subject: fix asset changes not propagating to NPCs in an event --- docs/release-notes.md | 4 ++++ src/SMAPI/Metadata/CoreAssetPropagator.cs | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 5a5e24d4..7474cc32 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,6 +1,10 @@ ← [README](README.md) # Release notes +## Upcoming release +* For modders: + * Fixed asset changes not propagating to NPCs in an event (e.g. wedding sprites). + ## 3.4 Released 22 March 2020 for Stardew Valley 1.4.1 or later. diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 8d5ad3ab..83e553ff 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -949,7 +949,14 @@ namespace StardewModdingAPI.Metadata /// Get all NPCs in the game (excluding farm animals). private IEnumerable GetCharacters() { - return this.GetLocations().SelectMany(p => p.characters); + foreach (NPC character in this.GetLocations().SelectMany(p => p.characters)) + yield return character; + + if (Game1.CurrentEvent?.actors != null) + { + foreach (NPC character in Game1.CurrentEvent.actors) + yield return character; + } } /// Get all farm animals in the game. -- cgit From 68def4aa8a0a7909948849fc7be971eba05b6bb2 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 24 Mar 2020 19:16:51 -0400 Subject: fix mouse input suppression broken in SMAPI 3.4 (#705) --- docs/release-notes.md | 3 ++- src/SMAPI/Framework/Input/MouseStateBuilder.cs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 7474cc32..55e867d1 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -3,7 +3,8 @@ # Release notes ## Upcoming release * For modders: - * Fixed asset changes not propagating to NPCs in an event (e.g. wedding sprites). + * Asset changes now propagate to NPCs in an event (e.g. wedding sprites). + * Fixed mouse input suppression not working in SMAPI 3.4. ## 3.4 Released 22 March 2020 for Stardew Valley 1.4.1 or later. diff --git a/src/SMAPI/Framework/Input/MouseStateBuilder.cs b/src/SMAPI/Framework/Input/MouseStateBuilder.cs index cff3e05e..59956feb 100644 --- a/src/SMAPI/Framework/Input/MouseStateBuilder.cs +++ b/src/SMAPI/Framework/Input/MouseStateBuilder.cs @@ -66,9 +66,11 @@ namespace StardewModdingAPI.Framework.Input { foreach (var pair in overrides) { - bool isDown = pair.Value.IsDown(); if (this.ButtonStates.ContainsKey(pair.Key)) - this.ButtonStates[pair.Key] = isDown ? ButtonState.Pressed : ButtonState.Released; + { + this.State = null; + this.ButtonStates[pair.Key] = pair.Value.IsDown() ? ButtonState.Pressed : ButtonState.Released; + } } return this; -- cgit From 31db04f4a0814193c98f8875b09aa9bbfa7e0ec5 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 24 Mar 2020 21:02:05 -0400 Subject: prepare for release --- build/common.targets | 2 +- docs/release-notes.md | 4 +++- src/SMAPI.Mods.ConsoleCommands/manifest.json | 4 ++-- src/SMAPI.Mods.SaveBackup/manifest.json | 4 ++-- src/SMAPI/Constants.cs | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build/common.targets b/build/common.targets index b3211aba..1e14a86c 100644 --- a/build/common.targets +++ b/build/common.targets @@ -4,7 +4,7 @@ - 3.4.0 + 3.4.1 SMAPI $(AssemblySearchPaths);{GAC} diff --git a/docs/release-notes.md b/docs/release-notes.md index 55e867d1..185ddc69 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,7 +1,9 @@ ← [README](README.md) # Release notes -## Upcoming release +## 3.4.1 +Released 24 March 2020 for Stardew Valley 1.4.1 or later. + * For modders: * Asset changes now propagate to NPCs in an event (e.g. wedding sprites). * Fixed mouse input suppression not working in SMAPI 3.4. diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index dbed84eb..a55d168f 100644 --- a/src/SMAPI.Mods.ConsoleCommands/manifest.json +++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json @@ -1,9 +1,9 @@ { "Name": "Console Commands", "Author": "SMAPI", - "Version": "3.4.0", + "Version": "3.4.1", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "3.4.0" + "MinimumApiVersion": "3.4.1" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index dc8bc8d4..5bf35b5c 100644 --- a/src/SMAPI.Mods.SaveBackup/manifest.json +++ b/src/SMAPI.Mods.SaveBackup/manifest.json @@ -1,9 +1,9 @@ { "Name": "Save Backup", "Author": "SMAPI", - "Version": "3.4.0", + "Version": "3.4.1", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "3.4.0" + "MinimumApiVersion": "3.4.1" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index d66e9d6b..128e23bd 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -20,7 +20,7 @@ namespace StardewModdingAPI ** Public ****/ /// SMAPI's current semantic version. - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.4.0"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.4.1"); /// The minimum supported version of Stardew Valley. public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.4.1"); -- cgit