add IsCurrentLocation event arg to World events

This commit is contained in:
Jesse Plamondon-Willard 2018-12-29 18:31:23 -05:00
parent 3a5356b039
commit dae12c16e5
No known key found for this signature in database
GPG Key ID: 7D7C8097B62033CE
7 changed files with 20 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# Release notes
# Release notes
## Upcoming release
* For players:
* Added `world_clear` console command to remove spawned or placed entities.
@ -9,6 +9,7 @@
* Added new [events](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Events):
* `GameLoop.OneSecondUpdateTicking` and `OneSecondUpdateTicked`;
* `Specialised.LoadStageChanged`.
* Added `e.IsCurrentLocation` event arg to `World` events.
* You can now use `helper.Data.Read/WriteSaveData` as soon as the save is loaded (instead of once the world is initialised).
* For the web UI:

View File

@ -21,6 +21,9 @@ namespace StardewModdingAPI.Events
/// <summary>The buildings removed from the location.</summary>
public IEnumerable<Building> Removed { get; }
/// <summary>Whether this is the location containing the local player.</summary>
public bool IsCurrentLocation => object.ReferenceEquals(this.Location, Game1.player?.currentLocation);
/*********
** Public methods

View File

@ -20,6 +20,9 @@ namespace StardewModdingAPI.Events
/// <summary>The debris removed from the location.</summary>
public IEnumerable<Debris> Removed { get; }
/// <summary>Whether this is the location containing the local player.</summary>
public bool IsCurrentLocation => object.ReferenceEquals(this.Location, Game1.player?.currentLocation);
/*********
** Public methods

View File

@ -21,6 +21,9 @@ namespace StardewModdingAPI.Events
/// <summary>The large terrain features removed from the location.</summary>
public IEnumerable<LargeTerrainFeature> Removed { get; }
/// <summary>Whether this is the location containing the local player.</summary>
public bool IsCurrentLocation => object.ReferenceEquals(this.Location, Game1.player?.currentLocation);
/*********
** Public methods

View File

@ -20,6 +20,9 @@ namespace StardewModdingAPI.Events
/// <summary>The NPCs removed from the location.</summary>
public IEnumerable<NPC> Removed { get; }
/// <summary>Whether this is the location containing the local player.</summary>
public bool IsCurrentLocation => object.ReferenceEquals(this.Location, Game1.player?.currentLocation);
/*********
** Public methods

View File

@ -22,6 +22,9 @@ namespace StardewModdingAPI.Events
/// <summary>The objects removed from the location.</summary>
public IEnumerable<KeyValuePair<Vector2, Object>> Removed { get; }
/// <summary>Whether this is the location containing the local player.</summary>
public bool IsCurrentLocation => object.ReferenceEquals(this.Location, Game1.player?.currentLocation);
/*********
** Public methods

View File

@ -22,6 +22,9 @@ namespace StardewModdingAPI.Events
/// <summary>The terrain features removed from the location.</summary>
public IEnumerable<KeyValuePair<Vector2, TerrainFeature>> Removed { get; }
/// <summary>Whether this is the location containing the local player.</summary>
public bool IsCurrentLocation => object.ReferenceEquals(this.Location, Game1.player?.currentLocation);
/*********
** Public methods