From a0b6159df8e5e8927f83e366e1ea06deadd7d93d Mon Sep 17 00:00:00 2001 From: Mohammad Shoaib Date: Fri, 15 Apr 2022 14:49:40 +0530 Subject: [PATCH] Fixed bug --- stardew-access/Features/TileInfo.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/stardew-access/Features/TileInfo.cs b/stardew-access/Features/TileInfo.cs index 1fb346f..655a535 100644 --- a/stardew-access/Features/TileInfo.cs +++ b/stardew-access/Features/TileInfo.cs @@ -858,14 +858,16 @@ namespace stardew_access.Features string toSpeak = $"Parrot required nuts {perch.requiredNuts.Value}"; - if (perch.currentState == StardewValley.BellsAndWhistles.ParrotUpgradePerch.UpgradeState.Complete) - return $"Request Completed"; - else if (perch.currentState == StardewValley.BellsAndWhistles.ParrotUpgradePerch.UpgradeState.Idle) + if (!perch.IsAvailable()) + return "Empty parrot perch"; + else if (perch.currentState.Value == StardewValley.BellsAndWhistles.ParrotUpgradePerch.UpgradeState.Idle) return toSpeak; - else if (perch.currentState == StardewValley.BellsAndWhistles.ParrotUpgradePerch.UpgradeState.StartBuilding) + else if (perch.currentState.Value == StardewValley.BellsAndWhistles.ParrotUpgradePerch.UpgradeState.StartBuilding) return "Parrots started building request"; - else if (perch.currentState == StardewValley.BellsAndWhistles.ParrotUpgradePerch.UpgradeState.Building) + else if (perch.currentState.Value == StardewValley.BellsAndWhistles.ParrotUpgradePerch.UpgradeState.Building) return "Parrots building request"; + else if (perch.currentState.Value == StardewValley.BellsAndWhistles.ParrotUpgradePerch.UpgradeState.Complete) + return $"Request Completed"; else return toSpeak; }