diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-01-15 18:48:32 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-01-15 18:48:32 -0500 |
commit | 56ca0f5e81b22eafeaec2c51085a82bda1188121 (patch) | |
tree | 90e1a4dd8ec9d0f955936d03147d6930f2dc88f7 /src/SMAPI/Framework/SGame.cs | |
parent | 812251e7ae532d7a2f10d46ff366bf19e67e88d0 (diff) | |
download | SMAPI-56ca0f5e81b22eafeaec2c51085a82bda1188121.tar.gz SMAPI-56ca0f5e81b22eafeaec2c51085a82bda1188121.tar.bz2 SMAPI-56ca0f5e81b22eafeaec2c51085a82bda1188121.zip |
add split-screen info to multiplayer peer
Diffstat (limited to 'src/SMAPI/Framework/SGame.cs')
-rw-r--r-- | src/SMAPI/Framework/SGame.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs index 42a712ee..634680a0 100644 --- a/src/SMAPI/Framework/SGame.cs +++ b/src/SMAPI/Framework/SGame.cs @@ -81,6 +81,9 @@ namespace StardewModdingAPI.Framework /// <summary>Whether the game is creating the save file and SMAPI has already raised <see cref="IGameLoopEvents.SaveCreating"/>.</summary> public bool IsBetweenCreateEvents { get; set; } + /// <summary>The cached <see cref="Farmer.UniqueMultiplayerID"/> value for this instance's player.</summary> + public long? PlayerId { get; private set; } + /// <summary>Construct a content manager to read game content files.</summary> /// <remarks>This must be static because the game accesses it before the <see cref="SGame"/> constructor is called.</remarks> [NonInstancedStatic] @@ -167,6 +170,7 @@ namespace StardewModdingAPI.Framework try { this.OnUpdating(this, gameTime, () => base.Update(gameTime)); + this.PlayerId = Game1.player?.UniqueMultiplayerID; } finally { |