diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-21 13:02:22 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-21 13:02:22 +0100 |
commit | 2fbd2295a7ab9efeb8f388daec10789c06a7f93c (patch) | |
tree | 8f2ae2098dc5fb9c65ab778f4244f4fe24129a26 /src/main/java/at | |
parent | 4083660296151f58fab0f0ec3a7a929f32d6448b (diff) | |
download | skyhanni-2fbd2295a7ab9efeb8f388daec10789c06a7f93c.tar.gz skyhanni-2fbd2295a7ab9efeb8f388daec10789c06a7f93c.tar.bz2 skyhanni-2fbd2295a7ab9efeb8f388daec10789c06a7f93c.zip |
code cleanup
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt index 04630838e..dbddf3af5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt @@ -140,10 +140,10 @@ object ComposterOverlay { if (!inComposterUpgrades) return update() for (upgrade in ComposterUpgrade.entries) { - event.itemStack.name?.let { + event.itemStack.name?.let { if (it.contains(upgrade.displayName)) { maxLevel = ComposterUpgrade.regex.matchMatcher(it) { - group("level")?.romanToDecimalIfNecessary() ?: 0 + group("level")?.romanToDecimalIfNecessary() ?: 0 } == 25 extraComposterUpgrade = upgrade update() @@ -179,8 +179,9 @@ object ComposterOverlay { ) return } - if (currentOrganicMatterItem.let { it !in organicMatterFactors.keys && it != NONE }) currentOrganicMatterItem = - NONE + if (currentOrganicMatterItem.let { it !in organicMatterFactors.keys && it != NONE }) { + currentOrganicMatterItem = NONE + } if (currentFuelItem.let { it !in fuelFactors.keys && it != NONE }) currentFuelItem = NONE if (inComposter) { @@ -336,7 +337,6 @@ object ComposterOverlay { if (currentTimeType == TimeType.COMPOST) "Compost multiplier" else "Composts per $timeText" newList.addAsSingletonList(" §7$compostPerTitle: §e${multiplier.round(2)}$compostPerTitlePreview") - val organicMatterPrice = getPrice(organicMatterItem) val organicMatterFactor = organicMatterFactors[organicMatterItem]!! @@ -364,7 +364,6 @@ object ComposterOverlay { " §7Material costs per $timeText: §6${NumberUtil.format(totalCost)}$materialCostFormatPreview" newList.addAsSingletonList(materialCostFormat) - val priceCompost = getPrice("COMPOST") val profit = ((priceCompost * multiDropFactor) - (fuelPricePer + organicMatterPricePer)) * timeMultiplier val profitPreview = @@ -463,7 +462,7 @@ object ComposterOverlay { val name = itemName.substring(0, 2) + selected + rawItemName list.add(Renderable.link("$name §8x${itemsNeeded.addSeparators()} §7(§6$format§7)") { onClick(internalName) - if (KeyboardManager.isModifierKeyDown() && lastAttemptTime.passedSince() > 500.milliseconds) { + if (KeyboardManager.isModifierKeyDown() && lastAttemptTime.passedSince() > 500.milliseconds) { lastAttemptTime = SimpleTimeMark.now() retrieveMaterials(internalName, itemName, itemsNeeded.toInt()) } |