diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
12 files changed, 35 insertions, 35 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt index bee916507..f5361e09a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.bingo -import at.hannibal2.skyhanni.config.Storage.PlayerSpecific.BingoSession +import at.hannibal2.skyhanni.config.storage.PlayerSpecificStorage.BingoSession import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.jsonobjects.repo.BingoJson import at.hannibal2.skyhanni.data.jsonobjects.repo.BingoRanksJson diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt index 8623e3fc5..082175794 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/CroesusChestTracker.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.Storage.ProfileSpecific.DungeonStorage.DungeonRunInfo +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage.DungeonStorage.DungeonRunInfo import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.SackAPI import at.hannibal2.skyhanni.events.DungeonCompleteEvent @@ -265,11 +265,11 @@ class CroesusChestTracker { it.floor != null && (it.openState == OpenedState.UNOPENED || (includeDungeonKey && it.openState == OpenedState.OPENED)) } ?: -1) + 1 + } - enum class OpenedState { - UNOPENED, - OPENED, - KEY_USED, - } + enum class OpenedState { + UNOPENED, + OPENED, + KEY_USED, } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt index c9e872d1d..edf3cb8a2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.garden.fortuneguide -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.PetAPI import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GardenToolChangeEvent @@ -183,7 +183,7 @@ object CaptureFarmingGear { private fun anita( items: Map<Int, ItemStack>, - storage: Storage.ProfileSpecific.GardenStorage.Fortune, + storage: ProfileSpecificStorage.GardenStorage.Fortune, ) { var level = -1 for ((_, item) in items) { @@ -205,7 +205,7 @@ object CaptureFarmingGear { private fun configurePlots( items: Map<Int, ItemStack>, - storage: Storage.ProfileSpecific.GardenStorage.Fortune, + storage: ProfileSpecificStorage.GardenStorage.Fortune, ) { var plotsUnlocked = 24 for (slot in items) { @@ -232,7 +232,7 @@ object CaptureFarmingGear { private fun skills( items: Map<Int, ItemStack>, - storage: Storage.ProfileSpecific.GardenStorage.Fortune, + storage: ProfileSpecificStorage.GardenStorage.Fortune, ) { for ((_, item) in items) { if (item.displayName.contains("Farming ")) { 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 4b74271e4..994146d7b 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 @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.garden.visitor import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.config.Storage import at.hannibal2.skyhanni.config.features.garden.visitor.DropsStatisticsConfig.DropsStatisticsTextEntry +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent @@ -155,7 +155,7 @@ object GardenVisitorDropStatistics { /** * Do not change the order of the elements getting added to the list. See DropsStatisticsTextEntry for the order. */ - private fun drawDisplay(storage: Storage.ProfileSpecific.GardenStorage.VisitorDrops) = buildList<List<Any>> { + private fun drawDisplay(storage: ProfileSpecificStorage.GardenStorage.VisitorDrops) = buildList<List<Any>> { addAsSingletonList("§e§lVisitor Statistics") addAsSingletonList(format(totalVisitors, "Total", "§e", "")) val visitorRarities = storage.visitorRarities diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index bbb9ae874..93ba7e540 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.minion import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ProfileStorageData @@ -176,7 +176,7 @@ class MinionFeatures { val name = getMinionName(openInventory) if (!minions.contains(entity) && LorenzUtils.skyBlockIsland != IslandType.HUB) { MinionFeatures.minions = minions.editCopy { - this[entity] = Storage.ProfileSpecific.MinionConfig().apply { + this[entity] = ProfileSpecificStorage.MinionConfig().apply { displayName = name lastClicked = 0 } @@ -288,7 +288,7 @@ class MinionFeatures { } if (message.startsWith("§bYou placed a minion!") && newMinion != null) { minions = minions?.editCopy { - this[newMinion!!] = Storage.ProfileSpecific.MinionConfig().apply { + this[newMinion!!] = ProfileSpecificStorage.MinionConfig().apply { displayName = newMinionName lastClicked = 0 } @@ -376,7 +376,7 @@ class MinionFeatures { var minionInventoryOpen = false var minionStorageInventoryOpen = false - private var minions: Map<LorenzVec, Storage.ProfileSpecific.MinionConfig>? + private var minions: Map<LorenzVec, ProfileSpecificStorage.MinionConfig>? get() { return ProfileStorageData.profileSpecific?.minions } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt index 60c28e1b6..73aee171e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.misc.trevor import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent @@ -113,7 +113,7 @@ object TrevorTracker { display = formatDisplay(drawTrapperDisplay(storage)) } - private fun drawTrapperDisplay(storage: Storage.ProfileSpecific.TrapperData) = buildList<List<Any>> { + private fun drawTrapperDisplay(storage: ProfileSpecificStorage.TrapperData) = buildList<List<Any>> { addAsSingletonList("§b§lTrevor Data Tracker") addAsSingletonList("§b${storage.questsDone.addSeparators()} §9Quests Started") addAsSingletonList("§b${storage.peltsGained.addSeparators()} §5Total Pelts Gained") diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt index 977085457..5c7208c62 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.nether.reputationhelper.dailykuudra import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.data.jsonobjects.repo.CrimsonIsleReputationJson.ReputationQuest @@ -93,7 +93,7 @@ class DailyKuudraBossHelper(private val reputationHelper: CrimsonIsleReputationH updateAllKuudraDone() } - fun saveConfig(storage: Storage.ProfileSpecific.CrimsonIsleStorage) { + fun saveConfig(storage: ProfileSpecificStorage.CrimsonIsleStorage) { storage.kuudraTiersDone.clear() kuudraTiers.filter { it.doneToday } @@ -115,7 +115,7 @@ class DailyKuudraBossHelper(private val reputationHelper: CrimsonIsleReputationH } } - fun loadData(storage: Storage.ProfileSpecific.CrimsonIsleStorage) { + fun loadData(storage: ProfileSpecificStorage.CrimsonIsleStorage) { if (kuudraTiers.isEmpty()) return for (name in storage.kuudraTiersDone) { getByDisplayName(name)!!.doneToday = true diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt index 9b420ba9c..b443997c1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.SackAPI import at.hannibal2.skyhanni.data.SackStatus @@ -284,12 +284,12 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) { quests.clear() } - fun load(storage: Storage.ProfileSpecific.CrimsonIsleStorage) { + fun load(storage: ProfileSpecificStorage.CrimsonIsleStorage) { reset() questLoader.loadConfig(storage) } - fun saveConfig(storage: Storage.ProfileSpecific.CrimsonIsleStorage) { + fun saveConfig(storage: ProfileSpecificStorage.CrimsonIsleStorage) { storage.quests.clear() for (quest in quests) { val builder = StringBuilder() diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt index 20497e75d..e6753ffc5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/QuestLoader.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.jsonobjects.repo.CrimsonIsleReputationJson.ReputationQuest import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.DojoQuest @@ -170,7 +170,7 @@ class QuestLoader(private val dailyQuestHelper: DailyQuestHelper) { } } - fun loadConfig(storage: Storage.ProfileSpecific.CrimsonIsleStorage) { + fun loadConfig(storage: ProfileSpecificStorage.CrimsonIsleStorage) { if (dailyQuestHelper.greatSpook) return if (storage.quests.toList().any { hasGreatSpookLine(it) }) { dailyQuestHelper.greatSpook = true diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt index 257e5d9b2..deb4c64dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.nether.reputationhelper.miniboss import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.jsonobjects.repo.CrimsonIsleReputationJson.ReputationQuest import at.hannibal2.skyhanni.events.LorenzChatEvent @@ -90,7 +90,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel } } - fun saveConfig(storage: Storage.ProfileSpecific.CrimsonIsleStorage) { + fun saveConfig(storage: ProfileSpecificStorage.CrimsonIsleStorage) { storage.miniBossesDoneToday.clear() miniBosses.filter { it.doneToday } @@ -107,7 +107,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel } } - fun loadData(storage: Storage.ProfileSpecific.CrimsonIsleStorage) { + fun loadData(storage: ProfileSpecificStorage.CrimsonIsleStorage) { if (miniBosses.isEmpty()) return for (name in storage.miniBossesDoneToday) { getByDisplayName(name)!!.doneToday = true diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt index 1ed123b51..fefc5cf0c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.SlayerAPI import at.hannibal2.skyhanni.data.jsonobjects.repo.SlayerProfitTrackerItemsJson import at.hannibal2.skyhanni.events.GuiRenderEvent @@ -108,7 +108,7 @@ object SlayerProfitTracker { if (itemLogCategory == "") return null return trackers.getOrPut(itemLogCategory) { - val getStorage: (Storage.ProfileSpecific) -> Data = { + val getStorage: (ProfileSpecificStorage) -> Data = { it.slayerProfitData.getOrPut( itemLogCategory ) { Data() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt index 558d421d0..e2ae877bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.Storage +import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.SlayerAPI import at.hannibal2.skyhanni.events.GuiRenderEvent @@ -111,9 +111,9 @@ class SlayerRngMeterDisplay { update() } - private fun getStorage(): Storage.ProfileSpecific.SlayerRngMeterStorage? { + private fun getStorage(): ProfileSpecificStorage.SlayerRngMeterStorage? { return ProfileStorageData.profileSpecific?.slayerRngMeter?.getOrPut(getCurrentSlayer()) { - Storage.ProfileSpecific.SlayerRngMeterStorage() + ProfileSpecificStorage.SlayerRngMeterStorage() } } |