From 9322afb78b5f470603775dc04d51b0f1893e7d9f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 27 Oct 2023 14:47:20 +0200 Subject: [PATCH] Fix random humidity in new point --- mibpov.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mibpov.js b/mibpov.js index 1ab1aad..1ca62ae 100644 --- a/mibpov.js +++ b/mibpov.js @@ -1566,8 +1566,8 @@ addBiomeButton.onclick = function() { // Add a biome at a random position let he_min = Math.max(MIN_HEAT_HUMIDITY_VALUE, limit_heat_min); let he_max = Math.min(MAX_HEAT_HUMIDITY_VALUE, limit_heat_max); - let hu_min = Math.max(MIN_HEAT_HUMIDITY_VALUE, limit_heat_min); - let hu_max = Math.min(MAX_HEAT_HUMIDITY_VALUE, limit_heat_max); + let hu_min = Math.max(MIN_HEAT_HUMIDITY_VALUE, limit_humidity_min); + let hu_max = Math.min(MAX_HEAT_HUMIDITY_VALUE, limit_humidity_max); let he = Math.round(he_min + Math.random() * (he_max - he_min)); let hu = Math.round(hu_min + Math.random() * (hu_max - hu_min)); addBiome({name: generateBiomeName(lastBiomeID), heat: he, humidity: hu, min_y: MIN_Y_DEFAULT, max_y: MAX_Y_DEFAULT});