Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidArthurCole committed Jan 6, 2025
1 parent 2fe67fc commit 93e3eea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,8 @@ public class ChocolateFactoryConfig {
@Expose
@ConfigOption(
name = "§6CF §zParty Mode",
desc = "Don't turn this on."
desc = "Don't turn this on.\n§cRequires Chroma to be enabled to fully function."
)
@ConfigEditorBoolean
@FeatureToggle
public Property<Boolean> partyMode = Property.of(false);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.HoppityEggLocationsJson
import at.hannibal2.skyhanni.data.jsonobjects.repo.MilestoneJson
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.chroma.ChromaManager
import at.hannibal2.skyhanni.features.event.hoppity.HoppityCollectionStats
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
Expand All @@ -36,6 +37,7 @@ import kotlin.time.Duration.Companion.seconds
@SkyHanniModule
object ChocolateFactoryAPI {

private val chromaEnabled get() = ChromaManager.config.enabled.get()
val config: ChocolateFactoryConfig get() = SkyHanniMod.feature.inventory.chocolateFactory
val profileStorage: ChocolateFactoryStorage? get() = ProfileStorageData.profileSpecific?.chocolateFactory
val patternGroup = RepoPattern.group("misc.chocolatefactory")
Expand Down Expand Up @@ -267,6 +269,6 @@ object ChocolateFactoryAPI {
} ?: false

fun String.partyModeReplace(): String =
if (config.partyMode.get() && inChocolateFactory) replace(Regex("§[a-fA-F0-9]"), "§z")
if (config.partyMode.get() && inChocolateFactory && chromaEnabled) replace(Regex("§[a-fA-F0-9]"), "§z")
else this
}

0 comments on commit 93e3eea

Please sign in to comment.