summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-03 18:28:39 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-04 23:49:08 -0500
commit94d5d8e106aea9cf2d2808e6ba77ae0174cd9b96 (patch)
tree0c537571d99120bfc126d1a5f34e15a40bfa239d /src
parentaa4bc3015e7a819458404d9771b0468596465112 (diff)
downloadSMAPI-94d5d8e106aea9cf2d2808e6ba77ae0174cd9b96.tar.gz
SMAPI-94d5d8e106aea9cf2d2808e6ba77ae0174cd9b96.tar.bz2
SMAPI-94d5d8e106aea9cf2d2808e6ba77ae0174cd9b96.zip
add IsLocalPlayer flag to player events
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Events/InventoryChangedEventArgs.cs3
-rw-r--r--src/SMAPI/Events/LevelChangedEventArgs.cs3
-rw-r--r--src/SMAPI/Events/WarpedEventArgs.cs3
3 files changed, 9 insertions, 0 deletions
diff --git a/src/SMAPI/Events/InventoryChangedEventArgs.cs b/src/SMAPI/Events/InventoryChangedEventArgs.cs
index 1b22af8d..874c2e48 100644
--- a/src/SMAPI/Events/InventoryChangedEventArgs.cs
+++ b/src/SMAPI/Events/InventoryChangedEventArgs.cs
@@ -23,6 +23,9 @@ namespace StardewModdingAPI.Events
/// <summary>The items whose stack sizes changed, with the relative change.</summary>
public IEnumerable<ItemStackSizeChange> QuantityChanged { get; }
+ /// <summary>Whether the affected player is the local one.</summary>
+ public bool IsLocalPlayer => this.Player.IsLocalPlayer;
+
/*********
** Public methods
diff --git a/src/SMAPI/Events/LevelChangedEventArgs.cs b/src/SMAPI/Events/LevelChangedEventArgs.cs
index a0a761c4..c7303603 100644
--- a/src/SMAPI/Events/LevelChangedEventArgs.cs
+++ b/src/SMAPI/Events/LevelChangedEventArgs.cs
@@ -22,6 +22,9 @@ namespace StardewModdingAPI.Events
/// <summary>The new skill level.</summary>
public int NewLevel { get; }
+ /// <summary>Whether the affected player is the local one.</summary>
+ public bool IsLocalPlayer => this.Player.IsLocalPlayer;
+
/*********
** Public methods
diff --git a/src/SMAPI/Events/WarpedEventArgs.cs b/src/SMAPI/Events/WarpedEventArgs.cs
index cb7ff204..95c53ad9 100644
--- a/src/SMAPI/Events/WarpedEventArgs.cs
+++ b/src/SMAPI/Events/WarpedEventArgs.cs
@@ -18,6 +18,9 @@ namespace StardewModdingAPI.Events
/// <summary>The player's current location.</summary>
public GameLocation NewLocation { get; }
+ /// <summary>Whether the affected player is the local one.</summary>
+ public bool IsLocalPlayer => this.Player.IsLocalPlayer;
+
/*********