diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-31 17:29:32 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-31 17:29:32 -0400 |
commit | e5e4ce411cc5a5e5066552978517904b21900066 (patch) | |
tree | 66f9d33d37fbe3cc12f13581490411da0b30357f /src/SMAPI/Framework/Networking/MultiplayerPeerMod.cs | |
parent | 688ee69ee64e03aee7a693e6c15092daf229ac5e (diff) | |
download | SMAPI-e5e4ce411cc5a5e5066552978517904b21900066.tar.gz SMAPI-e5e4ce411cc5a5e5066552978517904b21900066.tar.bz2 SMAPI-e5e4ce411cc5a5e5066552978517904b21900066.zip |
sync SMAPI context between players in multiplayer (#480)
Diffstat (limited to 'src/SMAPI/Framework/Networking/MultiplayerPeerMod.cs')
-rw-r--r-- | src/SMAPI/Framework/Networking/MultiplayerPeerMod.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/Networking/MultiplayerPeerMod.cs b/src/SMAPI/Framework/Networking/MultiplayerPeerMod.cs new file mode 100644 index 00000000..1b324bcd --- /dev/null +++ b/src/SMAPI/Framework/Networking/MultiplayerPeerMod.cs @@ -0,0 +1,30 @@ +namespace StardewModdingAPI.Framework.Networking +{ + internal class MultiplayerPeerMod : IMultiplayerPeerMod + { + /********* + ** Accessors + *********/ + /// <summary>The mod's display name.</summary> + public string Name { get; } + + /// <summary>The unique mod ID.</summary> + public string ID { get; } + + /// <summary>The mod version.</summary> + public ISemanticVersion Version { get; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="mod">The mod metadata.</param> + public MultiplayerPeerMod(RemoteContextModModel mod) + { + this.Name = mod.Name; + this.ID = mod.ID?.Trim(); + this.Version = mod.Version; + } + } +} |