From fc18fe2c36de492ca045fc701433e4bdc8054e6f Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 5 Feb 2023 18:36:42 +0100 Subject: Code cleanup. --- .../java/at/hannibal2/skyhanni/features/minion/MinionCraftHelper.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionCraftHelper.kt index 3181141fd..898c7f34c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionCraftHelper.kt @@ -130,11 +130,9 @@ class MinionCraftHelper { } private fun String.addOneToId(): String { - val split = split("_") - val lastText = split.last() + val lastText = split("_").last() val next = lastText.toInt() + 1 - val result = replace(lastText, "" + next) - return result + return replace(lastText, "" + next) } private fun getMultiplier(rawId: String): Pair { -- cgit