summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-22 23:03:26 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-22 23:03:26 -0500
commit5ae640dc91adff8dfb0827e2a3c3f6b54be7c612 (patch)
treefc1c82e1d85fc8e7b094eeb2c14f7b6a41aea9be
parentf98f61e6d891c43adae4494b84705dee369829f7 (diff)
parentd03f77dd3516f70411be7b61d9a8aa81a7b228a5 (diff)
downloadSMAPI-5ae640dc91adff8dfb0827e2a3c3f6b54be7c612.tar.gz
SMAPI-5ae640dc91adff8dfb0827e2a3c3f6b54be7c612.tar.bz2
SMAPI-5ae640dc91adff8dfb0827e2a3c3f6b54be7c612.zip
Merge branch 'develop' into stable
-rw-r--r--build/common.targets2
-rw-r--r--docs/release-notes.md5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/manifest.json4
-rw-r--r--src/SMAPI.Mods.SaveBackup/manifest.json4
-rw-r--r--src/SMAPI/Constants.cs2
-rw-r--r--src/SMAPI/Framework/SGame.cs6
6 files changed, 16 insertions, 7 deletions
diff --git a/build/common.targets b/build/common.targets
index 626eeef6..c1617375 100644
--- a/build/common.targets
+++ b/build/common.targets
@@ -4,7 +4,7 @@
<!--set properties -->
<PropertyGroup>
- <Version>3.3.0</Version>
+ <Version>3.3.2</Version>
<Product>SMAPI</Product>
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
diff --git a/docs/release-notes.md b/docs/release-notes.md
index cf084856..50c6f639 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -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.
diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json
index 04f0c059..0e6805dc 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.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"
}
diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json
index 75b97566..5165d2b2 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.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"
}
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index e71b21b1..3242a12c 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -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");
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs
index 6b9c1365..b2d92ce8 100644
--- a/src/SMAPI/Framework/SGame.cs
+++ b/src/SMAPI/Framework/SGame.cs
@@ -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));
}