Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/beta' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Mar 26, 2024
2 parents bdf21ff + c41274a commit 86bad25
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 86bad25

Please sign in to comment.