From 3990b4782d1d04f6b013ada7cacbb4a5f925bae0 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Mon, 19 Oct 2020 15:01:03 -0400 Subject: [PATCH] clamp --- src/facilities/incubator/incubatorInteract.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/facilities/incubator/incubatorInteract.js b/src/facilities/incubator/incubatorInteract.js index af2756eb46b..6b55c73ea32 100644 --- a/src/facilities/incubator/incubatorInteract.js +++ b/src/facilities/incubator/incubatorInteract.js @@ -3,8 +3,6 @@ App.UI.incubator = function() { V.nextLink = "Main"; V.returnTo = "Incubator"; V.encyclopedia = "The Incubation Facility"; - V.targetAge = Number(V.targetAge) || V.minimumSlaveAge; - V.targetAge = Math.clamp(V.targetAge, V.minimumSlaveAge, 42); V.readySlaves = 0; V.readySlave = 0; V.incubatorSlaves = V.tanks.length; @@ -1136,7 +1134,8 @@ App.UI.incubator = function() { App.UI.DOM.makeTextBox( V.targetAge, (v) => { - V.targetAge = v; + V.targetAge = v || V.minimumSlaveAge; + V.targetAge = Math.clamp(V.targetAge, V.minimumSlaveAge, V.retirementAge); refresh(); }, true -- GitLab