From fd4ac247c4f93bfb4c680cc54ddcae799883c86d Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Fri, 5 Mar 2021 11:53:31 -0500 Subject: [PATCH] Rounding fun --- src/js/economyJS.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 84275319232..f60ae8286e6 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -994,30 +994,38 @@ globalThis.getSlaveCostArray = function(s) { } if (s.geneticQuirks.fertility === 2 && s.geneticQuirks.hyperFertility === 2 && s.preg === 0 && (s.ovaries === 1 || s.mpreg === 1)) { if (V.geneticMappingUpgrade >= 1) { - retval.push({text: "Additional dietary supplements due to genetic hyper-fertility", value: foodCost * 0.5}); + retval.push({ + text: "Additional dietary supplements due to genetic hyper-fertility", + Math.trunc(foodCost * 0.5)}); } else { - retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.5}); + retval.push({text: "Adjustment for unusual dietary deficiencies", value: Math.trunc(foodCost * 0.5)}); } } if (s.geneticQuirks.rearLipedema === 2) { if (V.geneticMappingUpgrade >= 1) { - retval.push({text: "Additional dietary supplements due to lipedema", value: foodCost * 0.2}); + retval.push({ + text: "Additional dietary supplements due to lipedema", + value: Math.trunc(foodCost * 0.2)}); } else { - retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); + retval.push({text: "Adjustment for unusual dietary deficiencies", value: Math.trunc(foodCost * 0.2)}); } } if (s.geneticQuirks.macromastia === 2) { if (V.geneticMappingUpgrade >= 1) { - retval.push({text: "Additional dietary supplements due to macromastia", value: foodCost * 0.2}); + retval.push({ + text: "Additional dietary supplements due to macromastia", + value: Math.trunc(foodCost * 0.2)}); } else { - retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); + retval.push({text: "Adjustment for unusual dietary deficiencies", value: Math.trunc(foodCost * 0.2)}); } } if (s.geneticQuirks.gigantomastia === 2) { if (V.geneticMappingUpgrade >= 1) { - retval.push({text: "Additional dietary supplements due to gigantomastia", value: foodCost * 0.2}); + retval.push({ + text: "Additional dietary supplements due to gigantomastia", + value: Math.trunc(foodCost * 0.2)}); } else { - retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); + retval.push({text: "Adjustment for unusual dietary deficiencies", value: Math.trunc(foodCost * 0.2)}); } } if (s.geneticQuirks.mGain === 2 && s.geneticQuirks.mLoss !== 2) { -- GitLab