From c41274af219e124a8af87786f3eb5442ee1bea65 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 26 Mar 2024 21:12:46 +0100 Subject: Backend: always use local repo patterns when in dev env (#1282) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt index 27ceb7181..97f9196f2 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.LorenzEvent import at.hannibal2.skyhanni.events.PreInitFinishedEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.utils.ConditionalUtils.afterChange +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.StringUtils.matches import net.minecraft.launchwrapper.Launch import net.minecraftforge.fml.common.FMLCommonHandler @@ -57,6 +58,8 @@ object RepoPatternManager { } } + val localLoading: Boolean get() = config.forceLocal.get() || LorenzUtils.isInDevEnviromen() + /** * Crash if in a development environment, or if inside a guarded event handler. */ @@ -98,7 +101,7 @@ object RepoPatternManager { */ private fun reloadPatterns() { val remotePatterns = - if (config.forceLocal.get()) mapOf() + if (localLoading) mapOf() else regexes?.regexes ?: mapOf() for (it in usedKeys.values) { -- cgit