Merge branch 'develop' into stable

This commit is contained in:
Jesse Plamondon-Willard 2020-02-22 23:03:26 -05:00
commit 5ae640dc91
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
6 changed files with 16 additions and 7 deletions

View File

@ -4,7 +4,7 @@
<!--set properties -->
<PropertyGroup>
<Version>3.3.0</Version>
<Version>3.3.2</Version>
<Product>SMAPI</Product>
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>

View File

@ -1,6 +1,11 @@
&larr; [README](README.md)
# Release notes
## 3.3.2
Released 22 February 2020 for Stardew Valley 1.4.1 or later.
* Fixed mods receiving their own message broadcasts.
## 3.3.1
Released 22 February 2020 for Stardew Valley 1.4.1 or later.

View File

@ -1,9 +1,9 @@
{
"Name": "Console Commands",
"Author": "SMAPI",
"Version": "3.3.1",
"Version": "3.3.2",
"Description": "Adds SMAPI console commands that let you manipulate the game.",
"UniqueID": "SMAPI.ConsoleCommands",
"EntryDll": "ConsoleCommands.dll",
"MinimumApiVersion": "3.3.1"
"MinimumApiVersion": "3.3.2"
}

View File

@ -1,9 +1,9 @@
{
"Name": "Save Backup",
"Author": "SMAPI",
"Version": "3.3.1",
"Version": "3.3.2",
"Description": "Automatically backs up all your saves once per day into its folder.",
"UniqueID": "SMAPI.SaveBackup",
"EntryDll": "SaveBackup.dll",
"MinimumApiVersion": "3.3.1"
"MinimumApiVersion": "3.3.2"
}

View File

@ -20,7 +20,7 @@ namespace StardewModdingAPI
** Public
****/
/// <summary>SMAPI's current semantic version.</summary>
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.3.1");
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.3.2");
/// <summary>The minimum supported version of Stardew Valley.</summary>
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.4.1");

View File

@ -226,8 +226,12 @@ namespace StardewModdingAPI.Framework
/// <param name="message">The message to deliver to applicable mods.</param>
private void OnModMessageReceived(ModMessageModel message)
{
// raise events for applicable mods
// get mod IDs to notify
HashSet<string> modIDs = new HashSet<string>(message.ToModIDs ?? this.ModRegistry.GetAll().Select(p => p.Manifest.UniqueID), StringComparer.InvariantCultureIgnoreCase);
if (message.FromPlayerID == Game1.player?.UniqueMultiplayerID)
modIDs.Remove(message.FromModID); // don't send a broadcast back to the sender
// raise events
this.Events.ModMessageReceived.RaiseForMods(new ModMessageReceivedEventArgs(message), mod => mod != null && modIDs.Contains(mod.Manifest.UniqueID));
}