diff options
author | Alexia <me@alexia.lol> | 2024-02-24 00:08:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 00:08:52 +0100 |
commit | 972d07c2631d99d0b3e46ea66eecf0825d4e038c (patch) | |
tree | 01218570da26c36ed7ba60fbdc526d45282c984f /src/main/java/at/hannibal2/skyhanni/features/garden | |
parent | 4a542542f7887880152782da2ec0aca272260087 (diff) | |
download | skyhanni-972d07c2631d99d0b3e46ea66eecf0825d4e038c.tar.gz skyhanni-972d07c2631d99d0b3e46ea66eecf0825d4e038c.tar.bz2 skyhanni-972d07c2631d99d0b3e46ea66eecf0825d4e038c.zip |
Fixed rare profile detection bugs. Changed PreProfileSwitchEvent to ProfileJoinEvent. #868
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
9 files changed, 18 insertions, 18 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt index 46cd544a1..bbecb3d55 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt @@ -9,7 +9,7 @@ import at.hannibal2.skyhanni.data.GardenCropUpgrades.Companion.getUpgradeLevel import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent import at.hannibal2.skyhanni.features.garden.CropType.Companion.getTurboCrop import at.hannibal2.skyhanni.features.garden.GardenAPI.addCropIcon @@ -93,7 +93,7 @@ object FarmingFortuneDisplay { var greenThumbFortune = 0.0 @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { display = emptyList() accessoryProgressDisplay = "" } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt index f4e48b626..c42afe36c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -58,7 +58,7 @@ object ArmorDropTracker { } @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { hasArmor = false } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt index 771c1df2a..c7d15b683 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.config.features.garden.MoneyPerHourConfig.CustomFor import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.features.bazaar.BazaarApi.Companion.getBazaarData import at.hannibal2.skyhanni.features.bazaar.BazaarApi.Companion.isBazaarItem import at.hannibal2.skyhanni.features.bazaar.BazaarData @@ -59,7 +59,7 @@ object CropMoneyDisplay { private val toolHasBountiful get() = GardenAPI.storage?.toolWithBountiful @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { display = emptyList() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index a5fd423fb..190a9b14c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed.getSpeed @@ -52,7 +52,7 @@ class FarmingWeightDisplay { } @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { display = emptyList() profileId = "" weight = -2.0 diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt index 8232f5fc8..2da5a21eb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCropSpeed.kt @@ -9,7 +9,7 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.DicerDropsJson import at.hannibal2.skyhanni.data.jsonobjects.repo.DicerDropsJson.DicerType import at.hannibal2.skyhanni.events.CropClickEvent import at.hannibal2.skyhanni.events.GardenToolChangeEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -54,7 +54,7 @@ object GardenCropSpeed { } @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { lastBrokenCrop = null } 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 c34fcf433..1274bf2e8 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 @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +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 @@ -79,7 +79,7 @@ object GardenVisitorDropStatistics { } @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { display = emptyList() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 4b659e9bf..90d31bc61 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SackDataUpdateEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorAcceptEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorAcceptedEvent @@ -100,7 +100,7 @@ class GardenVisitorFeatures { private var lastFullPrice = 0.0 @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { display = emptyList() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt index 6d82115a6..c631165d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.CropClickEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorArrivalEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.test.command.ErrorManager @@ -80,7 +80,7 @@ class GardenVisitorTimer { } @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { display = "" lastMillis = 0.seconds sixthVisitorArrivalTime = SimpleTimeMark.farPast() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt index 78cf473ca..304da0d75 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.PacketEvent -import at.hannibal2.skyhanni.events.PreProfileSwitchEvent +import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorOpenEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorRenderEvent @@ -50,7 +50,7 @@ class VisitorListener { } @SubscribeEvent - fun onPreProfileSwitch(event: PreProfileSwitchEvent) { + fun onProfileJoin(event: ProfileJoinEvent) { VisitorAPI.reset() } |