summaryrefslogtreecommitdiff
path: root/src/SMAPI/IMultiplayerPeer.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-11-19 13:48:19 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-11-19 13:48:19 -0500
commit593723b7940ba72a786fc4c7366c56f9813d977b (patch)
tree4d23fbef5bc5a20115f10ca04ae3379df78cc8e1 /src/SMAPI/IMultiplayerPeer.cs
parent4f28ea33bd7cc65485402c5e85259083e86b49e1 (diff)
parent3dc27a5681dcfc4ae30e95570d9966f2e14a4dd7 (diff)
downloadSMAPI-593723b7940ba72a786fc4c7366c56f9813d977b.tar.gz
SMAPI-593723b7940ba72a786fc4c7366c56f9813d977b.tar.bz2
SMAPI-593723b7940ba72a786fc4c7366c56f9813d977b.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/IMultiplayerPeer.cs')
-rw-r--r--src/SMAPI/IMultiplayerPeer.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/SMAPI/IMultiplayerPeer.cs b/src/SMAPI/IMultiplayerPeer.cs
new file mode 100644
index 00000000..0d4d3261
--- /dev/null
+++ b/src/SMAPI/IMultiplayerPeer.cs
@@ -0,0 +1,41 @@
+using System.Collections.Generic;
+
+namespace StardewModdingAPI
+{
+ /// <summary>Metadata about a connected player.</summary>
+ public interface IMultiplayerPeer
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The player's unique ID.</summary>
+ long PlayerID { get; }
+
+ /// <summary>Whether this is a connection to the host player.</summary>
+ bool IsHost { get; }
+
+ /// <summary>Whether the player has SMAPI installed.</summary>
+ bool HasSmapi { get; }
+
+ /// <summary>The player's OS platform, if <see cref="HasSmapi"/> is true.</summary>
+ GamePlatform? Platform { get; }
+
+ /// <summary>The installed version of Stardew Valley, if <see cref="HasSmapi"/> is true.</summary>
+ ISemanticVersion GameVersion { get; }
+
+ /// <summary>The installed version of SMAPI, if <see cref="HasSmapi"/> is true.</summary>
+ ISemanticVersion ApiVersion { get; }
+
+ /// <summary>The installed mods, if <see cref="HasSmapi"/> is true.</summary>
+ IEnumerable<IMultiplayerPeerMod> Mods { get; }
+
+
+ /*********
+ ** Methods
+ *********/
+ /// <summary>Get metadata for a mod installed by the player.</summary>
+ /// <param name="id">The unique mod ID.</param>
+ /// <returns>Returns the mod info, or <c>null</c> if the player doesn't have that mod.</returns>
+ IMultiplayerPeerMod GetMod(string id);
+ }
+}