aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt21
2 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index 2290b8eac..28261296d 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -44,6 +44,7 @@ import at.hannibal2.skyhanni.features.garden.farming.GardenStartLocation
import at.hannibal2.skyhanni.features.garden.farming.lane.FarmingLaneCreator
import at.hannibal2.skyhanni.features.garden.fortuneguide.CaptureFarmingGear
import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI
+import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorDropStatistics
import at.hannibal2.skyhanni.features.mining.KingTalismanHelper
import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker
import at.hannibal2.skyhanni.features.minion.MinionFeatures
@@ -211,6 +212,10 @@ object Commands {
"shresetfishingtracker",
"Resets the Fishing Profit Tracker"
) { FishingProfitTracker.resetCommand(it) }
+ registerCommand(
+ "shresetvisitordrops",
+ "Reset the Visitors Drop Statistics"
+ ) { GardenVisitorDropStatistics.reset() }
registerCommand("shbingotoggle", "Toggle the bingo card display mode") { BingoCardDisplay.toggleCommand() }
registerCommand(
"shfarmingprofile",
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
index 994146d7b..3f9fc83b1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
@@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.garden.visitor.VisitorAcceptEvent
import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.test.command.ErrorManager
+import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
@@ -233,6 +234,26 @@ object GardenVisitorDropStatistics {
display = formatDisplay(drawDisplay(storage))
}
+ fun reset() {
+ val storage = GardenAPI.storage?.visitorDrops ?: return
+ ChatUtils.clickableChat("Click here to reset Visitor Drops Statistics.", onClick = {
+ acceptedVisitors = 0
+ deniedVisitors = 0
+ totalVisitors = 0
+ coinsSpent = 0
+ storage.copper = 0
+ storage.bits = 0
+ storage.farmingExp = 0
+ storage.gardenExp = 0
+ storage.gemstonePowder = 0
+ storage.mithrilPowder = 0
+ storage.visitorRarities = arrayListOf(0, 0, 0, 0, 0)
+ storage.rewardsCount = mapOf<VisitorReward, Int>()
+ ChatUtils.chat("Visitor Drop Statistics reset!")
+ saveAndUpdate()
+ })
+ }
+
@SubscribeEvent
fun onConfigLoad(event: ConfigLoadEvent) {
val storage = GardenAPI.storage?.visitorDrops ?: return