summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI/Context.cs5
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 298a0f8e..01d67563 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -16,6 +16,7 @@
* For mod authors:
* Added support for [custom update manifests](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Update_checks#Custom_update_manifest) (thanks to Jamie Taylor!).
+ * Fixed `Context.HasRemotePlayers` being true when there's no farmhands connected.
* Fixed error loading a mod if it sets `"MinimumApiVersion": null` explicitly.
* For SMAPI toolkit users:
diff --git a/src/SMAPI/Context.cs b/src/SMAPI/Context.cs
index 978459e8..3e3ee784 100644
--- a/src/SMAPI/Context.cs
+++ b/src/SMAPI/Context.cs
@@ -88,7 +88,7 @@ namespace StardewModdingAPI
public static bool IsSplitScreen => LocalMultiplayer.IsLocalMultiplayer();
/// <summary>Whether there are players connected over the network.</summary>
- public static bool HasRemotePlayers => Context.IsMultiplayer && !Game1.hasLocalClientsOnly;
+ public static bool HasRemotePlayers => Context.IsMultiplayer && !Game1.hasLocalClientsOnly && Game1.getOnlineFarmers().Count > 1;
/// <summary>Whether the current player is the main player. This is always true in single-player, and true when hosting in multiplayer.</summary>
public static bool IsMainPlayer => Game1.IsMasterGame && Context.ScreenId == 0 && TitleMenu.subMenu is not FarmhandMenu;
@@ -97,8 +97,7 @@ namespace StardewModdingAPI
/*********
** Public methods
*********/
- /// <summary>Get whether a screen ID is still active.</summary>
- /// <param name="id">The screen ID.</param>
+ /// <summary>Get whether a screen ID is still active.</summary> <param name="id">The screen ID.</param>
public static bool HasScreenId(int id)
{
return Context.ActiveScreenIds.Contains(id);