From 3853e07c3f74659c0f27d21e7ac19d0b7a9a538e Mon Sep 17 00:00:00 2001 From: SteveBenz Date: Thu, 12 Dec 2024 18:55:41 -0800 Subject: [PATCH] Fix a bug where hover-text isn't shown for indoor pots when they are placed on flooring --- .../UIElements/ShowCropAndBarrelTime.cs | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs b/UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs index 8a71f836..8765da7f 100644 --- a/UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs +++ b/UIInfoSuite2/UIElements/ShowCropAndBarrelTime.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -111,20 +111,17 @@ private void OnUpdateTicked(object? sender, UpdateTickedEventArgs e) _currentTerrain.Value = terrain; } - // Make sure that _terrain is null before overwriting it because Tea Saplings are added to terrainFeatures and not IndoorPot.bush - if (_currentTerrain.Value != null || _currentTile.Value is not IndoorPot pot) + if (_currentTile.Value is IndoorPot pot) { - return; - } - - if (pot.hoeDirt.Value != null) - { - _currentTerrain.Value = pot.hoeDirt.Value; - } + if (pot.hoeDirt.Value != null) + { + _currentTerrain.Value = pot.hoeDirt.Value; + } - if (pot.bush.Value != null) - { - _currentTerrain.Value = pot.bush.Value; + if (pot.bush.Value != null) + { + _currentTerrain.Value = pot.bush.Value; + } } }