diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-27 18:09:04 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-27 18:09:04 -0400 |
commit | 0209e70695b6d12692d4de554ce1fc9d65ca4715 (patch) | |
tree | 011867d845ee3cf2a88f306504a4bdd6fe414ed6 /src/SMAPI/Framework/WatcherCore.cs | |
parent | 2ab2182645179129997eac3fccb63f6f0683dbe1 (diff) | |
parent | e4cd7c8eb09fa50802ce4eb9dbe4683ce61f7a5d (diff) | |
download | SMAPI-0209e70695b6d12692d4de554ce1fc9d65ca4715.tar.gz SMAPI-0209e70695b6d12692d4de554ce1fc9d65ca4715.tar.bz2 SMAPI-0209e70695b6d12692d4de554ce1fc9d65ca4715.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/WatcherCore.cs')
-rw-r--r-- | src/SMAPI/Framework/WatcherCore.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/SMAPI/Framework/WatcherCore.cs b/src/SMAPI/Framework/WatcherCore.cs index 5e20ac7b..35f27cc7 100644 --- a/src/SMAPI/Framework/WatcherCore.cs +++ b/src/SMAPI/Framework/WatcherCore.cs @@ -60,14 +60,14 @@ namespace StardewModdingAPI.Framework public WatcherCore(SInputState inputState, ObservableCollection<GameLocation> gameLocations) { // init watchers - this.CursorWatcher = WatcherFactory.ForEquatable(() => inputState.CursorPosition); - 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.CursorWatcher = WatcherFactory.ForEquatable(nameof(inputState.CursorPosition), () => inputState.CursorPosition); + this.MouseWheelScrollWatcher = WatcherFactory.ForEquatable(nameof(inputState.MouseState.ScrollWheelValue), () => inputState.MouseState.ScrollWheelValue); + this.SaveIdWatcher = WatcherFactory.ForEquatable(nameof(Game1.uniqueIDForThisGame), () => Game1.hasLoadedGame ? Game1.uniqueIDForThisGame : 0); + this.WindowSizeWatcher = WatcherFactory.ForEquatable(nameof(Game1.viewport), () => new Point(Game1.viewport.Width, Game1.viewport.Height)); + this.TimeWatcher = WatcherFactory.ForEquatable(nameof(Game1.timeOfDay), () => Game1.timeOfDay); + this.ActiveMenuWatcher = WatcherFactory.ForReference(nameof(Game1.activeClickableMenu), () => Game1.activeClickableMenu); this.LocationsWatcher = new WorldLocationsTracker(gameLocations, MineShaft.activeMines, VolcanoDungeon.activeLevels); - this.LocaleWatcher = WatcherFactory.ForGenericEquality(() => LocalizedContentManager.CurrentLanguageCode); + this.LocaleWatcher = WatcherFactory.ForGenericEquality(nameof(LocalizedContentManager.CurrentLanguageCode), () => LocalizedContentManager.CurrentLanguageCode); this.Watchers.AddRange(new IWatcher[] { this.CursorWatcher, |