From ee8f6339e2cc574fa3d43ecf4a88c4103ef86710 Mon Sep 17 00:00:00 2001 From: David Cole <40234707+DavidArthurCole@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:16:42 -0500 Subject: [PATCH 01/15] Done --- .../ChocolateFactoryConfig.java | 6 + .../storage/ProfileSpecificStorage.java | 6 + .../ChocolateFactoryBlockOpen.kt | 159 +++++++++++++++++- .../features/misc/NonGodPotEffectDisplay.kt | 11 ++ 4 files changed, 174 insertions(+), 8 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java index b999f95c5ff7..d73eb226cf83 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java @@ -200,6 +200,12 @@ public class ChocolateFactoryConfig { @FeatureToggle public boolean boosterCookieRequirement = false; + @Expose + @ConfigOption(name = "Hot Chocolate Mixin", desc = "Blocks running /cf without §9Hot Chocolate Mixin §7active.") + @ConfigEditorBoolean + @FeatureToggle + public boolean hotChocolateMixinRequirement = false; + @Expose @ConfigOption(name = "Stray Tracker", desc = "Track stray rabbits found in the Chocolate Factory menu.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java index 3514b9e8991c..b71e426db5a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java @@ -235,6 +235,9 @@ public static class HitmanStatsStorage { @Expose public HitmanStatsStorage hitmanStats = new HitmanStatsStorage(); + + @Expose + public SimpleTimeMark hotChocolateMixinExpiry = SimpleTimeMarkFarPast(); } @Expose @@ -303,6 +306,9 @@ public static class BitsStorage { public SimpleTimeMark boosterCookieExpiryTime = null; } + @Expose + public SimpleTimeMark godPotExpiryTime = SimpleTimeMarkFarPast(); + @Expose public Map minions = new HashMap<>(); diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBlockOpen.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBlockOpen.kt index ab069e9b236f..4c889a22682b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBlockOpen.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBlockOpen.kt @@ -6,15 +6,22 @@ import at.hannibal2.skyhanni.data.IslandGraphs import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiContainerEvent +import at.hannibal2.skyhanni.events.InventoryUpdatedEvent +import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.events.TablistFooterUpdateEvent import at.hannibal2.skyhanni.features.event.hoppity.MythicRabbitPetWarning import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands +import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.RegexUtils.firstMatcher +import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.SimpleTimeMark +import at.hannibal2.skyhanni.utils.TimeUtils import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.seconds @@ -22,7 +29,7 @@ import kotlin.time.Duration.Companion.seconds @SkyHanniModule object ChocolateFactoryBlockOpen { private val config get() = SkyHanniMod.feature.inventory.chocolateFactory - private val profileStorage get() = ProfileStorageData.profileSpecific?.bits + private val profileStorage get() = ProfileStorageData.profileSpecific /** * REGEX-TEST: /cf @@ -45,6 +52,65 @@ object ChocolateFactoryBlockOpen { "§6(?:Open )?Chocolate Factory", ) + /** + * REGEX-TEST: §a§lSCHLURP! §r§eThe effects of the §r§9Hot Chocolate Mixin §r§ehave been extended by §r§986h 24m§r§e! + * They will pause if your §r§cGod Potion §r§eexpires. + */ + private val hotChocolateMixinConsumePattern by RepoPattern.pattern( + "stats.chatpatterns.hotchocolatemixinconsume", + "(?:§.)+.*(?:§.)+Hot Chocolate Mixin ?(?:§.)+.*extended by (?:§.)+(?