From dc6242de147b3a6e44e734411ef211f29d110c92 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:01:56 +0200 Subject: [PATCH 1/7] doing big moves --- .../java/at/hannibal2/skyhanni/SkyHanniMod.kt | 26 ++++++------ .../skyhanni/config/ConfigUpdaterMigrator.kt | 2 +- .../config/features/event/EventConfig.java | 4 +- .../features/event/HoppityEggsConfig.java | 6 +++ .../ChocolateFactoryConfig.java | 40 +++++++------------ .../features/inventory/InventoryConfig.java | 4 ++ .../hoppity/HoppityCollectionStats.kt | 4 +- .../hoppity/HoppityEggLocator.kt | 6 +-- .../hoppity/HoppityEggType.kt | 2 +- .../hoppity/HoppityEggsManager.kt | 18 +++++++-- .../hoppity/HoppityEggsShared.kt | 8 ++-- .../hoppity/HoppityNpc.kt | 5 +-- .../chocolatefactory}/ChocolateAmount.kt | 5 +-- .../chocolatefactory/ChocolateFactoryAPI.kt | 37 ++++++++++++----- .../ChocolateFactoryBarnManager.kt | 4 +- .../ChocolateFactoryInventory.kt | 4 +- .../ChocolateFactoryShortcut.kt | 2 +- .../ChocolateFactoryStats.kt | 4 +- .../ChocolateFactoryTimeTowerManager.kt | 3 +- .../ChocolateFactoryTooltip.kt | 5 +-- .../ChocolateFactoryTooltipCompact.kt | 3 +- 21 files changed, 106 insertions(+), 86 deletions(-) rename src/main/java/at/hannibal2/skyhanni/config/features/{event => inventory}/ChocolateFactoryConfig.java (89%) rename src/main/java/at/hannibal2/skyhanni/features/event/{chocolatefactory => }/hoppity/HoppityCollectionStats.kt (98%) rename src/main/java/at/hannibal2/skyhanni/features/event/{chocolatefactory => }/hoppity/HoppityEggLocator.kt (97%) rename src/main/java/at/hannibal2/skyhanni/features/event/{chocolatefactory => }/hoppity/HoppityEggType.kt (95%) rename src/main/java/at/hannibal2/skyhanni/features/event/{chocolatefactory => }/hoppity/HoppityEggsManager.kt (86%) rename src/main/java/at/hannibal2/skyhanni/features/event/{chocolatefactory => }/hoppity/HoppityEggsShared.kt (86%) rename src/main/java/at/hannibal2/skyhanni/features/event/{chocolatefactory => }/hoppity/HoppityNpc.kt (90%) rename src/main/java/at/hannibal2/skyhanni/features/{event/chocolatefactory/menu => inventory/chocolatefactory}/ChocolateAmount.kt (90%) rename src/main/java/at/hannibal2/skyhanni/features/{event => inventory}/chocolatefactory/ChocolateFactoryAPI.kt (88%) rename src/main/java/at/hannibal2/skyhanni/features/{event => inventory}/chocolatefactory/ChocolateFactoryBarnManager.kt (95%) rename src/main/java/at/hannibal2/skyhanni/features/{event/chocolatefactory/menu => inventory/chocolatefactory}/ChocolateFactoryInventory.kt (95%) rename src/main/java/at/hannibal2/skyhanni/features/{event => inventory}/chocolatefactory/ChocolateFactoryShortcut.kt (97%) rename src/main/java/at/hannibal2/skyhanni/features/{event/chocolatefactory/menu => inventory/chocolatefactory}/ChocolateFactoryStats.kt (96%) rename src/main/java/at/hannibal2/skyhanni/features/{event/chocolatefactory/menu => inventory/chocolatefactory}/ChocolateFactoryTimeTowerManager.kt (96%) rename src/main/java/at/hannibal2/skyhanni/features/{event/chocolatefactory/menu => inventory/chocolatefactory}/ChocolateFactoryTooltip.kt (93%) rename src/main/java/at/hannibal2/skyhanni/features/{event/chocolatefactory/menu => inventory/chocolatefactory}/ChocolateFactoryTooltipCompact.kt (94%) diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 5c96ecde0c08..a41215e66c18 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -125,19 +125,6 @@ import at.hannibal2.skyhanni.features.dungeon.DungeonTeammateOutlines import at.hannibal2.skyhanni.features.dungeon.HighlightDungeonDeathmite import at.hannibal2.skyhanni.features.dungeon.TerracottaPhase import at.hannibal2.skyhanni.features.event.UniqueGiftingOpportunitiesFeatures -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryBarnManager -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryShortcut -import at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity.HoppityCollectionStats -import at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity.HoppityEggLocator -import at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity.HoppityEggsManager -import at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity.HoppityEggsShared -import at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity.HoppityNpc -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryInventory -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryStats -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryTimeTowerManager -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryTooltip -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryTooltipCompact import at.hannibal2.skyhanni.features.event.diana.AllBurrowsList import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper import at.hannibal2.skyhanni.features.event.diana.DianaProfitTracker @@ -148,6 +135,11 @@ import at.hannibal2.skyhanni.features.event.diana.HighlightInquisitors import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare import at.hannibal2.skyhanni.features.event.diana.MythologicalCreatureTracker import at.hannibal2.skyhanni.features.event.diana.SoopyGuessBurrow +import at.hannibal2.skyhanni.features.event.hoppity.HoppityCollectionStats +import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggLocator +import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsManager +import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsShared +import at.hannibal2.skyhanni.features.event.hoppity.HoppityNpc import at.hannibal2.skyhanni.features.event.jerry.HighlightJerries import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker import at.hannibal2.skyhanni.features.event.lobby.waypoints.christmas.PresentWaypoints @@ -276,6 +268,14 @@ import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarCancelledBuyOrderCl import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarOpenPriceWebsite import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarOrderHelper import at.hannibal2.skyhanni.features.inventory.bazaar.CraftMaterialsFromBazaar +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryBarnManager +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryInventory +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryShortcut +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryStats +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTimeTowerManager +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTooltip +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTooltipCompact import at.hannibal2.skyhanni.features.inventory.tiarelay.TiaRelayHelper import at.hannibal2.skyhanni.features.inventory.tiarelay.TiaRelayWaypoints import at.hannibal2.skyhanni.features.itemabilities.ChickenHeadTimer diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index 9a08a23855b8..faeab5a00019 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -12,7 +12,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 42 + const val CONFIG_VERSION = 43 fun JsonElement.at(chain: List, init: Boolean): JsonElement? { if (chain.isEmpty()) return this if (this !is JsonObject) return null diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/EventConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/EventConfig.java index b68664d79c88..b50c67ea6247 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/EventConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/EventConfig.java @@ -24,8 +24,8 @@ public class EventConfig { public WinterConfig winter = new WinterConfig(); @Expose - @Category(name = "Hoppity", desc = "Features for the Hoppity event and the chocolate factory.") - public ChocolateFactoryConfig chocolateFactory = new ChocolateFactoryConfig(); + @Category(name = "Hoppity Eggs", desc = "Features for the Hoppity event.") + public HoppityEggsConfig hoppityEggs = new HoppityEggsConfig(); @ConfigOption(name = "City Project", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java index 1333239262a4..5306cf967042 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/HoppityEggsConfig.java @@ -36,4 +36,10 @@ public class HoppityEggsConfig { @Expose @ConfigLink(owner = HoppityEggsConfig.class, field = "showClaimedEggs") public Position position = new Position(33, 72, false, true); + + @Expose + @ConfigOption(name = "Highlight Hoppity Shop", desc = "Highlight items that haven't been bought from the Hoppity shop yet.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightHoppityShop = true; } diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/ChocolateFactoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChocolateFactoryConfig.java similarity index 89% rename from src/main/java/at/hannibal2/skyhanni/config/features/event/ChocolateFactoryConfig.java rename to src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChocolateFactoryConfig.java index d725c2974fa9..7692d28c6855 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/ChocolateFactoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChocolateFactoryConfig.java @@ -1,10 +1,9 @@ -package at.hannibal2.skyhanni.config.features.event; +package at.hannibal2.skyhanni.config.features.inventory; import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryStats.ChocolateFactoryStat; +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryStats.ChocolateFactoryStat; import com.google.gson.annotations.Expose; -import io.github.notenoughupdates.moulconfig.annotations.Accordion; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; @@ -17,11 +16,6 @@ public class ChocolateFactoryConfig { - @Expose - @ConfigOption(name = "Hoppity Eggs", desc = "") - @Accordion - public HoppityEggsConfig hoppityEggs = new HoppityEggsConfig(); - @Expose @ConfigOption(name = "Chocolate Factory Features", desc = "Global toggle for all chocolate factory features.") @ConfigEditorBoolean @@ -92,12 +86,6 @@ public class ChocolateFactoryConfig { @FeatureToggle public boolean extraTooltipStats = true; - @Expose - @ConfigOption(name = "Hoppity Collection Stats", desc = "Shows info about your hoppity rabbit collection.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hoppityCollectionStats = true; - @Expose @ConfigOption(name = "Time Tower Warning", desc = "Notification when you have a new time tower usage available and " + "continuously warn when your time tower is full.") @@ -105,20 +93,10 @@ public class ChocolateFactoryConfig { @FeatureToggle public boolean timeTowerWarning = false; - @Expose - @ConfigOption(name = "Hoppity Menu Shortcut", desc = "Add a Chocolate Factory button in the SkyBlock Menu that runs /chocolatefactory on click.") - @ConfigEditorBoolean - @FeatureToggle - public boolean hoppityMenuShortcut = true; - @Expose @ConfigLink(owner = ChocolateFactoryConfig.class, field = "statsDisplay") public Position position = new Position(163, 160, false, true); - @Expose - @ConfigLink(owner = ChocolateFactoryConfig.class, field = "hoppityCollectionStats") - public Position hoppityStatsPosition = new Position(163, 160, false, true); - @Expose @ConfigOption(name = "Compact On Click", desc = "Compact the item toolip when clicking on the chocolate.") @ConfigEditorBoolean @@ -141,8 +119,18 @@ public class ChocolateFactoryConfig { public Position tooltipMovePosition = new Position(-380, 150, false, true); @Expose - @ConfigOption(name = "Highlight Hoppity Shop", desc = "Highlight items that haven't been bought from the Hoppity shop yet.") + @ConfigOption(name = "Hoppity Collection Stats", desc = "Shows info about your hoppity rabbit collection.") @ConfigEditorBoolean @FeatureToggle - public boolean highlightHoppityShop = true; + public boolean hoppityCollectionStats = true; + + @Expose + @ConfigLink(owner = ChocolateFactoryConfig.class, field = "hoppityCollectionStats") + public Position hoppityStatsPosition = new Position(163, 160, false, true); + + @Expose + @ConfigOption(name = "Hoppity Menu Shortcut", desc = "Add a Chocolate Factory button in the SkyBlock Menu that runs /chocolatefactory on click.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hoppityMenuShortcut = true; } diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index 5187301170b1..f28aac82e481 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -48,6 +48,10 @@ public class InventoryConfig { @Category(name = "Item Abilities", desc = "Stuff about item abilities.") public ItemAbilityConfig itemAbilities = new ItemAbilityConfig(); + @Expose + @Category(name = "Chocolate Factory", desc = "The chocolate factory") + public ChocolateFactoryConfig chocolateFactory = new ChocolateFactoryConfig(); + @Expose @ConfigOption(name = "Not Clickable Items", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityCollectionStats.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt similarity index 98% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityCollectionStats.kt rename to src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt index 09091532a002..6f835b7609e8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityCollectionStats.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCollectionStats.kt @@ -1,10 +1,10 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity +package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.utils.DisplayTableEntry import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggLocator.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt similarity index 97% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggLocator.kt rename to src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt index b6767f7b8270..9a6a8799d6bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggLocator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt @@ -1,4 +1,4 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity +package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.DebugDataCollectEvent @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -26,7 +26,7 @@ import kotlin.time.Duration.Companion.seconds object HoppityEggLocator { - private val config get() = ChocolateFactoryAPI.config.hoppityEggs + private val config get() = HoppityEggsManager.config private val locatorItem = "EGGLOCATOR".asInternalName() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggType.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggType.kt similarity index 95% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggType.kt rename to src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggType.kt index 295e95d9cc36..15f463884283 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggType.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggType.kt @@ -1,4 +1,4 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity +package at.hannibal2.skyhanni.features.event.hoppity import io.github.moulberry.notenoughupdates.util.SkyBlockTime diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt similarity index 86% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggsManager.kt rename to src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index f7dfaf99ef38..fcbc9c38c68f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -1,11 +1,13 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity +package at.hannibal2.skyhanni.features.event.hoppity +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.features.fame.ReminderUtils +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.DelayedRun @@ -20,7 +22,7 @@ import kotlin.time.Duration.Companion.seconds object HoppityEggsManager { - private val config get() = ChocolateFactoryAPI.config.hoppityEggs + val config get() = SkyHanniMod.feature.event.hoppityEggs private val eggFoundPattern by ChocolateFactoryAPI.patternGroup.pattern( "egg.found", @@ -115,4 +117,14 @@ object HoppityEggsManager { fun onSecondPassed(event: SecondPassedEvent) { HoppityEggType.checkClaimed() } + + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move( + 43, + "event.chocolateFactory.highlightHoppityShop", + "event.chocolateFactory.hoppityEggs.highlightHoppityShop" + ) + event.move(43, "event.chocolateFactory.hoppityEggs", "event.hoppityEggs") + } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggsShared.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt similarity index 86% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggsShared.kt rename to src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt index effd33500da8..5577db3fdfe6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityEggsShared.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt @@ -1,8 +1,8 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity +package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI -import at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity.HoppityEggsManager.getEggType +import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsManager.getEggType +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec @@ -13,7 +13,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object HoppityEggsShared { - private val config get() = ChocolateFactoryAPI.config.hoppityEggs + private val config get() = HoppityEggsManager.config /** * REGEX-TEST: CalMWolfs: [SkyHanni] Breakfast Chocolate Egg located at x: 142, y: 71, z: -453 diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityNpc.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt similarity index 90% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityNpc.kt rename to src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt index 8e8e137aefbf..1995352798a8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/hoppity/HoppityNpc.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt @@ -1,11 +1,10 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity +package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzColor @@ -15,7 +14,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object HoppityNpc { - private val config get() = ChocolateFactoryAPI.config + private val config get() = HoppityEggsManager.config private var slotsToHighlight = mutableSetOf() private var inShop = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateAmount.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateAmount.kt similarity index 90% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateAmount.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateAmount.kt index 160023629aa8..cf22746ef834 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateAmount.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateAmount.kt @@ -1,7 +1,6 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.menu +package at.hannibal2.skyhanni.features.inventory.chocolatefactory -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI.profileStorage +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI.profileStorage import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.TimeUtils.format diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt similarity index 88% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryAPI.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt index 377e79072986..dd8b83d2b59f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt @@ -1,7 +1,7 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory +package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.features.event.ChocolateFactoryConfig +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage.ChocolateFactoryStorage import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.jsonobjects.repo.HoppityEggLocationsJson @@ -10,11 +10,7 @@ import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity.HoppityEggLocator -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateAmount -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryStats -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryTimeTowerManager -import at.hannibal2.skyhanni.features.event.chocolatefactory.menu.ChocolateFactoryTooltip +import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggLocator import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.InventoryUtils @@ -39,8 +35,7 @@ import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object ChocolateFactoryAPI { - - val config: ChocolateFactoryConfig get() = SkyHanniMod.feature.event.chocolateFactory + val config get() = SkyHanniMod.feature.inventory.chocolateFactory val profileStorage: ChocolateFactoryStorage? get() = ProfileStorageData.profileSpecific?.chocolateFactory val patternGroup = RepoPattern.group("misc.chocolatefactory") @@ -332,6 +327,30 @@ object ChocolateFactoryAPI { ChocolateFactoryTooltip.updateIgnoredSlots() } + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + val old = "event.chocolateFactory" + val new = "inventory.chocolateFactory" + event.move(43, "$old.enabled", "$new.enabled") + event.move(43, "$old.statsDisplay", "$new.statsDisplay") + event.move(43, "$old.statsDisplayList", "$new.statsDisplayList") + event.move(43, "$old.showStackSizes", "$new.showStackSizes") + event.move(43, "$old.highlightUpgrades", "$new.highlightUpgrades") + event.move(43, "$old.useMiddleClick", "$new.useMiddleClick") + event.move(43, "$old.rabbitWarning", "$new.rabbitWarning") + event.move(43, "$old.barnCapacityThreshold", "$new.barnCapacityThreshold") + event.move(43, "$old.extraTooltipStats", "$new.extraTooltipStats") + event.move(43, "$old.timeTowerWarning", "$new.timeTowerWarning") + event.move(43, "$old.position", "$new.position") + event.move(43, "$old.compactOnClick", "$new.compactOnClick") + event.move(43, "$old.compactOnClickAlways", "$new.compactOnClickAlways") + event.move(43, "$old.tooltipMove", "$new.tooltipMove") + event.move(43, "$old.tooltipMovePosition", "$new.tooltipMovePosition") + event.move(43, "$old.hoppityMenuShortcut", "$new.hoppityMenuShortcut") + event.move(43, "$old.hoppityCollectionStats", "$new.hoppityCollectionStats") + event.move(43, "$old.hoppityStatsPosition", "$new.hoppityStatsPosition") + } + fun getChocolateUpgradeCost(lore: List): Long? { val nextLine = lore.nextAfter({ UtilsPatterns.costLinePattern.matches(it) }) ?: return null return chocolateAmountPattern.matchMatcher(nextLine.removeColor()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryBarnManager.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt similarity index 95% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryBarnManager.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt index 7b1be9152615..7154af4a1747 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryBarnManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt @@ -1,7 +1,7 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory +package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.hoppity.HoppityEggsManager +import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsManager import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzUtils diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryInventory.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryInventory.kt similarity index 95% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryInventory.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryInventory.kt index add477bb9b7f..0e5caca37ee4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryInventory.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryInventory.kt @@ -1,10 +1,8 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.menu +package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderItemEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryBarnManager import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryShortcut.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt similarity index 97% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryShortcut.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt index 6b9fc671ecbb..7053f521d6a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/ChocolateFactoryShortcut.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryShortcut.kt @@ -1,4 +1,4 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory +package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.GuiContainerEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryStats.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt similarity index 96% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryStats.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt index e1b26fed8201..cbf38db46de9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryStats.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryStats.kt @@ -1,10 +1,8 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.menu +package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.SecondPassedEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryBarnManager import at.hannibal2.skyhanni.utils.ClipboardUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTimeTowerManager.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTimeTowerManager.kt similarity index 96% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTimeTowerManager.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTimeTowerManager.kt index a1b34a1a48a0..e83e60e2bd15 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTimeTowerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTimeTowerManager.kt @@ -1,8 +1,7 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.menu +package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SecondPassedEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.features.fame.ReminderUtils import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt similarity index 93% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTooltip.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt index dd09a2402916..227ece8d95bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt @@ -1,8 +1,7 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.menu +package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.events.LorenzToolTipEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI.profileStorage +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI.profileStorage import at.hannibal2.skyhanni.utils.LorenzUtils.round import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import net.minecraftforge.fml.common.eventhandler.EventPriority diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTooltipCompact.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipCompact.kt similarity index 94% rename from src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTooltipCompact.kt rename to src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipCompact.kt index 00d6783ba5a0..212d9c130bda 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/chocolatefactory/menu/ChocolateFactoryTooltipCompact.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipCompact.kt @@ -1,9 +1,8 @@ -package at.hannibal2.skyhanni.features.event.chocolatefactory.menu +package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzToolTipEvent -import at.hannibal2.skyhanni.features.event.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.utils.CollectionUtils.getOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name From bde2789850fed1553d6cd6ca8b602d95fc55300e Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:01:43 +0200 Subject: [PATCH 2/7] coins per million chocolate --- .../java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 + .../features/inventory/InventoryConfig.java | 1 + .../ChocolateFactoryConfig.java | 8 +- .../ChocolateShopPriceConfig.java | 27 ++++ .../skyhanni/features/garden/GardenAPI.kt | 4 +- .../garden/inventory/SkyMartCopperPrice.kt | 10 +- .../chocolatefactory/ChocolateFactoryAPI.kt | 6 +- .../ChocolateFactoryTooltip.kt | 2 +- .../chocolatefactory/ChocolateShopPrice.kt | 124 ++++++++++++++++++ 9 files changed, 173 insertions(+), 11 deletions(-) rename src/main/java/at/hannibal2/skyhanni/config/features/inventory/{ => chocolatefactory}/ChocolateFactoryConfig.java (94%) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java create mode 100644 src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index a41215e66c18..91686c2f9fd4 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -276,6 +276,7 @@ import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactor import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTimeTowerManager import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTooltip import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryTooltipCompact +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateShopPrice import at.hannibal2.skyhanni.features.inventory.tiarelay.TiaRelayHelper import at.hannibal2.skyhanni.features.inventory.tiarelay.TiaRelayWaypoints import at.hannibal2.skyhanni.features.itemabilities.ChickenHeadTimer @@ -635,6 +636,7 @@ class SkyHanniMod { loadModule(ChocolateFactoryTooltipCompact) loadModule(ChocolateFactoryTimeTowerManager) loadModule(ChocolateFactoryTooltip) + loadModule(ChocolateShopPrice()) loadModule(HoppityNpc) loadModule(HoppityEggsManager) loadModule(HoppityEggLocator) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index f28aac82e481..761b615c4465 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -2,6 +2,7 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.HasLegacyId; +import at.hannibal2.skyhanni.config.features.inventory.chocolatefactory.ChocolateFactoryConfig; import at.hannibal2.skyhanni.config.features.inventory.helper.HelperConfig; import at.hannibal2.skyhanni.config.features.itemability.ItemAbilityConfig; import at.hannibal2.skyhanni.config.features.misc.EstimatedItemValueConfig; diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChocolateFactoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java similarity index 94% rename from src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChocolateFactoryConfig.java rename to src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java index 7692d28c6855..ff91f9b475de 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ChocolateFactoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java @@ -1,9 +1,10 @@ -package at.hannibal2.skyhanni.config.features.inventory; +package at.hannibal2.skyhanni.config.features.inventory.chocolatefactory; import at.hannibal2.skyhanni.config.FeatureToggle; import at.hannibal2.skyhanni.config.core.config.Position; import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryStats.ChocolateFactoryStat; import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.Accordion; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; @@ -133,4 +134,9 @@ public class ChocolateFactoryConfig { @ConfigEditorBoolean @FeatureToggle public boolean hoppityMenuShortcut = true; + + @Expose + @ConfigOption(name = "Chocolate Shop Price", desc = "") + @Accordion + public ChocolateShopPriceConfig chocolateShopPrice = new ChocolateShopPriceConfig(); } diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java new file mode 100644 index 000000000000..f2e9b32080a4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.config.features.inventory.chocolatefactory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +public class ChocolateShopPriceConfig { + + @Expose + @ConfigOption(name = "Enabled", desc = "Show chocolatae to coin prices inside the Chocolate Shop inventory.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigLink(owner = ChocolateFactoryConfig.class, field = "chocolateShopPrice") + public Position position = new Position(163, 160, false, true); + + @Expose + @ConfigOption(name = "Item Scale", desc = "Change the size of the items.") + @ConfigEditorSlider(minValue = 0.3f, maxValue = 3, minStep = 0.1f) + public double itemScale = 0.6; +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt index b080e53d1c99..54fdd5f06f4c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt @@ -23,6 +23,7 @@ import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI import at.hannibal2.skyhanni.features.garden.fortuneguide.FarmingItems import at.hannibal2.skyhanni.features.garden.inventory.SkyMartCopperPrice import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI +import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateShopPrice import at.hannibal2.skyhanni.utils.BlockUtils.isBabyCrop import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.DelayedRun @@ -167,7 +168,8 @@ object GardenAPI { addItemIcon(crop.icon.copy(), highlight, scale = scale) fun hideExtraGuis() = ComposterOverlay.inInventory || AnitaMedalProfit.inInventory || - SkyMartCopperPrice.inInventory || FarmingContestAPI.inInventory || VisitorAPI.inInventory || FFGuideGUI.isInGui() + SkyMartCopperPrice.inInventory || FarmingContestAPI.inInventory || VisitorAPI.inInventory || + FFGuideGUI.isInGui() || ChocolateShopPrice.inInventory fun clearCropSpeed() { storage?.cropsPerSecond?.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt index adedbb150a87..0d86757ea4e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/SkyMartCopperPrice.kt @@ -76,8 +76,8 @@ class SkyMartCopperPrice { } ?: continue val internalName = item.getInternalName() - val lowestBin = internalName.getPriceOrNull() ?: continue - val profit = lowestBin - (otherItemsPrice ?: 0.0) + val itemPrice = internalName.getPriceOrNull() ?: continue + val profit = itemPrice - (otherItemsPrice ?: 0.0) val factor = profit / copper val perFormat = NumberUtil.format(factor) @@ -86,7 +86,7 @@ class SkyMartCopperPrice { val hover = buildList { add(itemName) add("") - add("§7Item price: §6${NumberUtil.format(lowestBin)} ") + add("§7Item price: §6${NumberUtil.format(itemPrice)} ") otherItemsPrice?.let { add("§7Additional cost: §6${NumberUtil.format(it)} ") } @@ -130,8 +130,6 @@ class SkyMartCopperPrice { } } - private fun isEnabled() = GardenAPI.inGarden() && config.copperPrice - @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(3, "garden.skyMartCopperPrice", "garden.skyMart.copperPrice") @@ -141,4 +139,6 @@ class SkyMartCopperPrice { JsonPrimitive((it.asDouble / 1.851).round(1)) } } + + private fun isEnabled() = GardenAPI.inGarden() && config.copperPrice } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt index dd8b83d2b59f..ed00ef33f942 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryAPI.kt @@ -97,7 +97,7 @@ object ChocolateFactoryAPI { ) private val chocolateFactoryInventoryNamePattern by patternGroup.pattern( "inventory.name", - "Hoppity|Chocolate Shop|Chocolate Factory Milestones" + "Hoppity|Chocolate Factory Milestones" ) var rabbitSlots = mapOf() @@ -176,7 +176,7 @@ object ChocolateFactoryAPI { } val lore = item.getLore() - val upgradeCost = getChocolateUpgradeCost(lore) ?: continue + val upgradeCost = getChocolateBuyCost(lore) ?: continue val canAfford = upgradeCost <= ChocolateAmount.CURRENT.chocolate() if (canAfford) upgradeableSlots.add(slotIndex) @@ -351,7 +351,7 @@ object ChocolateFactoryAPI { event.move(43, "$old.hoppityStatsPosition", "$new.hoppityStatsPosition") } - fun getChocolateUpgradeCost(lore: List): Long? { + fun getChocolateBuyCost(lore: List): Long? { val nextLine = lore.nextAfter({ UtilsPatterns.costLinePattern.matches(it) }) ?: return null return chocolateAmountPattern.matchMatcher(nextLine.removeColor()) { group("amount").formatLong() diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt index 227ece8d95bb..9d556f64b154 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt @@ -31,7 +31,7 @@ object ChocolateFactoryTooltip { if (slotIndex == ChocolateFactoryAPI.prestigeIndex) return if (slotIndex !in ChocolateFactoryAPI.otherUpgradeSlots && slotIndex !in ChocolateFactoryAPI.rabbitSlots) return - val upgradeCost = ChocolateFactoryAPI.getChocolateUpgradeCost(event.toolTip) ?: return + val upgradeCost = ChocolateFactoryAPI.getChocolateBuyCost(event.toolTip) ?: return event.toolTip.add("§8§m-----------------") val timeToUpgrade = ChocolateAmount.CURRENT.formattedTimeUntilGoal(upgradeCost) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt new file mode 100644 index 000000000000..75018dc290ab --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt @@ -0,0 +1,124 @@ +package at.hannibal2.skyhanni.features.inventory.chocolatefactory + +import at.hannibal2.skyhanni.events.GuiRenderEvent +import at.hannibal2.skyhanni.events.InventoryCloseEvent +import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent +import at.hannibal2.skyhanni.features.garden.GardenAPI +import at.hannibal2.skyhanni.utils.DisplayTableEntry +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName +import at.hannibal2.skyhanni.utils.ItemUtils.getLore +import at.hannibal2.skyhanni.utils.ItemUtils.itemName +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.NEUInternalName +import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull +import at.hannibal2.skyhanni.utils.NumberUtil +import at.hannibal2.skyhanni.utils.NumberUtil.million +import at.hannibal2.skyhanni.utils.RenderUtils.renderRenderables +import at.hannibal2.skyhanni.utils.StringUtils.matches +import at.hannibal2.skyhanni.utils.renderables.Renderable +import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern +import net.minecraft.item.ItemStack +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class ChocolateShopPrice { + + private var display = emptyList() + private val config get() = ChocolateFactoryAPI.config.chocolateShopPrice + + private val menuNamePattern by RepoPattern.pattern( + "chocolatefactory.inventory.title", + "^Chocolate Shop$" + ) + + companion object { + var inInventory = false + } + + private fun ItemStack.loreCosts(): MutableList { + var found = false + val list = mutableListOf() + for (lines in getLore()) { + if (lines == "§7Cost") { + found = true + continue + } + + if (!found) continue + if (lines.isEmpty()) return list + + NEUInternalName.fromItemNameOrNull(lines)?.let { + list.add(it) + } + } + return list + } + + @SubscribeEvent + fun onInventoryOpen(event: InventoryFullyOpenedEvent) { + if (!isEnabled()) return + if (!menuNamePattern.matches(event.inventoryName)) return + + val multiplier = 1.million + + inInventory = true + // TODO merge core with SkyMartCopperPrice into a utils + val table = mutableListOf() + for ((slot, item) in event.inventoryItems) { + val lore = item.getLore() + val chocolate = ChocolateFactoryAPI.getChocolateBuyCost(lore) ?: continue + val internalName = item.getInternalName() + val itemPrice = internalName.getPriceOrNull() ?: continue + + val profit = itemPrice + + val factor = (profit / chocolate) * multiplier + val perFormat = NumberUtil.format(factor) + + val itemName = item.itemName + val hover = buildList { + add(itemName) + + add("") + add("§7Item price: §6${NumberUtil.format(itemPrice)} ") + add("§7Chocolate amount: §c${NumberUtil.format(chocolate)} ") + + add("") + add("§7Profit per million chocolate: §6${perFormat} ") + } + table.add( + DisplayTableEntry( + "$itemName§f:", + "§6§l$perFormat", + factor, + internalName, + hover, + highlightsOnHoverSlots = listOf(slot) + ) + ) + } + + val newList = mutableListOf() + newList.add(Renderable.string("§eCoins per million chocolate§f:")) + newList.add(Renderable.string("§eCurrent Chocolate: §6${ChocolateAmount.CURRENT.formatted}")) + newList.add(LorenzUtils.fillTable(table, padding = 5, itemScale = config.itemScale)) + display = newList + } + + @SubscribeEvent + fun onInventoryClose(event: InventoryCloseEvent) { + inInventory = false + } + + @SubscribeEvent + fun onBackgroundDraw(event: GuiRenderEvent.ChestGuiOverlayRenderEvent) { + if (inInventory) { + config.position.renderRenderables( + display, + extraSpace = 5, + posLabel = "Chocolate Shop Price" + ) + } + } + + private fun isEnabled() = GardenAPI.inGarden() && config.enabled +} From ff548dec41c1873deadc5efd341bfebfe9b50d65 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:03:47 +0200 Subject: [PATCH 3/7] fix typo --- .../inventory/chocolatefactory/ChocolateShopPriceConfig.java | 2 +- .../features/inventory/chocolatefactory/ChocolateShopPrice.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java index f2e9b32080a4..1b266301761b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java @@ -11,7 +11,7 @@ public class ChocolateShopPriceConfig { @Expose - @ConfigOption(name = "Enabled", desc = "Show chocolatae to coin prices inside the Chocolate Shop inventory.") + @ConfigOption(name = "Enabled", desc = "Show chocolate to coin prices inside the Chocolate Shop inventory.") @ConfigEditorBoolean @FeatureToggle public boolean enabled = true; diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt index 75018dc290ab..ef4237940651 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt @@ -21,9 +21,9 @@ import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class ChocolateShopPrice { + private val config get() = ChocolateFactoryAPI.config.chocolateShopPrice private var display = emptyList() - private val config get() = ChocolateFactoryAPI.config.chocolateShopPrice private val menuNamePattern by RepoPattern.pattern( "chocolatefactory.inventory.title", From 1f56ec5805527a2994bccdcde7f050394b4a9ccc Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:06:42 +0200 Subject: [PATCH 4/7] fix default position --- .../inventory/chocolatefactory/ChocolateShopPriceConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java index 1b266301761b..081a5bd933e7 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateShopPriceConfig.java @@ -18,7 +18,7 @@ public class ChocolateShopPriceConfig { @Expose @ConfigLink(owner = ChocolateFactoryConfig.class, field = "chocolateShopPrice") - public Position position = new Position(163, 160, false, true); + public Position position = new Position(200, 150, false, true); @Expose @ConfigOption(name = "Item Scale", desc = "Change the size of the items.") From 46d65f1115feb24c191f4ecbd3ef2c4edb956261 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:09:40 +0200 Subject: [PATCH 5/7] typo --- .../features/inventory/chocolatefactory/ChocolateShopPrice.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt index ef4237940651..2d31f5ab5c91 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt @@ -99,7 +99,7 @@ class ChocolateShopPrice { val newList = mutableListOf() newList.add(Renderable.string("§eCoins per million chocolate§f:")) - newList.add(Renderable.string("§eCurrent Chocolate: §6${ChocolateAmount.CURRENT.formatted}")) + newList.add(Renderable.string("§eChocolate avaliable: §6${ChocolateAmount.CURRENT.formatted}")) newList.add(LorenzUtils.fillTable(table, padding = 5, itemScale = config.itemScale)) display = newList } From a90ae4efb0471df8ac404c37a1ea3d05dac96f39 Mon Sep 17 00:00:00 2001 From: Cal Date: Wed, 1 May 2024 14:22:43 +1000 Subject: [PATCH 6/7] fix merge --- docs/CHANGELOG.md | 24 ++++++++---------------- docs/FEATURES.md | 3 +-- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 07669f1ade74..399e4c7ab854 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -112,8 +112,7 @@ + Highlight unbought items in Hoppity shop. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) + Added time tower status to the chocolate factory stats. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1506) + Also can notify you when you get a new charge or your charges are full. -+ Extra tooltip stats about upgrades for the chocolate factory. - - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1594) ++ Extra tooltip stats about upgrades for the chocolate factory. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1594) + View these to know when to buy time tower or Coach Jackrabbit. #### Inventory Features @@ -162,8 +161,7 @@ + Added options to toggle overflow garden levels and overflow level up messages. - Empa (https://github.com/hannibal002/SkyHanni/pull/1325) + Added an option to disable custom garden key binds while on the barn plot. - jani270 (https://github.com/hannibal002/SkyHanni/pull/1559) + Added option to block accepting/refusing visitors depending on coin loss. - Albin (https://github.com/hannibal002/SkyHanni/pull/1502) -+ Changed broken Pest Particle Waypoint to just show existing particles better, no guess. - - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1263) ++ Changed broken Pest Particle Waypoint to just show existing particles better, no guess. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1263) + This is just a workaround until the pest location detection is working again. #### Diana Improvements @@ -193,8 +191,7 @@ + Customize top and bottom color (gradient). + Moved Unknown Lines warning option back into Custom Scoreboard Category. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1561) + Added more Alignment Options to Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1566) -+ Allowed Custom Scoreboard Outline to also work on Background Images. - - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1566) ++ Allowed Custom Scoreboard Outline to also work on Background Images. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1566) #### Commands Improvements @@ -254,8 +251,7 @@ + Show an estimation of when you will prestige based on your chocolate/second. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1514) + Removed the Hoppity Menu Shortcut in The Rift, Kuudra, Catacombs and Mineshafts. - raven (https://github.com/hannibal002/SkyHanni/pull/1585) + You cannot use the chocolate factory in these areas, resulting in the button being removed. -+ Live update chocolate amounts in other inventories related to the chocolate factory. - - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1594) ++ Live update chocolate amounts in other inventories related to the chocolate factory. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1594) #### Rift Improvements @@ -313,8 +309,7 @@ + Fixed error message with GFS and super crafting pets. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1553) + Fixed pest count error being shown. - Empa (https://github.com/hannibal002/SkyHanni/pull/1563) + Fixed pest count logic not having necessary delay. - Empa (https://github.com/hannibal002/SkyHanni/pull/1591) -+ Fixed visitor reward warning only blocking normal clicks. - - Obsidian (https://github.com/hannibal002/SkyHanni/pull/1595) ++ Fixed visitor reward warning only blocking normal clicks. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/1595) #### Chat Fixes @@ -351,8 +346,7 @@ + Fixed Custom Scoreboard not detection M7 dragons during Derpy. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1561) + Fixed space in visitor shopping list. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1549) + Fixed missing Fossil Dust line in Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1586) -+ Fixed SkyHanni showing the Vanilla Scoreboard when using Apec. - hannibal2, - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1592) ++ Fixed SkyHanni showing the Vanilla Scoreboard when using Apec. - hannibal2, j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1592) #### Dungeon Fixes @@ -424,8 +418,7 @@ + Fixed Profit Trackers showing no more than 2.1b coins. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1554) + Fixed error with other mods that include DiscordIPC and do not relocate. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1573) + Fixed updater downloading the wrong version. - Empa (https://github.com/hannibal002/SkyHanni/pull/1590) -+ Fixed some mob features not working with Skytils' ping display. - Thunderblade73 & - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1605) ++ Fixed some mob features not working with Skytils' ping display. - Thunderblade73 & martimavocado (https://github.com/hannibal002/SkyHanni/pull/1605) ### Technical Details @@ -548,8 +541,7 @@ + This should make SkyHanni more compatible with other mods doing the exact same mixin for tab completion. + Also changed the mixin to use an event, allowing more decentralized tab completion changes. + Changes how some of the chocolate factory data is stored and accessed. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1514) -+ Renderable tooltips are now deferred in end of RenderTick. - - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1603) ++ Renderable tooltips are now deferred in end of RenderTick. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1603) + Tooltips should only be set in between RenderTickEvent start and RenderTickEvent end. i.e. screen render events. + Made DelayedRun return its SimpleTimeMark. - ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1570) + This is useful as to not over extraneously run an operation when another is already queued. diff --git a/docs/FEATURES.md b/docs/FEATURES.md index a9b8939b0bba..9da0ae878e78 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -849,8 +849,7 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Highlight unbought items in Hoppity shop. - seraid (https://github.com/hannibal002/SkyHanni/pull/1517) + Added time tower status to the chocolate factory stats. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1506) + Also can notify you when you get a new charge or your charges are full. -+ Extra tooltip stats about upgrades for the chocolate factory. - - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1594) ++ Extra tooltip stats about upgrades for the chocolate factory. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1594) + View these to know when to buy time tower or Coach Jackrabbit. From 8dda2117f70a4d2901edf262587578177207af60 Mon Sep 17 00:00:00 2001 From: Cal Date: Wed, 1 May 2024 14:41:18 +1000 Subject: [PATCH 7/7] add todo --- .../features/inventory/chocolatefactory/ChocolateShopPrice.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt index c19d76336237..37127d11b033 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt @@ -73,6 +73,7 @@ object ChocolateShopPrice { val newList = mutableListOf() newList.add(Renderable.string("§eCoins per million chocolate§f:")) // TODO update this value every second + // TODO add time until can afford newList.add(Renderable.string("§eChocolate available: §6${ChocolateAmount.CURRENT.formatted}")) newList.add(LorenzUtils.fillTable(table, padding = 5, itemScale = config.itemScale)) display = newList