add IsLocalPlayer flag to player events

This commit is contained in:
Jesse Plamondon-Willard 2018-12-03 18:28:39 -05:00
parent aa4bc3015e
commit 94d5d8e106
No known key found for this signature in database
GPG Key ID: 7D7C8097B62033CE
4 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,7 @@
* For modders:
* Added ModDrop update keys (see [docs](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest#Update_checks)).
* Added `IsLocalPlayer` to new player events.
* Reloading a map asset will now update affected locations.
* Reloading the `Data\NPCDispositions` asset will now update affected NPCs.
* Fixed some map tilesheets not editable if not playing in English.

View File

@ -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

View File

@ -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

View File

@ -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;
/*********