diff --git a/SDVModTest/UIElements/ExperienceBar.cs b/SDVModTest/UIElements/ExperienceBar.cs index c86e7d9..1d85ade 100644 --- a/SDVModTest/UIElements/ExperienceBar.cs +++ b/SDVModTest/UIElements/ExperienceBar.cs @@ -62,14 +62,14 @@ namespace UIInfoSuite.UIElements } _timeToDisappear.Elapsed += StopTimerAndFadeBarOut; GraphicsEvents.OnPreRenderHudEvent += OnPreRenderHudEvent; - LocationEvents.CurrentLocationChanged += RemoveAllExperiencePointDisplays; + PlayerEvents.Warped += RemoveAllExperiencePointDisplays; } public void Dispose() { PlayerEvents.LeveledUp -= OnLevelUp; GraphicsEvents.OnPreRenderHudEvent -= OnPreRenderHudEvent; - LocationEvents.CurrentLocationChanged -= RemoveAllExperiencePointDisplays; + PlayerEvents.Warped -= RemoveAllExperiencePointDisplays; _timeToDisappear.Stop(); _timeToDisappear.Dispose(); } @@ -98,12 +98,12 @@ namespace UIInfoSuite.UIElements public void ToggleShowExperienceBar(bool showExperienceBar) { //GraphicsEvents.OnPreRenderHudEvent -= OnPreRenderHudEvent; - //LocationEvents.CurrentLocationChanged -= RemoveAllExperiencePointDisplays; + //PlayerEvents.Warped -= RemoveAllExperiencePointDisplays; _showExperienceBar = showExperienceBar; //if (showExperienceBar) //{ // GraphicsEvents.OnPreRenderHudEvent += OnPreRenderHudEvent; - // LocationEvents.CurrentLocationChanged += RemoveAllExperiencePointDisplays; + // PlayerEvents.Warped += RemoveAllExperiencePointDisplays; //} } @@ -161,7 +161,7 @@ namespace UIInfoSuite.UIElements _experienceBarShouldBeVisible = false; } - private void RemoveAllExperiencePointDisplays(object sender, EventArgsCurrentLocationChanged e) + private void RemoveAllExperiencePointDisplays(object sender, EventArgsPlayerWarped e) { _experiencePointDisplays.Clear(); } diff --git a/SDVModTest/UIElements/LuckOfDay.cs b/SDVModTest/UIElements/LuckOfDay.cs index 44065c9..b382b3b 100644 --- a/SDVModTest/UIElements/LuckOfDay.cs +++ b/SDVModTest/UIElements/LuckOfDay.cs @@ -21,7 +21,7 @@ namespace UIInfoSuite.UIElements public void Toggle(bool showLuckOfDay) { - LocationEvents.CurrentLocationChanged -= AdjustIconXToBlackBorder; + PlayerEvents.Warped -= AdjustIconXToBlackBorder; GraphicsEvents.OnPreRenderHudEvent -= DrawDiceIcon; GraphicsEvents.OnPostRenderHudEvent -= DrawHoverTextOverEverything; GameEvents.HalfSecondTick -= CalculateLuck; @@ -29,7 +29,7 @@ namespace UIInfoSuite.UIElements if (showLuckOfDay) { AdjustIconXToBlackBorder(null, null); - LocationEvents.CurrentLocationChanged += AdjustIconXToBlackBorder; + PlayerEvents.Warped += AdjustIconXToBlackBorder; GameEvents.HalfSecondTick += CalculateLuck; GraphicsEvents.OnPreRenderHudEvent += DrawDiceIcon; GraphicsEvents.OnPostRenderHudEvent += DrawHoverTextOverEverything; @@ -93,7 +93,7 @@ namespace UIInfoSuite.UIElements } } - private void AdjustIconXToBlackBorder(object sender, EventArgsCurrentLocationChanged e) + private void AdjustIconXToBlackBorder(object sender, EventArgsPlayerWarped e) { _icon = new ClickableTextureComponent("", new Rectangle(Tools.GetWidthInPlayArea() - 134, diff --git a/SDVModTest/UIElements/ShowWhenAnimalNeedsPet.cs b/SDVModTest/UIElements/ShowWhenAnimalNeedsPet.cs index 40eea10..0ee7796 100644 --- a/SDVModTest/UIElements/ShowWhenAnimalNeedsPet.cs +++ b/SDVModTest/UIElements/ShowWhenAnimalNeedsPet.cs @@ -33,13 +33,13 @@ namespace UIInfoSuite.UIElements public void ToggleOption(bool showWhenAnimalNeedsPet) { _timer.Stop(); - LocationEvents.CurrentLocationChanged -= OnLocationChange; + PlayerEvents.Warped -= OnLocationChange; GraphicsEvents.OnPreRenderHudEvent -= DrawAnimalHasProduct; if (showWhenAnimalNeedsPet) { _timer.Start(); - LocationEvents.CurrentLocationChanged += OnLocationChange; + PlayerEvents.Warped += OnLocationChange; GraphicsEvents.OnPreRenderHudEvent += DrawAnimalHasProduct; } } @@ -95,7 +95,7 @@ namespace UIInfoSuite.UIElements } } - private void OnLocationChange(object sender, EventArgsCurrentLocationChanged e) + private void OnLocationChange(object sender, EventArgsPlayerWarped e) { if (e.NewLocation is AnimalHouse || e.NewLocation is Farm) diff --git a/SDVModTest/manifest.json b/SDVModTest/manifest.json index 33ba09e..44648d1 100644 --- a/SDVModTest/manifest.json +++ b/SDVModTest/manifest.json @@ -1,12 +1,7 @@ { "Name": "UI Info Suite", "Author": "Cdaragorn", - "Version": { - "MajorVersion": 1, - "MinorVersion": 7, - "PatchVersion": 1, - "Build": null - }, + "Version": "1.7.2", "Description": "Adds a lot of useful information to the user interface. This is based on Demiacle's excellent UIModSuite.", "UniqueID": "Cdaragorn.UiInfoSuite", "EntryDll": "UIInfoSuite.dll",