From 3ddc148597a0f9e94b1187e6f95a94c071ee62b6 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sun, 2 Jun 2024 00:44:29 +1000 Subject: Fix Dwarven Overlay showing incorrect rows if spacing between Commissions and Powder is disabled (#1169) --- .../github/moulberry/notenoughupdates/overlays/MiningOverlay.java | 2 +- .../notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java index adecb334..676a4f9b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java @@ -395,7 +395,7 @@ public class MiningOverlay extends TextTabOverlay { commissionProgress.put(split[0], progress); } catch (Exception ignored) { } - } else { + } else if (split[1].endsWith("DONE")) { commissionProgress.put(split[0], 1.0f); } } diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt index 2ec0b5d4..c9f1c60e 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt @@ -57,8 +57,10 @@ object TablistAPI { } if (list.isNotEmpty()) { - // Empty line, the widget ends here. - if (entry == "§r") { + // Empty line + // Or there is no spacing between two widgets + // The widget ends here. + if (entry == "§r" || entry.startsWith("§r§")) { break } -- cgit