Changes

Jump to navigation Jump to search
→‎Get connected player info: + split-screen fields in SMAPI 3.9, update example
Line 36: Line 36:  
| <tt>bool</tt>
 
| <tt>bool</tt>
 
| True if this player is hosting the server; false if they're a farmhand.
 
| True if this player is hosting the server; false if they're a farmhand.
 +
|-
 +
| <tt>IsSplitScreen</tt>
 +
| <tt>bool</tt>
 +
| {{SMAPI upcoming|3.9|True if the player is running on the same computer in split-screen mode.}}
 
|-
 
|-
 
| <tt>HasSmapi</tt>
 
| <tt>HasSmapi</tt>
Line 56: Line 60:  
| <tt>IEnumerable&lt;IMultiplayerPeerMod&gt;</tt>
 
| <tt>IEnumerable&lt;IMultiplayerPeerMod&gt;</tt>
 
| (Requires SMAPI.) The mods they have installed. Each mod includes the name, unique ID, and version.
 
| (Requires SMAPI.) The mods they have installed. Each mod includes the name, unique ID, and version.
 +
|-
 +
| <tt>ScreenID</tt>
 +
| <tt>int?</tt>
 +
| {{SMAPI upcoming|3.9|The player's screen ID in split-screen mode, if <tt>IsSplitScreen</tt> is true.}}
 
|-
 
|-
 
| <tt>GetMod(id)</tt>
 
| <tt>GetMod(id)</tt>
Line 68: Line 76:  
     if (peer.HasSmapi)
 
     if (peer.HasSmapi)
 
     {
 
     {
         // prints something like: "Found player -1634555469947451666 running Stardew Valley 1.3.36 and SMAPI 2.11 on Windows with 41 mods."
+
         // prints something like: "Found player -1634555469947451666 running Stardew Valley 1.5.2 and SMAPI 3.9.0 on Windows with 41 mods."
 
         this.Monitor.Log($"Found player {peer.PlayerID} running Stardew Valley {peer.GameVersion} and SMAPI {peer.ApiVersion} on {peer.Platform} with {peer.Mods.Count()} mods.");
 
         this.Monitor.Log($"Found player {peer.PlayerID} running Stardew Valley {peer.GameVersion} and SMAPI {peer.ApiVersion} on {peer.Platform} with {peer.Mods.Count()} mods.");
 
     }
 
     }
translators
8,446

edits

Navigation menu