Skip to content

Commit

Permalink
Show the price more compact for money per hour (default disabled)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Mar 23, 2023
1 parent d6e6f54 commit d660e6e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,13 @@ public class Garden {
@ConfigEditorBoolean
@ConfigAccordionId(id = 13)
public boolean moneyPerHourCompact = false;
@Expose
@ConfigOption(
name = "Compact Price",
desc = "Show the price more compact.")
@ConfigEditorBoolean
@ConfigAccordionId(id = 13)
public boolean moneyPerHourCompactPrice = false;

@Expose
@ConfigOption(name = "Money per hour Position", desc = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.sortedDesc
import at.hannibal2.skyhanni.utils.NEUItems
import at.hannibal2.skyhanni.utils.NumberUtil
import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import io.github.moulberry.notenoughupdates.NotEnoughUpdates
Expand Down Expand Up @@ -114,7 +115,12 @@ class CropMoneyDisplay {
list.add("$currentColor$contestFormat$itemName§7: ")
}

val format = LorenzUtils.formatInteger(moneyPerHour.toLong())

val format = if (config.moneyPerHourCompactPrice) {
NumberUtil.format(moneyPerHour)
} else {
LorenzUtils.formatInteger(moneyPerHour.toLong())
}
list.add("§6$format")

newDisplay.add(list)
Expand Down

0 comments on commit d660e6e

Please sign in to comment.