diff options
author | Lulonaut <lulonaut@lulonaut.tech> | 2023-09-27 13:20:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 21:20:32 +1000 |
commit | 92f71a39fcf82fe9231d3bafbc550c76a63109a7 (patch) | |
tree | 85d800feef7e33332a794a451152aff1adb7401a /src/main/kotlin | |
parent | c41f5adb3977d8d60944c548fa2b456587256f5f (diff) | |
download | NotEnoughUpdates-92f71a39fcf82fe9231d3bafbc550c76a63109a7.tar.gz NotEnoughUpdates-92f71a39fcf82fe9231d3bafbc550c76a63109a7.tar.bz2 NotEnoughUpdates-92f71a39fcf82fe9231d3bafbc550c76a63109a7.zip |
Fix museum overlay crash and bestiary page not refreshing on profile switch (#822)
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/inventory/MuseumCheapestItemOverlay.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/inventory/MuseumCheapestItemOverlay.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/inventory/MuseumCheapestItemOverlay.kt index 8a711230..e968a4c7 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/inventory/MuseumCheapestItemOverlay.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/inventory/MuseumCheapestItemOverlay.kt @@ -412,7 +412,10 @@ object MuseumCheapestItemOverlay { tooltip.add("") } - if (NotEnoughUpdates.INSTANCE.manager.getRecipesFor(line.internalNames[0]).isNotEmpty()) { + if (line.internalNames.isEmpty()) { + tooltip.add("${EnumChatFormatting.RED}Could not determine item!") + } + else if (NotEnoughUpdates.INSTANCE.manager.getRecipesFor(line.internalNames[0]).isNotEmpty()) { tooltip.add("${EnumChatFormatting.YELLOW}${EnumChatFormatting.BOLD}Click to open recipe!") } else { tooltip.add("${EnumChatFormatting.RED}${EnumChatFormatting.BOLD}No recipe available!") |