From ad00101b8d050bba5bddeb3c733574333473572e Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 24 Dec 2022 10:04:16 -0600 Subject: [PATCH] Fixed random freeze from routing calculating permutations it shouldn't --- src/data/layers/routing.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/layers/routing.tsx b/src/data/layers/routing.tsx index 2238d04..c0b29d5 100644 --- a/src/data/layers/routing.tsx +++ b/src/data/layers/routing.tsx @@ -79,7 +79,7 @@ const layer = createLayer(id, function (this: BaseLayer) { const currentRoutes = computed(() => { // Manually check milestone req here due to calling generateCity() before milestones get earned - if (Decimal.gte(citiesCompleted.value, 7)) { + if (Decimal.gte(citiesCompleted.value, 7) || currentCity.value.length >= 12) { return Decimal.factorial(currentCity.value.length).div(2).toNumber(); } // Permutation code from https://stackoverflow.com/a/37580979