From 4a12bbd0b780238557cdc2330cf6314015e0de07 Mon Sep 17 00:00:00 2001 From: CalMWolfs Date: Mon, 19 Jun 2023 21:48:45 +1000 Subject: renaming --- src/main/java/at/hannibal2/skyhanni/config/Storage.java | 4 ++-- .../at/hannibal2/skyhanni/features/misc/FrozenTreasure.kt | 14 ++++++++++++++ .../skyhanni/features/misc/FrozenTreasureTracker.kt | 8 ++++---- .../at/hannibal2/skyhanni/features/misc/FrozenTreasures.kt | 14 -------------- 4 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasure.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasures.kt (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java index 4a95871cb..ca852e482 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.features.garden.CropAccessory; import at.hannibal2.skyhanni.features.garden.CropType; import at.hannibal2.skyhanni.features.garden.fortuneguide.FarmingItems; import at.hannibal2.skyhanni.features.garden.visitor.VisitorReward; -import at.hannibal2.skyhanni.features.misc.FrozenTreasures; +import at.hannibal2.skyhanni.features.misc.FrozenTreasure; import at.hannibal2.skyhanni.features.misc.GhostCounter.Option; import at.hannibal2.skyhanni.utils.LorenzVec; import com.google.gson.annotations.Expose; @@ -241,7 +241,7 @@ public class Storage { public int compactProcs = 0; @Expose - public Map treasureCount = new HashMap<>(); + public Map treasureCount = new HashMap<>(); } public long nextCityProjectParticipationTime = 0L; diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasure.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasure.kt new file mode 100644 index 000000000..d18b65983 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasure.kt @@ -0,0 +1,14 @@ +package at.hannibal2.skyhanni.features.misc + +enum class FrozenTreasure (val internalName: String, val displayName: String, val defaultAmount: Int, val iceMultiplier: Int = 0){ + WHITE_GIFT("WHITE_GIFT", "§fWhite Gift", 1), + GREEN_GIFT("GREEN_GIFT", "§aGreen Gift",1), + RED_GIFT("RED_GIFT","§9§cRed Gift", 1), + PACKED_ICE("PACKED_ICE","§fPacked Ice", 32, 9), + ENCHANTED_ICE("ENCHANTED_ICE","§aEnchanted Ice", 9, 160), // wiki says 1-16 so assuming 9 + ENCHANTED_PACKED_ICE("ENCHANTED_PACKED_ICE", "§9Enchanted Packed Ice",1, 25600), + ICE_BAIT("ICE_BAIT","§aIce Bait", 16), + GLOWY_CHUM_BAIT("GLOWY_CHUM_BAIT", "§aGlowy Chum Bait",16), + GLACIAL_FRAGMENT("GLACIAL_FRAGMENT","§5Glacial Fragment", 1), + GLACIAL_TALISMAN("GLACIAL_TALISMAN", "§fGlacial Talisman",1) +} \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt index bdb6db48d..93bab63e7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt @@ -31,7 +31,7 @@ class FrozenTreasureTracker { private var missedMinutes = 0 private var compactPattern = "COMPACT! You found an Enchanted Ice!".toPattern() - private var treasureCount = mapOf() + private var treasureCount = mapOf() init { fixedRateTimer(name = "skyhanni-dungeon-milestone-display", period = 60_000) { @@ -77,7 +77,7 @@ class FrozenTreasureTracker { if (config.hideMessages) event.isCanceled } - for (treasure in FrozenTreasures.values()) { + for (treasure in FrozenTreasure.values()) { if ("FROZEN TREASURE! You found ${treasure.displayName}!".toRegex().matches(message)) { val old = treasureCount[treasure] ?: 0 treasureCount = treasureCount.editCopy { this[treasure] = old + 1 } @@ -109,7 +109,7 @@ class FrozenTreasureTracker { addAsSingletonList("§e${formatNumber(compactProcs)} Compact Procs") addAsSingletonList("") - for (treasure in FrozenTreasures.values()) { + for (treasure in FrozenTreasure.values()) { val count = treasureCount[treasure] ?: 0 addAsSingletonList("§b${formatNumber(count)} ${treasure.displayName}") } @@ -133,7 +133,7 @@ class FrozenTreasureTracker { private fun calculateIce() { estimatedIce = 0 if (config.countCompact) estimatedIce += compactProcs * 160 - for (treasure in FrozenTreasures.values()) { + for (treasure in FrozenTreasure.values()) { val amount = treasureCount[treasure] ?: 0 estimatedIce += amount * treasure.defaultAmount * treasure.iceMultiplier } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasures.kt deleted file mode 100644 index d9d936a31..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasures.kt +++ /dev/null @@ -1,14 +0,0 @@ -package at.hannibal2.skyhanni.features.misc - -enum class FrozenTreasures (val internalName: String, val displayName: String, val defaultAmount: Int, val iceMultiplier: Int = 0){ - WHITE_GIFT("WHITE_GIFT", "§fWhite Gift", 1), - GREEN_GIFT("GREEN_GIFT", "§aGreen Gift",1), - RED_GIFT("RED_GIFT","§9§cRed Gift", 1), - PACKED_ICE("PACKED_ICE","§fPacked Ice", 32, 9), - ENCHANTED_ICE("ENCHANTED_ICE","§aEnchanted Ice", 9, 160), // wiki says 1-16 so assuming 9 - ENCHANTED_PACKED_ICE("ENCHANTED_PACKED_ICE", "§9Enchanted Packed Ice",1, 25600), - ICE_BAIT("ICE_BAIT","§aIce Bait", 16), - GLOWY_CHUM_BAIT("GLOWY_CHUM_BAIT", "§aGlowy Chum Bait",16), - GLACIAL_FRAGMENT("GLACIAL_FRAGMENT","§5Glacial Fragment", 1), - GLACIAL_TALISMAN("GLACIAL_TALISMAN", "§fGlacial Talisman",1) -} \ No newline at end of file -- cgit