aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-15 03:14:46 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-06-15 03:14:46 +0200
commit4b5890830b10ad40f6f75200ecd779242d2d25ba (patch)
tree518cfefeb065a29118bae42471c9182f6b00274a /src/main/java/at/hannibal2/skyhanni
parente0f3a5e3f5e1c0361d3f96ede45d7fe069d072d6 (diff)
downloadskyhanni-4b5890830b10ad40f6f75200ecd779242d2d25ba.tar.gz
skyhanni-4b5890830b10ad40f6f75200ecd779242d2d25ba.tar.bz2
skyhanni-4b5890830b10ad40f6f75200ecd779242d2d25ba.zip
formatting
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt49
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt7
2 files changed, 29 insertions, 27 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt
index e4a7578c5..b12490aaa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt
@@ -41,11 +41,11 @@ object HoppityCollectionStats {
private val patternGroup = ChocolateFactoryAPI.patternGroup.group("collection")
private val pagePattern by patternGroup.pattern(
"page.current",
- "\\((?<page>\\d+)/(?<maxPage>\\d+)\\) Hoppity's Collection"
+ "\\((?<page>\\d+)/(?<maxPage>\\d+)\\) Hoppity's Collection",
)
private val duplicatesFoundPattern by patternGroup.pattern(
"duplicates.found",
- "§7Duplicates Found: §a(?<duplicates>[\\d,]+)"
+ "§7Duplicates Found: §a(?<duplicates>[\\d,]+)",
)
/**
@@ -54,12 +54,12 @@ object HoppityCollectionStats {
*/
private val rabbitNotFoundPattern by patternGroup.pattern(
"rabbit.notfound",
- "(?:§.)+You (?:have not found this rabbit yet!|cannot find this rabbit until you)"
+ "(?:§.)+You (?:have not found this rabbit yet!|cannot find this rabbit until you)",
)
private val rabbitsFoundPattern by patternGroup.pattern(
"rabbits.found",
- "§.§l§m[ §a-z]+§r §.(?<current>[0-9]+)§./§.(?<total>[0-9]+)"
+ "§.§l§m[ §a-z]+§r §.(?<current>[0-9]+)§./§.(?<total>[0-9]+)",
)
/**
@@ -67,7 +67,7 @@ object HoppityCollectionStats {
*/
private val requirementMet by patternGroup.pattern(
"rabbit.requirement.met",
- "§a✔ §7Requirement"
+ "§a✔ §7Requirement",
)
/**
@@ -95,7 +95,7 @@ object HoppityCollectionStats {
*/
private val locationRequirementDescription by patternGroup.pattern(
"rabbit.requirement.location",
- "Find 15 unique egg locations in (the )?(?<location>.*)\\..*"
+ "Find 15 unique egg locations in (the )?(?<location>.*)\\..*",
)
private var display = emptyList<Renderable>()
@@ -148,7 +148,7 @@ object HoppityCollectionStats {
config.hoppityStatsPosition.renderRenderables(
display,
extraSpace = 5,
- posLabel = "Hoppity's Collection Stats"
+ posLabel = "Hoppity's Collection Stats",
)
}
@@ -176,17 +176,21 @@ object HoppityCollectionStats {
it.value.foundCount + "§7/§a" + it.value.requiredCount
}
- newList.add(Renderable.hoverTips(
- if (missingLocationRabbits.isEmpty())
- Renderable.wrappedString("§aFound enough eggs in all locations", width = 200)
- else
- Renderable.wrappedString(
- "§cMissing Locations§7:§c " +
- missingLocationRabbits.joinToString("§7, §c") {
- it.locationName
- }, width = 200),
- tips
- ))
+ newList.add(
+ Renderable.hoverTips(
+ if (missingLocationRabbits.isEmpty()) {
+ Renderable.wrappedString("§aFound enough eggs in all locations", width = 200)
+ } else {
+ Renderable.wrappedString(
+ "§cMissing Locations§7:§c " + missingLocationRabbits.joinToString("§7, §c") {
+ it.locationName
+ },
+ width = 200,
+ )
+ },
+ tips,
+ ),
+ )
}
private fun buildDisplay(event: InventoryFullyOpenedEvent): MutableList<Renderable> {
@@ -205,10 +209,9 @@ object HoppityCollectionStats {
newList.add(Renderable.string(""))
newList.add(
Renderable.wrappedString(
- "§cPlease Scroll through \n" +
- "§call pages!",
+ "§cPlease Scroll through \n" + "§call pages!",
width = 200,
- )
+ ),
)
}
return newList
@@ -276,8 +279,8 @@ object HoppityCollectionStats {
"§a$displayFound§7/§a$displayTotal",
displayTotal.toDouble(),
rarity.item,
- hover
- )
+ hover,
+ ),
)
}
return table
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt
index 9420676d5..d5542fdca 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt
@@ -117,9 +117,8 @@ object HoppityEggsCompactChat {
}
}
- fun clickableCompact(onClick: () -> Unit): Boolean = if (hoppityEggChat.size > 0) {
- val hover = hoppityEggChat.joinToString("\n") +
- " \n§eClick here to share the location of this chocolate egg with the server!"
+ fun clickableCompact(onClick: () -> Unit): Boolean = if (hoppityEggChat.isNotEmpty()) {
+ val hover = hoppityEggChat.joinToString("\n") + " \n§eClick here to share the location of this chocolate egg with the server!"
hoppityEggChat.clear()
ChatUtils.clickableChat(
createCompactMessage(),
@@ -127,7 +126,7 @@ object HoppityEggsCompactChat {
onClick = onClick,
expireAt = 30.seconds.fromNow(),
oneTimeClick = true,
- prefix = false
+ prefix = false,
)
true
} else false