diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-09-07 13:06:27 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-09-07 13:06:27 -0400 |
commit | 5e43bdbf5cd6dbab36c25287c85d42ccfeea2c83 (patch) | |
tree | 0a42305174eb84561a584549cd685c5e95670f36 /src/SMAPI/Framework/WatcherCore.cs | |
parent | 8da88b8fe5b41739c5cd0df3280b9770fc7f10a4 (diff) | |
parent | f9fac11028354f15d786d5b854608edb10716f79 (diff) | |
download | SMAPI-5e43bdbf5cd6dbab36c25287c85d42ccfeea2c83.tar.gz SMAPI-5e43bdbf5cd6dbab36c25287c85d42ccfeea2c83.tar.bz2 SMAPI-5e43bdbf5cd6dbab36c25287c85d42ccfeea2c83.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/WatcherCore.cs')
-rw-r--r-- | src/SMAPI/Framework/WatcherCore.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/WatcherCore.cs b/src/SMAPI/Framework/WatcherCore.cs index c89efa44..393f6a37 100644 --- a/src/SMAPI/Framework/WatcherCore.cs +++ b/src/SMAPI/Framework/WatcherCore.cs @@ -56,16 +56,17 @@ namespace StardewModdingAPI.Framework *********/ /// <summary>Construct an instance.</summary> /// <param name="inputState">Manages input visible to the game.</param> - public WatcherCore(SInputState inputState) + /// <param name="gameLocations">The observable list of game locations.</param> + public WatcherCore(SInputState inputState, ObservableCollection<GameLocation> gameLocations) { // init watchers this.CursorWatcher = WatcherFactory.ForEquatable(() => inputState.CursorPosition); - this.MouseWheelScrollWatcher = WatcherFactory.ForEquatable(() => inputState.LastMouse.ScrollWheelValue); + this.MouseWheelScrollWatcher = WatcherFactory.ForEquatable(() => inputState.MouseState.ScrollWheelValue); this.SaveIdWatcher = WatcherFactory.ForEquatable(() => Game1.hasLoadedGame ? Game1.uniqueIDForThisGame : 0); this.WindowSizeWatcher = WatcherFactory.ForEquatable(() => new Point(Game1.viewport.Width, Game1.viewport.Height)); this.TimeWatcher = WatcherFactory.ForEquatable(() => Game1.timeOfDay); this.ActiveMenuWatcher = WatcherFactory.ForReference(() => Game1.activeClickableMenu); - this.LocationsWatcher = new WorldLocationsTracker((ObservableCollection<GameLocation>)Game1.locations, MineShaft.activeMines); + this.LocationsWatcher = new WorldLocationsTracker(gameLocations, MineShaft.activeMines); this.LocaleWatcher = WatcherFactory.ForGenericEquality(() => LocalizedContentManager.CurrentLanguageCode); this.Watchers.AddRange(new IWatcher[] { |