From 56ca0f5e81b22eafeaec2c51085a82bda1188121 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 15 Jan 2021 18:48:32 -0500 Subject: add split-screen info to multiplayer peer --- src/SMAPI/Framework/Networking/MultiplayerPeer.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/SMAPI/Framework/Networking') diff --git a/src/SMAPI/Framework/Networking/MultiplayerPeer.cs b/src/SMAPI/Framework/Networking/MultiplayerPeer.cs index 5eda71f6..3923700f 100644 --- a/src/SMAPI/Framework/Networking/MultiplayerPeer.cs +++ b/src/SMAPI/Framework/Networking/MultiplayerPeer.cs @@ -24,9 +24,15 @@ namespace StardewModdingAPI.Framework.Networking /// public bool IsHost { get; } + /// + public bool IsSplitScreen => this.ScreenID != null; + /// public bool HasSmapi => this.ApiVersion != null; + /// + public int? ScreenID { get; } + /// public GamePlatform? Platform { get; } @@ -45,12 +51,14 @@ namespace StardewModdingAPI.Framework.Networking *********/ /// Construct an instance. /// The player's unique ID. + /// The player's screen ID, if applicable. /// The metadata to copy. /// A method which sends a message to the peer. /// Whether this is a connection to the host player. - public MultiplayerPeer(long playerID, RemoteContextModel model, Action sendMessage, bool isHost) + public MultiplayerPeer(long playerID, int? screenID, RemoteContextModel model, Action sendMessage, bool isHost) { this.PlayerID = playerID; + this.ScreenID = screenID; this.IsHost = isHost; if (model != null) { -- cgit