summaryrefslogtreecommitdiff
path: root/src/SMAPI/Context.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2023-06-16 22:38:08 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2023-06-16 22:38:08 -0400
commit65120d64efa09c4b8a4881d8c9a0175b4ce30812 (patch)
tree50d9014f7a98c262480417007200e101d70671cf /src/SMAPI/Context.cs
parent9e1bfff7f7889783fcaa7d055e3351b90d03f465 (diff)
downloadSMAPI-65120d64efa09c4b8a4881d8c9a0175b4ce30812.tar.gz
SMAPI-65120d64efa09c4b8a4881d8c9a0175b4ce30812.tar.bz2
SMAPI-65120d64efa09c4b8a4881d8c9a0175b4ce30812.zip
fix Context.HasRemotePlayers being true when there's no farmhandsHEADdevelop
Diffstat (limited to 'src/SMAPI/Context.cs')
-rw-r--r--src/SMAPI/Context.cs5
1 files changed, 2 insertions, 3 deletions
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);