From e42e9d023eb420d1d24729a8e6e54c78ddd2e920 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 6c6f995..546cd7e 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