aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/bingo
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-08 03:01:50 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-08 03:01:50 +0200
commit7b84e7782e63d85bf17a4f9c3d66af5681eecf90 (patch)
treeeb5d8ff9a896ef6c5cbbb614d72fe8032e16210c /src/main/java/at/hannibal2/skyhanni/features/bingo
parent7b6aac3ea8b7aebaef104097b0ac7767b27f4c80 (diff)
downloadskyhanni-7b84e7782e63d85bf17a4f9c3d66af5681eecf90.tar.gz
skyhanni-7b84e7782e63d85bf17a4f9c3d66af5681eecf90.tar.bz2
skyhanni-7b84e7782e63d85bf17a4f9c3d66af5681eecf90.zip
code cleanup some utils classes
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/bingo')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ChatMessageStep.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CraftStep.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ProgressionStep.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/SkillLevelStep.kt2
6 files changed, 12 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
index f37aeb7f6..01f4cbe0b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt
@@ -22,9 +22,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class BingoCardDisplay {
- private val MAX_PERSONAL_GOALS = 20
- private val MAX_COMMUNITY_GOALS = 5
-
private var display = emptyList<String>()
private val goalCompletePattern = "§6§lBINGO GOAL COMPLETE! §r§e(?<name>.*)".toPattern()
@@ -33,6 +30,9 @@ class BingoCardDisplay {
}
companion object {
+ private const val MAX_PERSONAL_GOALS = 20
+ private const val MAX_COMMUNITY_GOALS = 5
+
private val config get() = SkyHanniMod.feature.bingo.bingoCard
private var displayMode = 0
val personalGoals = mutableListOf<PersonalGoal>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
index fa20cf268..61a6390a6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
@@ -121,7 +121,7 @@ class BingoNextStepHelper {
}
}
- var nextMessageIsCrystal = false
+ private var nextMessageIsCrystal = false
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
@@ -278,7 +278,7 @@ class BingoNextStepHelper {
return null
}
- fun <T : NextStep> T.makeFinalStep(): T {
+ private fun <T : NextStep> T.makeFinalStep(): T {
finalSteps.add(this)
return this
}
@@ -299,12 +299,12 @@ class BingoNextStepHelper {
}
}
- infix fun <T : NextStep> T.withItemIslandRequirement(itemName: String): T {
+ private infix fun <T : NextStep> T.withItemIslandRequirement(itemName: String): T {
itemIslandRequired[itemName]?.let { this requires it }
return this
}
- infix fun <T : NextStep> T.requires(other: NextStep): T {
+ private infix fun <T : NextStep> T.requires(other: NextStep): T {
requirements.add(other)
return this
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ChatMessageStep.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ChatMessageStep.kt
index 43dfcbcb3..021ef5f73 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ChatMessageStep.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ChatMessageStep.kt
@@ -1,4 +1,4 @@
package at.hannibal2.skyhanni.features.bingo.nextstep
-class ChatMessageStep(displayName: String): NextStep(displayName)
+class ChatMessageStep(displayName: String) : NextStep(displayName)
class ObtainCrystalStep(val crystalName: String) : NextStep("Obtain a $crystalName Crystal")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CraftStep.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CraftStep.kt
index 5b7890072..4c20494b0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CraftStep.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/CraftStep.kt
@@ -1,3 +1,3 @@
package at.hannibal2.skyhanni.features.bingo.nextstep
-class CraftStep(val itemName: String): NextStep("Craft $itemName") \ No newline at end of file
+class CraftStep(val itemName: String) : NextStep("Craft $itemName") \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ProgressionStep.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ProgressionStep.kt
index 5ef777ca1..2d19438d5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ProgressionStep.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/ProgressionStep.kt
@@ -1,3 +1,4 @@
package at.hannibal2.skyhanni.features.bingo.nextstep
-abstract class ProgressionStep(displayName: String, open val amountNeeded: Long, var amountHaving: Long = 0): NextStep(displayName) \ No newline at end of file
+abstract class ProgressionStep(displayName: String, open val amountNeeded: Long, var amountHaving: Long = 0) :
+ NextStep(displayName) \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/SkillLevelStep.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/SkillLevelStep.kt
index d9ac1bbef..48767e8d9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/SkillLevelStep.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/nextstep/SkillLevelStep.kt
@@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.data.SkillExperience
class SkillLevelStep(
val skillName: String,
- val skillLevelNeeded: Int,
+ private val skillLevelNeeded: Int,
skillExpNeeded: Long = SkillExperience.getExpForLevel(skillLevelNeeded)
) :
ProgressionStep("$skillName $skillLevelNeeded", skillExpNeeded) \ No newline at end of file